[Bug 1212414] [NEW] lxc-destroy allows unsafe destruction of overlayfs sources
Scott Moser
smoser at ubuntu.com
Wed Aug 14 19:57:38 UTC 2013
Public bug reported:
The gist of this bug is that 'lxc-destroy -n foo' should at least
complain and require some sort of '--force' flag to remove 'foo' if
there are containers that are using it for a source of their overlayfs
clones.
Example:
## using daily ppa
$ sudo lxc-create -n source-precise-amd64 -t ubuntu-cloud -- \
--release=precise --arch=amd64
$ sudo lxc-create -n source-precise-amd64 -t ubuntu-cloud -- \
--release=precise --arch=amd64
ubuntu-cloudimg-query is /usr/bin/ubuntu-cloudimg-query
wget is /usr/bin/wget
Extracting container rootfs
Container source-precise-amd64 created.
$ sudo lxc-clone -o source-precise-amd64 --snapshot -B overlayfs -n my-clone
Created container my-clone as snapshot of source-precise-amd64
$ sudo lxc-destroy -n source-precise-amd64
$ echo $?
0
$ sudo lxc-start -n my-clone
lxc-start: No such file or directory - overlayfs: error mounting /var/lib/lxc/source-precise-amd64/rootfs onto /usr/lib/x86_64-linux-gnu/lxc options upperdir=/var/lib/lxc/my-clone/delta0,lowerdir=/var/lib/lxc/source-precise-amd64/rootfs
lxc-start: No such file or directory - failed to get real path for 'overlayfs:/var/lib/lxc/source-precise-amd64/rootfs:/var/lib/lxc/my-clone/delta0'
lxc-start: failed to mount rootfs
lxc-start: failed to setup rootfs for 'my-clone'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'my-clone'
** Affects: lxc (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1212414
Title:
lxc-destroy allows unsafe destruction of overlayfs sources
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1212414/+subscriptions
More information about the Ubuntu-server-bugs
mailing list