diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-11-17 12:02:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 12:02:37 +0100 |
commit | 85733e0b4a1d246debcc453f4248cbd9bb91a9d1 (patch) | |
tree | aa775d674d2e499972066c56e6da34ec2682cdce /pkg/checkpoint/checkpoint_restore.go | |
parent | bd6fbb190ba701ff77c084a36b05e64ba9884a78 (diff) | |
parent | 33ec8c6698473ab650df65b958e910e03e240fe6 (diff) | |
download | podman-85733e0b4a1d246debcc453f4248cbd9bb91a9d1.tar.gz podman-85733e0b4a1d246debcc453f4248cbd9bb91a9d1.tar.bz2 podman-85733e0b4a1d246debcc453f4248cbd9bb91a9d1.zip |
Merge pull request #12281 from vrothberg/fix-12007
fix remote checkpoint/restore
Diffstat (limited to 'pkg/checkpoint/checkpoint_restore.go')
-rw-r--r-- | pkg/checkpoint/checkpoint_restore.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/checkpoint/checkpoint_restore.go b/pkg/checkpoint/checkpoint_restore.go index da82c9745..3a300daaf 100644 --- a/pkg/checkpoint/checkpoint_restore.go +++ b/pkg/checkpoint/checkpoint_restore.go @@ -16,6 +16,7 @@ import ( "github.com/containers/podman/v3/pkg/domain/entities" "github.com/containers/podman/v3/pkg/errorhandling" "github.com/containers/podman/v3/pkg/specgen/generate" + "github.com/containers/podman/v3/pkg/specgenutil" "github.com/containers/storage/pkg/archive" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" @@ -195,7 +196,12 @@ func CRImportCheckpoint(ctx context.Context, runtime *libpod.Runtime, restoreOpt } if len(restoreOptions.PublishPorts) > 0 { - ports, err := generate.ParsePortMapping(restoreOptions.PublishPorts, nil) + pubPorts, err := specgenutil.CreatePortBindings(restoreOptions.PublishPorts) + if err != nil { + return nil, err + } + + ports, err := generate.ParsePortMapping(pubPorts, nil) if err != nil { return nil, err } |