[Lxc-users] start order

Papp Tamas tompos at martos.bme.hu
Fri Dec 7 22:45:42 UTC 2012


hi All,

Regarding the bug #1087765 is there a way in Ubuntu to specify the starting order of containers?

I this this code in /etc/init/lxc.conf:

     for f in /etc/lxc/auto/*; do
         c="$(basename $f .conf)"
         lxc-info -n $c 2>/dev/null | grep state | grep -q "RUNNING" || lxc-start -n $c -f $f -d
     done

Why are they started with '-f <config file>'?
Why not just 'lxc-start -n $c -d'

I think it would be simple using a config file with the order of the specific or with all the 
container names.

Something like this:

/etc/lxc/order.conf:
dnsserver
ldapserver
puppet

If exists, these containers would be started started first.
Maybe specifying delay would also be useful?

Eg:
/etc/lxc/order.conf:
dnsserver:15
ldapserver:30
puppet:15

Where numbers mean secundums, eg. dns server receives 15 secundums to startup properly.

Essential services would be working before anything else and users would be happy:)


What do you think about that?

Thanks,
tamas




More information about the lxc-users mailing list