[lxc-users] lxc-destroy not working when run by cron
Claudio Kuenzler
ck at claudiokuenzler.com
Fri Sep 25 06:14:01 UTC 2015
Hello,
Been pulling my hair out (what's left of it) because a script basically
used for auto-re-creation of containers is working when I launch it
manually, but the very same script does not work when run by cron.
I narrowed it down to the "lxc-destroy" command which simply does not do
anything when run by cron. You can reproduce it with a simple cronjob like
this:
03 08 * * * lxc-stop -n mycontainer && lxc-destroy -n mycontainer
What happens then? The container is correctly stopped - but remains
stopped. The container is still showing up in lxc-ls (in state STOPPED).
I suspect there is a problem deleting the logical volume (lxc.rootfs) of
the container when lxc-destroy is launched, because a quick "lvs" after the
cronjob ran through still shows the LV of the container.
Ubuntu 14.04.1 LTS, 3.16.0-48-generic, lxc 1.0.7-0ubuntu0.2
Any ideas?
cheers,
ck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150925/c11ce49c/attachment.html>
More information about the lxc-users
mailing list