From f4db6d5cf61741f9b0de163b158ecdc2bcfa6669 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 1 Apr 2019 19:20:03 -0400 Subject: 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 --- pkg/inspect/inspect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/inspect/inspect.go') diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go index 6978370ef..693755aa8 100644 --- a/pkg/inspect/inspect.go +++ b/pkg/inspect/inspect.go @@ -161,7 +161,7 @@ type ContainerInspectData struct { LogPath string `json:"LogPath"` ConmonPidFile string `json:"ConmonPidFile"` Name string `json:"Name"` - RestartCount int32 `json:"RestartCount"` //TODO + RestartCount int32 `json:"RestartCount"` Driver string `json:"Driver"` MountLabel string `json:"MountLabel"` ProcessLabel string `json:"ProcessLabel"` -- cgit v1.2.3-54-g00ecf