lxc-snapshot destroys container
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Unassigned |
Bug Description
Was following instructions for lxc-snapshots at:
https:/
The problem I am reporting is that when I create a snapshot with:
lxc-snapshot -n c1
which creates snap0 (snap1...snapN, etc.), after I try restore the snapshot with:
lxc-snapshot -r snap0 -n c1
lxc seems to happily remove snap0 and c1, thus destroying the entire container. I would paste the output, but it was via a vbox vm and wasn't easy to copy/paste the text, so I have attached a screenshot instead.
The release was 14.0.4.1 LTS with lxc 1.0.5-0ubuntu0.1. What I expected was for the snapshot to first remove c1 and then rename snap0 to c1. Seeing as how the c1 container was a LVM snapshot I can see that removing c1 (the origin of snap0) might be the reason for it killing snap0 and c1, but it seems a little unpexted, especially if this had been more than a test.
Is this a real bug?
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: lxc 1.0.5-0ubuntu0.1
ProcVersionSign
Uname: Linux 3.13.0-32-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.3
Architecture: amd64
Date: Fri Aug 8 05:58:41 2014
InstallationDate: Installed on 2014-08-07 (0 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
ProcEnviron:
LANGUAGE=en_CA:en
TERM=linux
PATH=(custom, no user)
LANG=en_CA.UTF-8
SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
defaults.conf:
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
Changed in lxc (Ubuntu Trusty): | |
status: | Confirmed → Fix Released |
Thanks for reporting this bug. I'm afraid snapshotting is currently not
compatible with LVM. In the short term we should simply refuse snapshots
for lvm-backed containers. In the longer term, we'll need the lvm backing
store to provide a different naming scheme for snapshots, and its own
snapshot restoration algorithm.
status: confirmed
importance: high