[Lxc-users] start order

Michael H. Warfield mhw at WittsEnd.com
Mon Dec 10 17:53:37 UTC 2012


On Mon, 2012-12-10 at 11:35 -0600, Serge Hallyn wrote:
> Quoting Michael H. Warfield (mhw at WittsEnd.com):
> > On Mon, 2012-12-10 at 08:10 -0600, Serge Hallyn wrote:
> > > Quoting Michael H. Warfield (mhw at wittsend.com):
> > > > There has been very little discussion in the main project over how to
> > > > manage autobooting containers (or maybe I've missed it).  Maybe it's
> > > > time we had it.
> > > >
> > > > What I do now is specific to my constellations of 6 lxc hosts (about 4
> > > > dozen guest containers) at two sites.  I would personally prefer this
> > > > sort of information to be contained in the individual container config
> > > > files, ala OpenVZ and Linux-Vservers, without creating an entirely new,
> > > > distribution specific, configuration file.
> > > > 
> > > > Primary argument with having it contained within the container config
> > > > really concerns migration.  When I migrated a container from one host to
> > > > another host in the same cluster, if all that information is in the
> > > > container config, it follows along.  If you bury it in a common config,
> > > > you then have to edit those configuration files on both the servers (the
> > > > throwing and the catching) in order to properly complete the migration.
> > > > I don't like that idea at all.
> > > 
> > > Buried in a config, but it could be exposed by lxc-info so it wouldn't
> > > be so bad.  Though I guess it could be an issue for boot-speed fanatics
> > > who want to minimize random disk access during boot.
> > 
> > I won't say that I'm a boot speed fanatic but I can be (more than) a
> > little OCD with regards to getting certain critical containers up as
> > quickly as possible even where other delays dominate.

> Sorry, I think you misunderstood what I meant by that :)  By boot speed
> fanatics, I meant people who want to avoid having init scripts look under
> /etc/default/$pkg because that adds seeking which slows down boot.

> For those people, if any laptop that has some containers will, at boot,
> have to scan /var/lib/lxc/*/config to find lxc.boot entries, that will
> be unacceptable.  And TBH since my main laptop has an SSD but doesn't
> suspend/resume, 5 sec boot time is precious to me.  But I don't autostart
> containers on that laptop.

> With 'boot speed fanatics' I was not talking about people who want
> containers brought up at boot.

Oh, no...  I know EXACTLY who you were referring to.  I was just making
an orthogonal, oblique, point.  Maybe (probably) I was being too
obscure.  They're the ones that got us into this whole systemd "the
system must boot in under 10 seconds" mess (which I don't TOTALLY
disagree with).  I totally agree with you there.  If you autostart
containers in that sort of environment you have no room to bitch about
the boot time.  That's a self-inflicted injury and I agree the autoboot
option must default to off and you only autoboot those containers that
are enabled.

A fast grep on the config files is pretty small, time wise, but an
interesting point, even if you do it in the background.  Even if you
DON'T autostart containers, if you scan the directories with grep, that
can take (a little) time.  A global config for autostart might not be a
bad idea.  In RH/rpm-based land, this would probably be something in
an /etc/sysconfig/lxc file with LXC_AUTOBOOT=0 and I would support that
entirely.  Don't even look at the configuration files if that's the
case.  If it's set to autoboot, then digest the configuration files to
sort them out.  But it is something you have done yourself.  Even the
"ls /etc/lxc/auto" is not without cost but that may be the way Ubuntu
goes with that paradigm.

> -serge

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20121210/c8cfbd83/attachment.pgp>


More information about the lxc-users mailing list