<div dir="ltr"><div><div><div><div><div><div>Hello Andrew,<br><br></div>I ran into a problem when Juju was no longer calling "apt-get update".  I filed bug:  <a href="https://bugs.launchpad.net/juju-core/+bug/1336353">https://bugs.launchpad.net/juju-core/+bug/1336353</a><br>
</div><div><br></div>The problem appears to be the apt metadata was out of date and the charms that call "apt-get install ..." in the install hook fail.  We also saw this problem on a different system where the cloud image was out of date and the install hook failed because no apt-get update was run.<br>
<br>Not calling apt-get update will break a large number of existing charms and needs to be fixed.<br><br></div>It looks like we have 2 problems:<br><br></div>1)  Juju should provide a way to turn on or off the apt-get update.  I would suggest an environment variable to enable or disable "apt-get update".<br>
<br></div>2)  Juju does not manage the local cloud image found in /var/cache/lxc/cloud-<series>/ directory.  The image I was using was older (05/28/2014) and that is why the apt-get meta data was out of date.  Not quite sure how to solve this, someone suggested a cron job to download the lastest cloud image in the background.  Someone else mentioned this is a security issue if the stale image does not have a patch and is not updated we could have an issue.<br>
<br></div>This is not the experience we want to give to Juju users.  As developers we should be able to turn off apt-get update for our own development purposes, but leave it on so existing charms work.  <br><div><br></div>
<div>I am willing to help resolve these two problems.  Please reach out to mbruzek on irc or email me directly.  Thanks,<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">   - Matt Bruzek <<a href="mailto:matthew.bruzek@canonical.com" target="_blank">matthew.bruzek@canonical.com</a>><br>
</div></div>
<br><br><div class="gmail_quote">On Mon, Jun 30, 2014 at 8:05 AM, Andrew Wilkins <span dir="ltr"><<a href="mailto:andrew.wilkins@canonical.com" target="_blank">andrew.wilkins@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi folks,<div><br></div><div>I've been debugging a bootstrap bug [0] that was caused by ssh timing out (and the client not noticing), which was caused by "apt-get upgrade" taking an awfully long time (6 minutes on Azure).</div>

<div>    [0] <a href="https://bugs.launchpad.net/juju-core/+bug/1316185" target="_blank">https://bugs.launchpad.net/juju-core/+bug/1316185</a></div>
<div><br></div><div>I just filed <a href="https://bugs.launchpad.net/juju-core/+bug/1335822" target="_blank">https://bugs.launchpad.net/juju-core/+bug/1335822</a>, and did a quick and dirty hack that brought the upgrade down to 3 minutes on Azure. I don't know the variance, so I can't be sure that it's all due to eatmydata, but smoser's results are similar.</div>

<div><br></div><div>Even with eatmydata, a full bootstrap on Azure just took me 10 minutes. That's roughly broken down into:</div><div> - apt-get update: 20s</div><div> - apt-get upgrade: 3m20s</div><div> - apt-get install <various>: 10s</div>

<div> - Download tools (from shared Azure storage account): 5s</div><div> - jujud bootstrap: 1m50s</div><div><br></div><div>We could bring the 10m down to 6m40s. Still not brilliant, but considerably better IMO.<br></div>

<div><br></div><div>I propose that we remove the "apt-get upgrade" altogether. Cloud images are regularly updated and tested, and I think we should be able to rely on that alone. If users want something more up-to-date, they can use the daily images which are not tested as a whole, but are composed of SRUs, which is effectively what users get today.</div>

<div><br></div><div>Cheers,</div><div>Andrew</div></div>
<br>--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
<br></blockquote></div><br></div></div>