Merge pull request #2425 from avagin/docker-fixes
task: allow to specify namespaces which are restored externally
This commit is contained in:
commit
26e2dd6754
@ -78,13 +78,23 @@ func withExit(rt string) containerd.CheckpointTaskOpts {
|
|||||||
return func(r *containerd.CheckpointTaskInfo) error {
|
return func(r *containerd.CheckpointTaskInfo) error {
|
||||||
switch rt {
|
switch rt {
|
||||||
case "io.containerd.runc.v1":
|
case "io.containerd.runc.v1":
|
||||||
|
if r.Options == nil {
|
||||||
r.Options = &options.CheckpointOptions{
|
r.Options = &options.CheckpointOptions{
|
||||||
Exit: true,
|
Exit: true,
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
opts, _ := r.Options.(*options.CheckpointOptions)
|
||||||
|
opts.Exit = true
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
|
if r.Options == nil {
|
||||||
r.Options = &runctypes.CheckpointOptions{
|
r.Options = &runctypes.CheckpointOptions{
|
||||||
Exit: true,
|
Exit: true,
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
opts, _ := r.Options.(*runctypes.CheckpointOptions)
|
||||||
|
opts.Exit = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user