Re: [Lxc-users] [PATCH 9/9] lxc-destroy: wait until the container is stopped

2012-05-27 Thread Serge Hallyn
Quoting Derek Simkowiak (de...@simkowiak.net):
 /the subsequent rm -rf $rootfs/
 
 Serge,
 Could you elaborate on this?  The lxc-destroy is not supposed to
 rm -rf the root filesystem, is it?
 
 What if I had data in there I wanted to copy to a new LXC rootfs
 I'm building?
 
 Unless I have misunderstood something, doing an rm -rf is a
 horrible idea.  Virt-Manager and VirtualBox do not remove your .vmdk
 disk image when you destroy a virtual machine.

In libvirt, 'destroy' means shut down.  In lxc, stop means shut down and
destroy means delete.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] [PATCH 9/9] lxc-destroy: wait until the container is stopped

2012-05-27 Thread Serge Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr):
 On 04/26/2012 07:09 AM, Serge Hallyn wrote:
 From: Serge Hallynserge.hal...@ubuntu.com
 
 Author: Timothy Chentnac...@gmail.com
 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/980902
 
 Signed-off-by: Serge Hallynserge.hal...@ubuntu.com
 Cc: Timothy Chentnac...@gmail.com
 ---
   src/lxc/lxc-destroy.in |1 +
   1 file changed, 1 insertion(+)
 
 diff --git a/src/lxc/lxc-destroy.in b/src/lxc/lxc-destroy.in
 index b0f2da5..17fa6d6 100644
 --- a/src/lxc/lxc-destroy.in
 +++ b/src/lxc/lxc-destroy.in
 @@ -87,6 +87,7 @@ lxc-info -n $lxc_name 2/dev/null | grep -q RUNNING
   if [ $? -eq 0 ]; then
  if [ $force -eq 1 ]; then
  lxc-stop -n $lxc_name
 +lxc-wait -n $lxc_name -s STOPPED
  else
  echo Container $lxc_name is running, aborting the deletion.
  exit 1
 
 I don't get why this is needed, lxc-stop is synchronous. When the

Actually I don't see where lxc-stop waits on anything.  It sends the
sigkill, then sends a 'done' message back to the peer.

-serge

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users