Merge pull request #1669 from Mashimiao/stopped-checkpoint

stopped container can't be checkpoint
This commit is contained in:
Michael Crosby 2017-12-10 21:39:13 -05:00 committed by GitHub
commit bdee9adedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)