aboutsummaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-10-20 14:32:33 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-10-21 13:31:40 -0400
commitcddfe3983be63ee5193a19fb6669600f059a839f (patch)
tree92a74d3f25a7a2548d4cff9cb5986b424d38be5c /libpod/define
parent36682115b0f3f5f7cfcc6bc4580e5a7435b9a4d8 (diff)
downloadpodman-cddfe3983be63ee5193a19fb6669600f059a839f.tar.gz
podman-cddfe3983be63ee5193a19fb6669600f059a839f.tar.bz2
podman-cddfe3983be63ee5193a19fb6669600f059a839f.zip
Add a Degraded state to pods
Make a distinction between pods that are completely running (all containers running) and those that have some containers going, but not all, by introducing an intermediate state between Stopped and Running called Degraded. A Degraded pod has at least one, but not all, containers running; a Running pod has all containers running. First step to a solution for #7213. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/podstate.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/libpod/define/podstate.go b/libpod/define/podstate.go
index 2b59aabfb..e02671972 100644
--- a/libpod/define/podstate.go
+++ b/libpod/define/podstate.go
@@ -10,9 +10,12 @@ const (
PodStateExited = "Exited"
// PodStatePaused indicates the pod has been paused
PodStatePaused = "Paused"
- // PodStateRunning indicates that one or more of the containers in
- // the pod is running
+ // PodStateRunning indicates that all of the containers in the pod are
+ // running.
PodStateRunning = "Running"
+ // PodStateDegraded indicates that at least one, but not all, of the
+ // containers in the pod are running.
+ PodStateDegraded = "Degraded"
// PodStateStopped indicates all of the containers belonging to the pod
// are stopped.
PodStateStopped = "Stopped"