[CRIU] Restore Failure

Saied Kazemi saied at google.com
Fri Jul 18 22:16:19 PDT 2014


Hi Pavel,

I have run into a problem when restoring a process that was running in a
Docker container when Docker home is bind mounted from a different device.

As you know, it is possible to successfully dump and restore Docker
container processes.  But when /var/lib/docker is bind mounted from a
different device (e.g., mount /dev/sd3a /mnt/sd3a; mkdir /mnt/sda3/docker;
mount --bind /mnt/sda3/docker /var/lib/docker), dump succeeds but restore
fails.

For easier testing and debugging, I have reproduced the problem with a
couple of small shell scripts that I have attached here. These are the same
shell scripts that I used during external bind mount troubleshooting.  I
just changed them a bit to illustrate the problem I am currently running
into.  If you run ./z1.sh without the bindmount argument, everything works
fine.  But if you specify bindmount, it bind mounts its root from a
different device (a tmpfs in this case), dump succeeds but restore fails.
 I hope it's not an error on my part.

I have been using the latest greatest criu binary from the head.  Please
let me know once you've had a chance to try this.

Thanks,

--Saied


On Terminal A:

# ./z1.sh bindroot
...
pid=1950 0
pid=1950 1
pid=1950 2

On Terminal B:

# criu dump -D img -o dump.log -v4 -j -n mnt -n pid -t 1950 --ext-mount-map
/int_file1:/int_file1 --ext-mount-map /int_file2:/int_file2
(00.037567) Dumping finished successfully
#

# mount --rbind /var/lib/foo/root /var/lib/foo/root
# criu restore -D img -o restore.log -v4 -j -n mnt -n pid -d --root
/var/lib/foo/root --ext-mount-map /int_file1:/var/lib/foo/ext/ext_file1
--ext-mount-map /int_file2:/etc/ext_file2
(00.004764)   1950: Error (mount.c:1100): A few mount points can't be
mounted(00.004772)   1950: Error (mount.c:1104): 73:71 /etc/ext_file2
./int_file2 /dev/disk/by-uuid/4873b275-1139-4199-9841-fbba6432f30d
(00.021963) Error (cr-restore.c:1054): 1950 exited, status=1
(00.021992) Error (cr-restore.c:1662): Restoring FAILED.
#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140718/4a5973e9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump.log
Type: application/octet-stream
Size: 28451 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140718/4a5973e9/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: restore.log
Type: application/octet-stream
Size: 14848 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140718/4a5973e9/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: z.inc
Type: application/octet-stream
Size: 601 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140718/4a5973e9/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: z1.sh
Type: application/x-sh
Size: 1464 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140718/4a5973e9/attachment-0002.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: z2.sh
Type: application/x-sh
Size: 492 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140718/4a5973e9/attachment-0003.sh>


More information about the CRIU mailing list