mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
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>
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user