add image name and runtime name media types; remove task operation on checkpoint

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett
2018-09-17 13:48:46 -04:00
parent ce0673fd7d
commit 147208061c
4 changed files with 123 additions and 63 deletions

View File

@@ -332,6 +332,17 @@ var checkpointCommand = cli.Command{
if err != nil {
return err
}
task, err := container.Task(ctx, nil)
if err != nil {
if !errdefs.IsNotFound(err) {
return err
}
}
if err := task.Pause(ctx); err != nil {
return err
}
defer task.Resume(ctx)
if _, err := container.Checkpoint(ctx, ref, opts...); err != nil {
return err
}
@@ -378,6 +389,7 @@ var restoreCommand = cli.Command{
}
opts := []containerd.RestoreOpts{
containerd.WithRestoreImage,
containerd.WithRestoreSpec,
containerd.WithRestoreSnapshot,
containerd.WithRestoreRuntime,