stopped container can't be checkpoint

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
This commit is contained in:
Ma Shimiao 2017-12-07 15:43:56 +08:00
parent e8149af291
commit 5061fd3e6e
1 changed files with 2 additions and 2 deletions

View File

@ -56,8 +56,8 @@ checkpointed.`,
if err != nil {
return err
}
if status == libcontainer.Created {
fatalf("Container cannot be checkpointed in created state")
if status == libcontainer.Created || status == libcontainer.Stopped {
fatalf("Container cannot be checkpointed in %s state", status.String())
}
defer destroy(container)
options := criuOptions(context)