[Lxc-users] lxc-wait doesn't notice container shutdown

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jul 5 11:53:54 UTC 2013


Quoting Christoph Willing (cwilling at users.sourceforge.net):
> Since upgrading from lxc-0.7.5 to 0.9.0 I have a problem with lxc-wait.
> 
> Previously, scripts containing an lxc-wait for the STOPPED state would continue as expected when the nominated container shut itself down i.e. the script received the STOPPED state and lxc-wait exits. However with 0.9.0, lxc-wait doesn't seem to receive the STOPPED state when the container shuts itself down  - the scripts just keep waiting. I can run lxc-stop manually, whereupon the waiting script then sees that the container gets the message and continues as before.
> 
> On the other hand, the same scripts see the RUNNING state of a newly started container and continue execution as before.
> 
> So although lxc-wait is working (receives states sent explicitly via lxc-start/stop), it no longer receives any indication from the container that is is shutting down.
> 
> Is this new behaviour expected in 0.9.0?

No it sounds unexpected.  Would you be able to code the above into a
little test script to reproduce?  (something like

	sudo lxc-create -t ubuntu -n x1
	sudo lxc-start -n x1 -d
	sudo nohup lxc-wait -s STOPPED -n x1 > /tmp/outout 2>&1 &
	pid=$!
	sudo lxc-sttach -n x1 -- poweroff
	tail /tmp/outout
	ps -p $pid && echo "lxc-wait still running - FAIL"
	ps -p $pid || echo "lxc-wait exited - PASS"

)

Also please tell us which distro+release you're on and the exact package
or upstream git version (there have been very recent changes...)  Is
lxc-wait a script or a program in yours?  (which lxc-wait;  file `which lxc-wait`)

thanks,
-serge




More information about the lxc-users mailing list