summaryrefslogtreecommitdiff
path: root/libpod/container_inspect.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-04-01 19:20:03 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-05-03 10:36:16 -0400
commitf4db6d5cf61741f9b0de163b158ecdc2bcfa6669 (patch)
tree5fe2d6ca45412231af907946e4a31d6efb0c4305 /libpod/container_inspect.go
parentdc42304f3804632d01345478ab9b1f122b48d516 (diff)
downloadpodman-f4db6d5cf61741f9b0de163b158ecdc2bcfa6669.tar.gz
podman-f4db6d5cf61741f9b0de163b158ecdc2bcfa6669.tar.bz2
podman-f4db6d5cf61741f9b0de163b158ecdc2bcfa6669.zip
Add support for retry count with --restart flag
The on-failure restart option supports restarting only a given number of times. To do this, we need one additional field in the DB to track restart count (which conveniently fills a field in Inspect we weren't populating), plus some plumbing logic. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r--libpod/container_inspect.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index aa3a07888..a7369bfdd 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -95,6 +95,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
LogPath: config.LogPath,
ConmonPidFile: config.ConmonPidFile,
Name: config.Name,
+ RestartCount: int32(runtimeInfo.RestartCount),
Driver: driverData.Name,
MountLabel: config.MountLabel,
ProcessLabel: config.ProcessLabel,