Skip to content

Commit a60040c

Browse files
committed
Container must not checkpoint in created state
Signed-off-by: rajasec <[email protected]>
1 parent e83ccf6 commit a60040c

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)