[ubuntu-cloud] Can I reboot from cloud-init?

Dave Hein dhein at acm.org
Tue Sep 25 09:19:04 UTC 2012


On Sun, Sep 23, 2012 at 6:18 PM, Nick Barcet <nick.barcet at canonical.com>wrote:

> On 09/23/2012 04:50 PM, Dave Hein wrote:
> > I'm trying to setup a cloud-config file to invoke a script that will run
> > apt-get to update packages and install a few additional packages.
> > Because the kernel can be updated by the 'apt-get upgrade', I want to
> > reboot at the end to activate the new kernel.
>
> Hello Dave,
>
> Our best practice, in your case, is to modify the script that launches a
> new instance to always make sure you boot from the latest image in the
> suite you are running.  On an officially maintained cloud, our images
> are updated as soon as a security update that mandates it is published,
> or at least every two months.  This means that by launching the latest
> image, you are quite unlikely to have a kernel update to be done.  This
> also limits the number of updates that you will have to pull, over time,
> for a given suite.
>
>
My use case is slightly different .. I'm configuring a persistent spot
request. When the spot price exceeds my threshold, then the current
instance gets terminated and the (still active) spot request launches a new
instance when the spot prices drops below the threshold. I can specify the
latest officially maintained image snapshot at the time I posted the
long-lived spot request, but have no way of updating the request if a newer
official image appears.

I'm using the 22-Aug image for 12.04, which, as of a day ago, is the latest
official image; since that image was built there have been two rounds of
security patches on the kernel (the 22-Aug image kernel version ends with
.29 ... as of a day ago the latest security patch takes it to .31).

Given the way persistent spot requests work, I think I need to patch the
systems at cloud-init time; but I'll also look at some kind of external
monitoring of the official images to remove-and-replace spot requests so as
to keep them current with the official images.

To do so on EC2, I would recommend using the query interface on
> cloud-images.ubuntu.com [1].  Look at the file and URL, I think it is
> self explanatory, but more explanations are available at [2].
>
> [1]
> http://cloud-images.ubuntu.com/query/precise/server/released.current.txt
> [2]
> https://help.ubuntu.com/community/UEC/Images#Machine_Consumable_Ubuntu_Cloud_Guest_images_Availability_Data
>
> Hope this helps,
> Nick
>

Thanks for that; I was unaware of the query interface. Really nice for
automation. :-)


>
>
> --
> Ubuntu-cloud mailing list
> Ubuntu-cloud at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-cloud
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-cloud/attachments/20120925/1da97d04/attachment-0001.html>


More information about the Ubuntu-cloud mailing list