diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-09-22 16:11:50 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-09-22 17:40:16 +0200 |
commit | db44addf973671f3bbe420ebe1a63d01ef39d60c (patch) | |
tree | 62c5c09676d2a7842ac1c41216b0c73f495e5167 /libpod/container_inspect.go | |
parent | 8e2d25e93706190acf25bcf74bd18cdf98fb3a12 (diff) | |
download | podman-db44addf973671f3bbe420ebe1a63d01ef39d60c.tar.gz podman-db44addf973671f3bbe420ebe1a63d01ef39d60c.tar.bz2 podman-db44addf973671f3bbe420ebe1a63d01ef39d60c.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.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index e65c86cef..42d8da52d 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) |