Closed adamryczkowski closed 4 years ago
Those are failures coming from CRIU when trying to checkpoint your container. It looks like it's getting confuse by btrfs in this instance.
Providing those logs at https://github.com/checkpoint-restore/criu may be useful to that project.
On the LXD side specifically, all we do is spawn CRIU and let it dump/restore, that part appears to be working from above log.
Required information
$ lxc snapshot nester live_snap --stateful Error: snapshot dump failed (00.000055) Warn (criu/log.c:203): The early log isn't empty (00.022092) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x4f) btrfs ./run/systemd/unit-root is inaccessible (00.022095) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.022101) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x4f) btrfs ./ is inaccessible (00.022105) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.022119) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x4f) btrfs ./ is inaccessible (00.022122) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.022142) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x4f) btrfs ./ is inaccessible (00.022145) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.022157) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x4f) btrfs ./ is inaccessible (00.022160) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.022162) Warn (criu/fsnotify.c:288): fsnotify: Handle 0x1b:0x108 cannot be opened (00.030997) Error (criu/irmap.c:86): irmap: Can't stat /no-such-path: No such file or directory (00.031000) Error (criu/fsnotify.c:291): fsnotify: Can't dump that handle (00.031043) Error (criu/cr-dump.c:1345): Dump files (pid: 5074) failed with -1 (00.034484) Error (criu/cr-dump.c:1743): Dumping FAILED.
$ sudo snap install lxd $ sudo snap set lxd criu.enable=true $ sudo systemctl reload snap.lxd.daemon $ sudo lxd init # accept the defaults. $ lxc launch ubuntu:bionic nester $ lxc snapshot nester live_snap --stateful Error: snapshot dump failed (00.000189) Warn (criu/log.c:203): The early log isn't empty (00.238875) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x3f) btrfs ./ is inaccessible (00.238891) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.238948) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x3f) btrfs ./run/systemd/unit-root is inaccessible (00.238965) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.238987) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x3f) btrfs ./ is inaccessible (00.239001) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.239050) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x3f) btrfs ./ is inaccessible (00.239066) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.239114) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x3f) btrfs ./ is inaccessible (00.239129) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.239173) Error (criu/mount.c:1087): mnt: The file system 0x1b 0x1b (0x3f) btrfs ./ is inaccessible (00.239188) Error (criu/fsnotify.c:212): fsnotify: Can't open mount for s_dev 1b, continue (00.239197) Warn (criu/fsnotify.c:288): fsnotify: Handle 0x1b:0x108 cannot be opened (00.275087) Error (criu/irmap.c:86): irmap: Can't stat /no-such-path: No such file or directory (00.275097) Error (criu/fsnotify.c:291): fsnotify: Can't dump that handle (00.275192) Error (criu/cr-dump.c:1345): Dump files (pid: 32646) failed with -1 (00.283240) Error (criu/cr-dump.c:1743): Dumping FAILED.
$ dmesg (...) [ 3091.351457] audit: type=1400 audit(1582213464.747:132): apparmor="STATUS" operation="profileload" label="lxd-nester</var/snap/lxd/common/lxd>//&:lxd-nester_:unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=425 comm="apparmor_parser"
$ lxc info nester --show-log Name: nester Location: none Remote: unix:// Architecture: x86_64 Created: 2020/02/20 15:44 UTC Status: Running Type: container Profiles: default Pid: 32646 Ips: eth0: inet 10.165.25.169 veth516bd843 eth0: inet6 fd42:4f88:bb4e:f118:216:3eff:feaf:9a42 veth516bd843 eth0: inet6 fe80::216:3eff:feaf:9a42 veth516bd843 lo: inet 127.0.0.1 lo: inet6 ::1 Resources: Processes: 24 Disk usage: root: -1B CPU usage: CPU usage (in seconds): 11 Memory usage: Memory (current): 221.03MB Network usage: eth0: Bytes received: 9.79kB Bytes sent: 4.72kB Packets received: 77 Packets sent: 49 lo: Bytes received: 2.76kB Bytes sent: 2.76kB Packets received: 40 Packets sent: 40
Log:
lxc nester 20200220154423.466 WARN cgfsng - cgroups/cgfsng.c:chowmod:1525 - No such file or directory - Failed to chown(/sys/fs/cgroup/unified//lxc.payload/nester/memory.oom.group, 1000000000, 0) lxc 20200220154437.209 ERROR criu - criu.c:do_dump:1325 - dump failed with 1 lxc 20200220154437.209 ERROR criu - criu.c:do_dump:1339 - criu output:
$ lxc config show nester --expanded architecture: x86_64 config: image.architecture: amd64 image.description: ubuntu 18.04 LTS amd64 (release) (20200218) image.label: release image.os: ubuntu image.release: bionic image.serial: "20200218" image.type: squashfs image.version: "18.04" volatile.base_image: 8c4e87e53c024e0449003350f0b0626b124b68060b73c0a7ad9547670e00d4b3 volatile.eth0.host_name: veth516bd843 volatile.eth0.hwaddr: 00:16:3e:af:9a:42 volatile.idmap.base: "0" volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]' volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]' volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]' volatile.last_state.power: RUNNING devices: eth0: name: eth0 nictype: bridged parent: lxdbr0 type: nic root: path: / pool: default type: disk ephemeral: false profiles:
$ sudo cat /var/snap/lxd/common/lxd/logs/lxd.log t=2020-02-20T16:43:10+0100 lvl=info msg="Creating container" ephemeral=false name=nester project=default t=2020-02-20T16:43:10+0100 lvl=info msg="Created container" ephemeral=false name=nester project=default t=2020-02-20T16:43:15+0100 lvl=info msg="Starting container" action=start created=2020-02-20T16:43:10+0100 ephemeral=false name=nester project=default stateful=false used=1970-01-01T01:00:00+0100 t=2020-02-20T16:43:15+0100 lvl=info msg="Started container" action=start created=2020-02-20T16:43:10+0100 ephemeral=false name=nester project=default stateful=false used=1970-01-01T01:00:00+0100 t=2020-02-20T16:43:34+0100 lvl=info msg="Shutting down container" action=shutdown created=2020-02-20T16:43:10+0100 ephemeral=false name=nester project=default timeout=-1s used=2020-02-20T16:43:15+0100 t=2020-02-20T16:43:47+0100 lvl=info msg="Shut down container" action=shutdown created=2020-02-20T16:43:10+0100 ephemeral=false name=nester project=default timeout=-1s used=2020-02-20T16:43:15+0100 t=2020-02-20T16:43:59+0100 lvl=info msg="Deleting container" created=2020-02-20T16:43:10+0100 ephemeral=false name=nester project=default used=2020-02-20T16:43:15+0100 t=2020-02-20T16:43:59+0100 lvl=info msg="Deleted container" created=2020-02-20T16:43:10+0100 ephemeral=false name=nester project=default used=2020-02-20T16:43:15+0100 t=2020-02-20T16:44:17+0100 lvl=info msg="Creating container" ephemeral=false name=nester project=default t=2020-02-20T16:44:17+0100 lvl=info msg="Created container" ephemeral=false name=nester project=default t=2020-02-20T16:44:23+0100 lvl=info msg="Starting container" action=start created=2020-02-20T16:44:17+0100 ephemeral=false name=nester project=default stateful=false used=1970-01-01T01:00:00+0100 t=2020-02-20T16:44:23+0100 lvl=info msg="Started container" action=start created=2020-02-20T16:44:17+0100 ephemeral=false name=nester project=default stateful=false used=1970-01-01T01:00:00+0100 t=2020-02-20T16:44:36+0100 lvl=info msg="Migrating container" actionscript=false created=2020-02-20T16:44:17+0100 ephemeral=false features=0 name=nester predumpdir= project=default statedir=/var/snap/lxd/common/lxd/containers/nester/state stop=false used=2020-02-20T16:44:23+0100 t=2020-02-20T16:44:37+0100 lvl=info msg="Failed migrating container" actionscript=false created=2020-02-20T16:44:17+0100 ephemeral=false features=0 name=nester predumpdir= project=default statedir=/var/snap/lxd/common/lxd/containers/nester/state stop=false used=2020-02-20T16:44:23+0100