Sunday, 1 November 2015

Re: Resetting cloud instances [was: Current Launchpad builder layout and plans]

On Thu, Oct 29, 2015 at 11:35:47PM +0100, Martin Pitt wrote:
> Colin Watson [2015-10-27 17:33 +0000]:
> > The guest instances are reset to a clean state between each build.
> > fact, in order to minimise latency in the common case where the build
> > farm is more than 0% idle, they're actually reset at the end of the
> > previous build. This means that the guest configuration has to be
> > generic
>
> For autopkgtests I have to do this all the time too, except that I do
> need to support different configurations: most tests run with 1 CPU/2
> GB, but some "large" tests like linux or gcc need a bigger instance.
> But I can't afford to run all tests in big instances, we already have
> way too little capacity as it is.
>
> Right now I just tear down (nova delete) and rebuild (nova boot) an
> instance for each test. This is reasonably fast in ScalingStack (some
> 30 s perhaps), but there is some quite expensive post-boot setup that
> I need to do (about 1 to 2 mins), so I wondered: How do you "reset" an
> instance? Is there something more efficient than delete+boot?

We in fact just delete and boot. The time for that will be more
important for you than it is for us because you can't use the same
instance type for everything.

> For xenial I build a custom image every day by dist-upgrading a wily
> image and doing the package installs/purges that I need, which nicely
> reduces the per-test setup cost.

Right, that's what I was going to suggest - you definitely want to
minimise the post-boot setup time. You may be able to improve how you
set that up though; we have a glance-simplestreams-sync plugin called
"launchpad-buildd-image-modifier" which does the necessary setup, so we
get a modified base image every time a new base cloud image from the
relevant channel becomes available without having to wait for a separate
cron job. You can follow the breadcrumbs from
lp:canonical-is-openstack-deploy to see how that's configured.

--
Colin Watson [[email protected]]

--
ubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel