Merge pull request #248 from rajasec/fixcheckpoint

Fixing checkpoint issue
This commit is contained in:
Mrunal Patel
2015-09-14 13:53:54 -07:00
+7
View File
@@ -30,6 +30,13 @@ var checkpointCommand = cli.Command{
fatal(err)
}
options := criuOptions(context)
status, err := container.Status()
if err != nil {
fatal(err)
}
if status == libcontainer.Checkpointed {
fatal(fmt.Errorf("Container with id %s already checkpointed", context.GlobalString("id")))
}
// these are the mandatory criu options for a container
setPageServer(context, options)
if err := container.Checkpoint(options); err != nil {