Container must not checkpoint in created state

Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
rajasec 2016-09-25 21:09:23 +05:30
parent e83ccf62aa
commit a60040c62d
1 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,13 @@ checkpointed.`,
if err != nil {
return err
}
status, err := container.Status()
if err != nil {
return(err)
}
if status == libcontainer.Created {
fatalf("Container cannot be checkpointed in created state")
}
defer destroy(container)
options := criuOptions(context)
// these are the mandatory criu options for a container