On Tue 2011-10-18 (15:22), Derek Simkowiak wrote:
> What is the best method for gracefully shutting down LXC containers 
> in a production environment?

I use "lxc -s container" which itself executes a "shutdown -h now" via
cmdd, see: http://fex.rus.uni-stuttgart.de/lxc.html


> lxc-attach -n CONTAINER shutdown -h now
> 
>      Is there any drawback to doing that, instead? 

root@vms2:~# lxc-attach -n bunny -- shutdown -h now
lxc-attach: Does this kernel version support 'attach' ?
lxc-attach: failed to enter the namespace

root@vms2:~# uname -a
Linux vms2 2.6.35-30-server #59~lucid1-Ubuntu SMP Thu Sep 1 19:39:17 UTC 2011 
x86_64 GNU/Linux


> 3. An "official" command name for graceful shutdowns from the host.  I 
> propose lxc-shutdown.  (There is an unofficial OpenSuse package from 
> rdannert that has a "lxc-shutdown-all" command, but I have not seen the 
> name "lxc-shutdown" used anywhere.)
> 
> 4. Which signal?  SIGINT?  SIGPWR?  Both?

Does only work for init based systems, not for upstart, like Ubuntu!


-- 
Ullrich Horlacher              Server- und Arbeitsplatzsysteme
Rechenzentrum                  E-Mail: horlac...@rus.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-685-65868
Allmandring 30                 Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.rus.uni-stuttgart.de/

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to