diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-19 02:38:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-19 02:38:26 +0200 |
commit | deb087d7b173832138c2e46ab4b7b626a98a910c (patch) | |
tree | a9d93d164fe83ba7229d17fd593639b7883fd8a2 /pkg/adapter | |
parent | b59abdc1b1cf72d86d3fe6bb76ba646870c86ed6 (diff) | |
parent | c70657a6d1fc15ba60d4bb0fc197f4c70fa59cac (diff) | |
download | podman-deb087d7b173832138c2e46ab4b7b626a98a910c.tar.gz podman-deb087d7b173832138c2e46ab4b7b626a98a910c.tar.bz2 podman-deb087d7b173832138c2e46ab4b7b626a98a910c.zip |
Merge pull request #3443 from adrianreber/rootfs-changes-migration
Include changes to the container's root file-system in the checkpoint archive
Diffstat (limited to 'pkg/adapter')
-rw-r--r-- | pkg/adapter/checkpoint_restore.go | 1 | ||||
-rw-r--r-- | pkg/adapter/containers.go | 5 | ||||
-rw-r--r-- | pkg/adapter/containers_remote.go | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/pkg/adapter/checkpoint_restore.go b/pkg/adapter/checkpoint_restore.go index ec1464fb1..533e9e3a2 100644 --- a/pkg/adapter/checkpoint_restore.go +++ b/pkg/adapter/checkpoint_restore.go @@ -58,6 +58,7 @@ func crImportCheckpoint(ctx context.Context, runtime *libpod.Runtime, input stri "checkpoint", "artifacts", "ctr.log", + "rootfs-diff.tar", "network.status", }, } diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go index 86e9c0266..7e2384e18 100644 --- a/pkg/adapter/containers.go +++ b/pkg/adapter/containers.go @@ -524,6 +524,10 @@ func (r *LocalRuntime) Checkpoint(c *cliconfig.CheckpointValues) error { KeepRunning: c.LeaveRunning, TCPEstablished: c.TcpEstablished, TargetFile: c.Export, + IgnoreRootfs: c.IgnoreRootfs, + } + if c.Export == "" && c.IgnoreRootfs { + return errors.Errorf("--ignore-rootfs can only be used with --export") } if c.All { containers, err = r.Runtime.GetRunningContainers() @@ -560,6 +564,7 @@ func (r *LocalRuntime) Restore(ctx context.Context, c *cliconfig.RestoreValues) TCPEstablished: c.TcpEstablished, TargetFile: c.Import, Name: c.Name, + IgnoreRootfs: c.IgnoreRootfs, } filterFuncs = append(filterFuncs, func(c *libpod.Container) bool { diff --git a/pkg/adapter/containers_remote.go b/pkg/adapter/containers_remote.go index c816fd980..fc23381a4 100644 --- a/pkg/adapter/containers_remote.go +++ b/pkg/adapter/containers_remote.go @@ -669,6 +669,9 @@ func (r *LocalRuntime) Checkpoint(c *cliconfig.CheckpointValues) error { if c.Export != "" { return errors.New("the remote client does not support exporting checkpoints") } + if c.IgnoreRootfs { + return errors.New("the remote client does not support --ignore-rootfs") + } var lastError error ids, err := iopodman.GetContainersByContext().Call(r.Conn, c.All, c.Latest, c.InputArgs) @@ -709,6 +712,9 @@ func (r *LocalRuntime) Restore(ctx context.Context, c *cliconfig.RestoreValues) if c.Import != "" { return errors.New("the remote client does not support importing checkpoints") } + if c.IgnoreRootfs { + return errors.New("the remote client does not support --ignore-rootfs") + } var lastError error ids, err := iopodman.GetContainersByContext().Call(r.Conn, c.All, c.Latest, c.InputArgs) |