Skip to content

Commit 6cbd8e2

Browse files
authored
Merge pull request #1076 from rajasec/checkpoint-create
Container must not checkpoint in created state
2 parents cce5713 + a60040c commit 6cbd8e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

checkpoint.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ checkpointed.`,
3838
if err != nil {
3939
return err
4040
}
41+
status, err := container.Status()
42+
if err != nil {
43+
return(err)
44+
}
45+
if status == libcontainer.Created {
46+
fatalf("Container cannot be checkpointed in created state")
47+
}
4148
defer destroy(container)
4249
options := criuOptions(context)
4350
// these are the mandatory criu options for a container

0 commit comments

Comments
 (0)