mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #2260 from adrianreber/leave-running
checkpoint: remove error message with --leave-running
This commit is contained in:
+8
-1
@@ -62,8 +62,15 @@ checkpointed.`,
|
||||
if status == libcontainer.Created || status == libcontainer.Stopped {
|
||||
fatalf("Container cannot be checkpointed in %s state", status.String())
|
||||
}
|
||||
defer destroy(container)
|
||||
options := criuOptions(context)
|
||||
if !options.LeaveRunning || !options.PreDump {
|
||||
// destroy prints out an error if we tell CRIU to
|
||||
// leave the container running:
|
||||
// ERRO[0000] container is not destroyed
|
||||
// The message is correct, but we actually do not want
|
||||
// to destroy the container in this case.
|
||||
defer destroy(container)
|
||||
}
|
||||
// these are the mandatory criu options for a container
|
||||
setPageServer(context, options)
|
||||
setManageCgroupsMode(context, options)
|
||||
|
||||
Reference in New Issue
Block a user