From 909cbfe217204ef6beceea9f6983974338d524e1 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 22 Sep 2021 16:11:50 +0200 Subject: sync container state before reading the healthcheck The health check result is stored in the container state. Since the state can change or might not even be set we have to retrive the current state before we try to read the health check result. Fixes #11687 Signed-off-by: Paul Holzinger --- libpod/container_inspect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod/container_inspect.go') diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index 2ef4532cd..9fcf13d53 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -151,7 +151,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *define.Driver if c.config.HealthCheckConfig != nil { // This container has a healthcheck defined in it; we need to add it's state - healthCheckState, err := c.GetHealthCheckLog() + healthCheckState, err := c.getHealthCheckLog() if err != nil { // An error here is not considered fatal; no health state will be displayed logrus.Error(err) -- cgit v1.2.3-54-g00ecf