summaryrefslogtreecommitdiff
path: root/cmd/podman/common/create_opts.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2021-12-15 13:32:57 -0600
committerBrent Baude <bbaude@redhat.com>2022-01-06 13:56:54 -0600
commit2a524fcaec4e6f66461d7cdda1bb73ed7c50f026 (patch)
treea9aa7d871da64cb5c70b5d139bdde3cc4481184f /cmd/podman/common/create_opts.go
parent2fd6c2ee89e92ced8568d7ed3ea3f04017b154ed (diff)
downloadpodman-2a524fcaec4e6f66461d7cdda1bb73ed7c50f026.tar.gz
podman-2a524fcaec4e6f66461d7cdda1bb73ed7c50f026.tar.bz2
podman-2a524fcaec4e6f66461d7cdda1bb73ed7c50f026.zip
fix healthcheck timeouts and ut8 coercion
this commit fixes two bugs and adds regression tests. when getting healthcheck values from an image, if the image does not have a timeout defined, this resulted in a 0 value for timeout. The default as described in the man pages is 30s. when inspecting a container with a healthcheck command, a customer observed that the &, <, and > characters were being converted into a unicode escape value. It turns out json marshalling will by default coerce string values to ut8. Fixes: bz2028408 Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/common/create_opts.go')
-rw-r--r--cmd/podman/common/create_opts.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index f2335a2be..297188a45 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -11,6 +11,7 @@ import (
"github.com/containers/common/pkg/cgroups"
"github.com/containers/common/pkg/config"
"github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/libpod/network/types"
"github.com/containers/podman/v3/pkg/api/handlers"
"github.com/containers/podman/v3/pkg/domain/entities"
@@ -304,10 +305,10 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *c
VolumesFrom: cc.HostConfig.VolumesFrom,
Workdir: cc.Config.WorkingDir,
Net: &netInfo,
- HealthInterval: DefaultHealthCheckInterval,
- HealthRetries: DefaultHealthCheckRetries,
- HealthTimeout: DefaultHealthCheckTimeout,
- HealthStartPeriod: DefaultHealthCheckStartPeriod,
+ HealthInterval: define.DefaultHealthCheckInterval,
+ HealthRetries: define.DefaultHealthCheckRetries,
+ HealthTimeout: define.DefaultHealthCheckTimeout,
+ HealthStartPeriod: define.DefaultHealthCheckStartPeriod,
}
if !rootless.IsRootless() {
var ulimits []string