mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
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 <areber@redhat.com>
This commit is contained in:
@@ -192,6 +192,11 @@ func (r *Runtime) initContainerVariables(rSpec *spec.Spec, config *ContainerConf
|
||||
}
|
||||
// Reset the log path to point to the default
|
||||
ctr.config.LogPath = ""
|
||||
// Later in validate() the check is for nil. JSONDeepCopy sets it to an empty
|
||||
// object. Resetting it to nil if it was nil before.
|
||||
if config.StaticMAC == nil {
|
||||
ctr.config.StaticMAC = nil
|
||||
}
|
||||
}
|
||||
|
||||
ctr.config.Spec = rSpec
|
||||
|
||||
@@ -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 != "" {
|
||||
|
||||
@@ -1081,10 +1081,6 @@ var _ = Describe("Podman checkpoint", func() {
|
||||
})
|
||||
|
||||
namespaceCombination := []string{
|
||||
"cgroup,ipc,net,uts,pid",
|
||||
"cgroup,ipc,net,uts",
|
||||
"cgroup,ipc,net",
|
||||
"cgroup,ipc",
|
||||
"ipc,net,uts,pid",
|
||||
"ipc,net,uts",
|
||||
"ipc,net",
|
||||
|
||||
Reference in New Issue
Block a user