summaryrefslogtreecommitdiff
path: root/libpod/container_inspect.go
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2021-09-07 14:16:01 -0400
committerMatthew Heon <mheon@redhat.com>2021-09-07 14:16:01 -0400
commitbfcd83ecd680fccd2efeadf695a9cd2c603a997f (patch)
treeb0fe8aa8c509228c00d818cff4c13b20f2b83223 /libpod/container_inspect.go
parent536f23c0b78dd8feafee4e40b743988dbb03bfa2 (diff)
downloadpodman-bfcd83ecd680fccd2efeadf695a9cd2c603a997f.tar.gz
podman-bfcd83ecd680fccd2efeadf695a9cd2c603a997f.tar.bz2
podman-bfcd83ecd680fccd2efeadf695a9cd2c603a997f.zip
Add Checkpointed bool to Inspect
When inspecting a container, we now report whether the container was stopped by a `podman checkpoint` operation via a new bool in the State portion of inspected, `Checkpointed`. Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r--libpod/container_inspect.go25
1 files changed, 13 insertions, 12 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index 97318a2e8..2ef4532cd 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -103,18 +103,19 @@ func (c *Container) getContainerInspectData(size bool, driverData *define.Driver
Path: path,
Args: args,
State: &define.InspectContainerState{
- OciVersion: ctrSpec.Version,
- Status: runtimeInfo.State.String(),
- Running: runtimeInfo.State == define.ContainerStateRunning,
- Paused: runtimeInfo.State == define.ContainerStatePaused,
- OOMKilled: runtimeInfo.OOMKilled,
- Dead: runtimeInfo.State.String() == "bad state",
- Pid: runtimeInfo.PID,
- ConmonPid: runtimeInfo.ConmonPID,
- ExitCode: runtimeInfo.ExitCode,
- Error: "", // can't get yet
- StartedAt: runtimeInfo.StartedTime,
- FinishedAt: runtimeInfo.FinishedTime,
+ OciVersion: ctrSpec.Version,
+ Status: runtimeInfo.State.String(),
+ Running: runtimeInfo.State == define.ContainerStateRunning,
+ Paused: runtimeInfo.State == define.ContainerStatePaused,
+ OOMKilled: runtimeInfo.OOMKilled,
+ Dead: runtimeInfo.State.String() == "bad state",
+ Pid: runtimeInfo.PID,
+ ConmonPid: runtimeInfo.ConmonPID,
+ ExitCode: runtimeInfo.ExitCode,
+ Error: "", // can't get yet
+ StartedAt: runtimeInfo.StartedTime,
+ FinishedAt: runtimeInfo.FinishedTime,
+ Checkpointed: runtimeInfo.Checkpointed,
},
Image: config.RootfsImageID,
ImageName: config.RootfsImageName,