diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-10-08 14:12:58 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-10-10 10:25:06 -0400 |
commit | feba94eb95f93fd571efff039cb7d7cdb5139169 (patch) | |
tree | b1ef3ed2c7278599c0df6f17971fa28a035a248d /cmd/podman/system_migrate.go | |
parent | c3c40f970e6441b70ac62fb050a35f79fedb8896 (diff) | |
download | podman-feba94eb95f93fd571efff039cb7d7cdb5139169.tar.gz podman-feba94eb95f93fd571efff039cb7d7cdb5139169.tar.bz2 podman-feba94eb95f93fd571efff039cb7d7cdb5139169.zip |
Migrate can move containers to a new runtime
This is a horrible hack to work around issues with Fedora 31, but
other distros might need it to, so we'll move it upstream.
I do not recommend this functionality for general use, and the
manpages and other documentation will reflect this. But for some
upgrade cases, it will be the only thing that allows for a
working system.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd/podman/system_migrate.go')
-rw-r--r-- | cmd/podman/system_migrate.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/system_migrate.go b/cmd/podman/system_migrate.go index 4a0afcfad..9c90aeb52 100644 --- a/cmd/podman/system_migrate.go +++ b/cmd/podman/system_migrate.go @@ -32,13 +32,15 @@ func init() { migrateCommand.Command = _migrateCommand migrateCommand.SetHelpTemplate(HelpTemplate()) migrateCommand.SetUsageTemplate(UsageTemplate()) + flags := migrateCommand.Flags() + flags.StringVar(&migrateCommand.NewRuntime, "new-runtime", "", "Specify a new runtime for all containers") } func migrateCmd(c *cliconfig.SystemMigrateValues) error { // We need to pass one extra option to NewRuntime. // This will inform the OCI runtime to start a migrate. // That's controlled by the last argument to GetRuntime. - r, err := libpodruntime.GetRuntimeMigrate(getContext(), &c.PodmanCommand) + r, err := libpodruntime.GetRuntimeMigrate(getContext(), &c.PodmanCommand, c.NewRuntime) if err != nil { return errors.Wrapf(err, "error migrating containers") } |