Bug 1003136

Summary: lxc-destroy destroys rootfs of "Host"
Product: [Fedora] Fedora Reporter: Eiichi Tsukata <eiichi.tsukata>
Component: lxcAssignee: Thomas Moschny <thomas.moschny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: karlthered, sagarun, thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-05 19:35:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eiichi Tsukata 2013-08-31 00:53:52 UTC
Description of problem:
lxc-destroy command erases rootfs including /bin/* and /sbin/* of "Host OS".

Version-Release number of selected component (if applicable):
- lxc-0.8.0-2.fc19.x86_64
- lxc-templates-0.8.0-2.fc19.x86_64


How reproducible:
100%

Steps to Reproduce:
1. # lxc-create -t busybox -n test
2. # lxc-start -n test
lxc-start: Invalid argument - pivot_root syscall failed
lxc-start: failed to setup pivot root
lxc-start: failed to set rootfs for 'test'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'test'
3. # lxc-destroy -n test

Actual results:
rootfs of Host destoryed. /bin/* and /sbin/* all erased.

Expected results:
Only erases designated containers, i.e. files in /var/lib/lxc/test/.

Comment 1 Thomas Moschny 2013-09-04 18:29:49 UTC
Thanks for reporting.

Does the problem persist with the 0.9.0 package?

lxc-0.9.0-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/lxc-0.9.0-2.fc19

Additionally, I've brought up the issue on the lxc-devel list:
http://sourceforge.net/mailarchive/message.php?msg_id=31365349

Comment 2 Eiichi Tsukata 2013-09-05 11:45:22 UTC
Thanks for sending issue to lxc-devel list.

I tried lxc-0.9.0-2.fc19 and it truns out that the problem doesn't persist no longer. lxc-destroy worked as expected.