From 4b90542d5be977db79abbbfc442aca3553024246 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Fri, 11 Feb 2022 10:16:02 +0000 Subject: Fix checkpoint/restore pod tests Checkpoint/restore pod tests are not running with an older runc and now that runc 1.1.0 appears in the repositories it was detected that the tests were failing. This was not detected in CI as CI was not using runc 1.1.0 yet. Signed-off-by: Adrian Reber --- pkg/checkpoint/checkpoint_restore.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pkg') diff --git a/pkg/checkpoint/checkpoint_restore.go b/pkg/checkpoint/checkpoint_restore.go index 1ebd6a455..270b5b6c4 100644 --- a/pkg/checkpoint/checkpoint_restore.go +++ b/pkg/checkpoint/checkpoint_restore.go @@ -140,6 +140,13 @@ func CRImportCheckpoint(ctx context.Context, runtime *libpod.Runtime, restoreOpt return nil, errors.Errorf("pod %s does not share the network namespace", ctrConfig.Pod) } ctrConfig.NetNsCtr = infraContainer.ID() + for net, opts := range ctrConfig.Networks { + opts.StaticIPs = nil + opts.StaticMAC = nil + ctrConfig.Networks[net] = opts + } + ctrConfig.StaticIP = nil + ctrConfig.StaticMAC = nil } if ctrConfig.PIDNsCtr != "" { -- cgit v1.2.3-54-g00ecf