[CRIU] Podman container migration

Adrian Reber adrian at lisas.de
Wed Jan 9 17:16:38 MSK 2019


I started to look into migrating containers with Podman and I am
currently stuck at files which are bind-mounted into the container:

If I checkpoint a container and restore it, it works.

If I checkpoint a container and transfer the checkpoint to another
container it only works if the previous container is running, as
CRIU fails to mount the file into the container.

Following is from the checkpointed container:

        {
            "fstype": 5, 
            "mnt_id": 368, 
            "root_dev": "0:20", 
            "parent_mnt_id": 367, 
            "flags": "0x1000006", 
            "root": "/containers/storage/overlay-containers/43d02fb390d236ec42c5119b6655be44157e4a61103bc827db3b0718feecc898/userdata/run/secrets", 
            "mountpoint": "/run/secrets", 
            "source": "tmpfs", 
            "options": "size=2899748k,nr_inodes=724937,mode=755", 
            "shared_id": 0, 
            "master_id": 0, 
            "sb_flags": "0x0", 
            "ext_key": "/run/secrets"
        }, 


The main problem I see is that the storage location of the checkpointed
container is part of "root".

Or do I have to make sure that the migrated container is using the same
paths as the restored container.

I get the following error during restore, if I copy the checkpoint to another
container.

(00.009274)      1: mnt: Start with 0:/tmp/.criu.mntns.d6UW28
(00.009279)      1: mnt: 	Mounting overlay @/tmp/.criu.mntns.d6UW28/12-0000000000/ (0)
(00.009285)      1: mnt: 367:/tmp/.criu.mntns.d6UW28/12-0000000000/ private 1 shared 0 slave 0
(00.009295)      1: mnt: 	Mounting tmpfs @/tmp/.criu.mntns.d6UW28/12-0000000000/run/secrets (0)
(00.009297)      1: mnt: 	Bind /var/run/containers/storage/overlay-containers/43d02fb390d236ec42c5119b6655be44157e4a61103bc827db3b0718feecc898/userdata/run/secrets to /tmp/.criu.mntns.d6UW28/12-0000000000/run/secrets
(00.009326)      1: Error (criu/mount.c:2279): mnt: Can't mount at /tmp/.criu.mntns.d6UW28/12-0000000000/run/secrets: No such file or directory
(00.009331)      1: mnt: Start with 0:/tmp/.criu.mntns.d6UW28
(00.027848) Error (criu/mount.c:3274): mnt: Can't remove the directory /tmp/.criu.mntns.d6UW28: No such file or directory
(00.027860) Error (criu/cr-restore.c:2300): Restoring FAILED.

The checkpointed container has the ID 43d02fb390d236ec42c5119b6655be44157e4a61103bc827db3b0718feecc898
and the restored container has the ID 5ff14ac246ec6624c9667767532436d6fa5e3abda2b4437dc4b0db2ff1ff661a

How do I tell CRIU to use another directory for the bind mount?

		Adrian


More information about the CRIU mailing list