Public bug reported:
I'm having a persistent problem with a container based app breaking
after restore from snapshot, specifically several lines are truncated
from the end of a file within the container.
I can stop/start the container, copy and copy it back to the same name
and everything is fine. Taking snapshots works fine, but on restore from
a snapshot the damage has occurred in the container. Even deleting and
recreating the container leads to the same problem.
Snapshot restore was working but started breaking about 2-3 weeks ago.
Apologies for not having paid more attention when this bug started
occurring but I was dealing with bugs in the app and it wasn't
immediately clear this was a problem with lxd.
Taking a snapshot in a vbox vm with the same software installed works
perfectly, the problem seems specific to restore of an lxc container
I upgraded the host system from 16.04 to 16.10 in the (mistaken) hope it would
fix this issue. So currently the host is/has:
Ubuntu 16.10, Linux 4.8.0-28-generic #30-Ubuntu SMP
*** 2.4.1-0ubuntu1 500
500 http://gb.archive.ubuntu.com/ubuntu yakkety/main amd64 Packages
The host is an HP N40L microserver with an AMD Turion II Neo N40L CPU.
The zpool is on a spinning HD with no hardware or software RAID.
zfs utils show no apparent problems with the zpool:
sudo zpool status -v
scan: scrub repaired 0 in 0h2m with 0 errors on Sun Oct 9 00:26:06 2016
NAME STATE READ WRITE CKSUM
lxdfs ONLINE 0 0 0
/var/lib/lxd/lxd-zfs.img ONLINE 0 0 0
errors: No known data errors
## What I do
- lxd is setup to use bridged networking allowing containers to obtain an ip
via dhcp on my router
- The guest container is created and the app installed with:
lxc launch ubuntu:14.04 fix -c security.privileged=true
lxc file push ~/.ssh/id_rsa.pub ods/home/ubuntu/.ssh/authorized_keys
- Then log into the container:
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo shutdown -r now
- Take a snapshot on the host:
lxc snapshot ods upgraded
- Log into the guest and install the web app stack:
sudo -H bash install.sh --server-webserver=nginx
- Once install is complete log into the web app set admin password etc.
- Take another snapshot on the host
lxc snapshot ods devshop-installed
- Restore last snapshot:
lxc restore ods devshop-installed
- Previously working app now throws an error, on investigation it turns out one
particular config file is now missing about 4 lines.
More details to come.
** Affects: lxd (Ubuntu)
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
File truncated after lxc snapshot restore
To manage notifications about this bug go to:
ubuntu-bugs mailing list