Fixing checkpoint issue

Signed-off-by: Rajasekaran <rajasec79@gmail.com>
This commit is contained in:
Rajasekaran 2015-09-04 16:20:45 +05:30
parent 0f85e4e1a3
commit 57cc442c13
1 changed files with 7 additions and 0 deletions

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 {