[lxc-devel] [patch 1/1] fix container find the previously created configuration

Andrian Nord nightnord at gmail.com
Thu Nov 19 20:40:18 UTC 2009


On Thu, Nov 19, 2009 at 10:33:35AM +0100, Daniel Lezcano wrote:
> lxc-wait is broken ?

I'm starting container's in a threaded way (many at once), but if i'll
use say lxc-wait -n <name> -s RUNNING (I want to known, when container
is actually started, to prevent hundreds on containers starting at once,
which will only slowdown boot process), one will lock PF socket and
other's (lxc-monitor also) would fail with 'address in use' error.

hellgate night # lxc-wait -n nfs -s STOPPED
<waiting...>

in other console:
hellgate night # lxc-wait -n openafs -s STOPPED
lxc-wait: bind : Address already in use

Same thing with lxc-monitor.

Solution I see (and i'm planning to implement it one day) in implementing
'daemon' mode for lxc-monitor and modifying monitor.c to check if
monitor-daemon is running before (it could be forced with special flag
for lxc-monitor/lxc-wait and will issue error, if no lxc-monitor-daemon
running) trying to direct access. lxc-monitor in daemon mode will lock
socket and create normal af_unix socket, redirecting all info it got from pf
socket.




More information about the lxc-devel mailing list