Persist container and sandbox if resource cleanup fails, like teardownPodNetwork
Signed-off-by: Qiutong Song <songqt01@gmail.com>
This commit is contained in:
@@ -348,3 +348,12 @@ func (c *criService) taskOpts(runtimeType string) []containerd.NewTaskOpts {
|
||||
|
||||
return taskOpts
|
||||
}
|
||||
|
||||
func (c *criService) updateNetNamespacePath(spec *runtimespec.Spec, nsPath string) {
|
||||
for i := range spec.Linux.Namespaces {
|
||||
if spec.Linux.Namespaces[i].Type == runtimespec.NetworkNamespace {
|
||||
spec.Linux.Namespaces[i].Path = nsPath
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user