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,12 +78,22 @@ func withExit(rt string) containerd.CheckpointTaskOpts {
|
||||
return func(r *containerd.CheckpointTaskInfo) error {
|
||||
switch rt {
|
||||
case "io.containerd.runc.v1":
|
||||
r.Options = &options.CheckpointOptions{
|
||||
Exit: true,
|
||||
if r.Options == nil {
|
||||
r.Options = &options.CheckpointOptions{
|
||||
Exit: true,
|
||||
}
|
||||
} else {
|
||||
opts, _ := r.Options.(*options.CheckpointOptions)
|
||||
opts.Exit = true
|
||||
}
|
||||
default:
|
||||
r.Options = &runctypes.CheckpointOptions{
|
||||
Exit: true,
|
||||
if r.Options == nil {
|
||||
r.Options = &runctypes.CheckpointOptions{
|
||||
Exit: true,
|
||||
}
|
||||
} else {
|
||||
opts, _ := r.Options.(*runctypes.CheckpointOptions)
|
||||
opts.Exit = true
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user