summaryrefslogtreecommitdiff
path: root/libpod/container_inspect.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-09-22 16:11:50 +0200
committerMatthew Heon <matthew.heon@pm.me>2021-09-22 16:36:31 -0400
commit909cbfe217204ef6beceea9f6983974338d524e1 (patch)
tree1093c76d7f0f8e55c9eea3d58bbad4baafa8272e /libpod/container_inspect.go
parent8971509468de9d914314a1c77b445e118300eb0e (diff)
downloadpodman-909cbfe217204ef6beceea9f6983974338d524e1.tar.gz
podman-909cbfe217204ef6beceea9f6983974338d524e1.tar.bz2
podman-909cbfe217204ef6beceea9f6983974338d524e1.zip
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 <pholzing@redhat.com>
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r--libpod/container_inspect.go2
1 files changed, 1 insertions, 1 deletions
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)