-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to migrate containers #2272
Add support to migrate containers #2272
Commits on Jun 3, 2019
-
Fix restore options help text and comments
Signed-off-by: Adrian Reber <areber@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for e0c8c14 - Browse repository at this point
Copy the full SHA e0c8c14View commit details -
Added helper functions for container migration
This adds a couple of function in structure members needed in the next commit to make container migration actually work. This just splits of the function which are not modifying existing code. Signed-off-by: Adrian Reber <areber@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for a05cfd2 - Browse repository at this point
Copy the full SHA a05cfd2View commit details -
Added support to migrate containers
This commit adds an option to the checkpoint command to export a checkpoint into a tar.gz file as well as importing a checkpoint tar.gz file during restore. With all checkpoint artifacts in one file it is possible to easily transfer a checkpoint and thus enabling container migration in Podman. With the following steps it is possible to migrate a running container from one system (source) to another (destination). Source system: * podman container checkpoint -l -e /tmp/checkpoint.tar.gz * scp /tmp/checkpoint.tar.gz destination:/tmp Destination system: * podman pull 'container-image-as-on-source-system' * podman container restore -i /tmp/checkpoint.tar.gz The exported tar.gz file contains the checkpoint image as created by CRIU and a few additional JSON files describing the state of the checkpointed container. Now the container is running on the destination system with the same state just as during checkpointing. If the container is kept running on the source system with the checkpoint flag '-R', the result will be that the same container is running on two different hosts. Signed-off-by: Adrian Reber <areber@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 0028578 - Browse repository at this point
Copy the full SHA 0028578View commit details -
Add test case for container migration
The difference between container checkpoint/restore and container migration is that for migration the container which was checkpointed must not exist during restore. To simulate migration the container is remove ('podman rm -fa') before being restored. The migration test does following steps: * podman run * podman container checkpoint -l -e /tmp/checkpoint.tar.gz * podman rm -fa * podman container restore -i /tmp/checkpoint.tar.gz Signed-off-by: Adrian Reber <areber@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 2aa3261 - Browse repository at this point
Copy the full SHA 2aa3261View commit details -
Added bash completion for container migration
Signed-off-by: Adrian Reber <areber@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 7b1ab8a - Browse repository at this point
Copy the full SHA 7b1ab8aView commit details -
Add man-pages for container migration
Signed-off-by: Adrian Reber <areber@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 42e903d - Browse repository at this point
Copy the full SHA 42e903dView commit details -
Include container migration into tutorial
Signed-off-by: Adrian Reber <areber@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for a4d3333 - Browse repository at this point
Copy the full SHA a4d3333View commit details -
Also download container images during restore
If restoring a container from a checkpoint it was necessary that the image the container is based was already available (podman pull). This commit adds the image download to podman container restore if it does not exist. Signed-off-by: Adrian Reber <areber@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 0e072f9 - Browse repository at this point
Copy the full SHA 0e072f9View commit details
Commits on Jun 4, 2019
-
migration: add possibility to restore a container with a new name
The option to restore a container from an external checkpoint archive (podman container restore -i /tmp/checkpoint.tar.gz) restores a container with the same name and same ID as id had before checkpointing. This commit adds the option '--name,-n' to 'podman container restore'. With this option the restored container gets the name specified after '--name,-n' and a new ID. This way it is possible to restore one container multiple times. If a container is restored with a new name Podman will not try to request the same IP address for the container as it had during checkpointing. This implicitly assumes that if a container is restored from a checkpoint archive with a different name, that it will be restored multiple times and restoring a container multiple times with the same IP address will fail as each IP address can only be used once. Signed-off-by: Adrian Reber <areber@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for bef83c4 - Browse repository at this point
Copy the full SHA bef83c4View commit details