mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
Merge pull request #28855 from Honny1/flakes-hunt
Some checks are pending
ci / path-filter (push) Waiting to run
ci / Validate source code changes (push) Waiting to run
ci / Cross Build (Linux, FreeBSD) (push) Waiting to run
ci / build debian-sid (push) Waiting to run
ci / build fedora-current (push) Waiting to run
ci / build fedora-prior (push) Waiting to run
ci / build fedora-rawhide (push) Waiting to run
ci / windows installer hyperv (push) Waiting to run
ci / windows installer wsl (push) Waiting to run
ci / macos installer (push) Waiting to run
ci / int local root debian-sid (push) Blocked by required conditions
ci / sys local root debian-sid (push) Blocked by required conditions
ci / int local rootless debian-sid (push) Blocked by required conditions
ci / sys local rootless debian-sid (push) Blocked by required conditions
ci / int remote root debian-sid (push) Blocked by required conditions
ci / sys remote root debian-sid (push) Blocked by required conditions
ci / bud local root fedora-current (push) Blocked by required conditions
ci / int local root fedora-current (push) Blocked by required conditions
ci / sys local root fedora-current (push) Blocked by required conditions
ci / int local rootless fedora-current (push) Blocked by required conditions
ci / sys local rootless fedora-current (push) Blocked by required conditions
ci / bud remote root fedora-current (push) Blocked by required conditions
ci / int remote root fedora-current (push) Blocked by required conditions
ci / sys remote root fedora-current (push) Blocked by required conditions
ci / int local root fedora-prior (push) Blocked by required conditions
ci / sys local root fedora-prior (push) Blocked by required conditions
ci / int local rootless fedora-prior (push) Blocked by required conditions
ci / sys local rootless fedora-prior (push) Blocked by required conditions
ci / int remote root fedora-prior (push) Blocked by required conditions
ci / sys remote root fedora-prior (push) Blocked by required conditions
ci / int local root fedora-rawhide (push) Blocked by required conditions
ci / sys local root fedora-rawhide (push) Blocked by required conditions
ci / int local rootless fedora-rawhide (push) Blocked by required conditions
ci / sys local rootless fedora-rawhide (push) Blocked by required conditions
ci / int remote root fedora-rawhide (push) Blocked by required conditions
ci / sys remote root fedora-rawhide (push) Blocked by required conditions
ci / apiv2 root fedora-current (push) Blocked by required conditions
ci / bindings root fedora-current (push) Blocked by required conditions
ci / compose_v2 root fedora-current (push) Blocked by required conditions
ci / docker_py root fedora-current (push) Blocked by required conditions
ci / unit root fedora-current (push) Blocked by required conditions
ci / apiv2 rootless fedora-current (push) Blocked by required conditions
ci / compose_v2 rootless fedora-current (push) Blocked by required conditions
ci / unit rootless fedora-current (push) Blocked by required conditions
ci / upgrade v5.3.1 root fedora-current (push) Blocked by required conditions
ci / upgrade v5.6.2 root fedora-current (push) Blocked by required conditions
ci / machine linux amd64 (push) Blocked by required conditions
ci / windows unit (push) Blocked by required conditions
ci / windows e2e (push) Blocked by required conditions
ci / windows machine hyperv (push) Blocked by required conditions
ci / windows machine wsl (push) Blocked by required conditions
ci / macos machine applehv (push) Blocked by required conditions
ci / macos machine libkrun (push) Blocked by required conditions
ci / Total Success (push) Blocked by required conditions
Publish swagger / Build and publish swagger.yaml (push) Waiting to run
zizmor: GitHub Actions Security Analysis / Zizmor (push) Waiting to run
Some checks are pending
ci / path-filter (push) Waiting to run
ci / Validate source code changes (push) Waiting to run
ci / Cross Build (Linux, FreeBSD) (push) Waiting to run
ci / build debian-sid (push) Waiting to run
ci / build fedora-current (push) Waiting to run
ci / build fedora-prior (push) Waiting to run
ci / build fedora-rawhide (push) Waiting to run
ci / windows installer hyperv (push) Waiting to run
ci / windows installer wsl (push) Waiting to run
ci / macos installer (push) Waiting to run
ci / int local root debian-sid (push) Blocked by required conditions
ci / sys local root debian-sid (push) Blocked by required conditions
ci / int local rootless debian-sid (push) Blocked by required conditions
ci / sys local rootless debian-sid (push) Blocked by required conditions
ci / int remote root debian-sid (push) Blocked by required conditions
ci / sys remote root debian-sid (push) Blocked by required conditions
ci / bud local root fedora-current (push) Blocked by required conditions
ci / int local root fedora-current (push) Blocked by required conditions
ci / sys local root fedora-current (push) Blocked by required conditions
ci / int local rootless fedora-current (push) Blocked by required conditions
ci / sys local rootless fedora-current (push) Blocked by required conditions
ci / bud remote root fedora-current (push) Blocked by required conditions
ci / int remote root fedora-current (push) Blocked by required conditions
ci / sys remote root fedora-current (push) Blocked by required conditions
ci / int local root fedora-prior (push) Blocked by required conditions
ci / sys local root fedora-prior (push) Blocked by required conditions
ci / int local rootless fedora-prior (push) Blocked by required conditions
ci / sys local rootless fedora-prior (push) Blocked by required conditions
ci / int remote root fedora-prior (push) Blocked by required conditions
ci / sys remote root fedora-prior (push) Blocked by required conditions
ci / int local root fedora-rawhide (push) Blocked by required conditions
ci / sys local root fedora-rawhide (push) Blocked by required conditions
ci / int local rootless fedora-rawhide (push) Blocked by required conditions
ci / sys local rootless fedora-rawhide (push) Blocked by required conditions
ci / int remote root fedora-rawhide (push) Blocked by required conditions
ci / sys remote root fedora-rawhide (push) Blocked by required conditions
ci / apiv2 root fedora-current (push) Blocked by required conditions
ci / bindings root fedora-current (push) Blocked by required conditions
ci / compose_v2 root fedora-current (push) Blocked by required conditions
ci / docker_py root fedora-current (push) Blocked by required conditions
ci / unit root fedora-current (push) Blocked by required conditions
ci / apiv2 rootless fedora-current (push) Blocked by required conditions
ci / compose_v2 rootless fedora-current (push) Blocked by required conditions
ci / unit rootless fedora-current (push) Blocked by required conditions
ci / upgrade v5.3.1 root fedora-current (push) Blocked by required conditions
ci / upgrade v5.6.2 root fedora-current (push) Blocked by required conditions
ci / machine linux amd64 (push) Blocked by required conditions
ci / windows unit (push) Blocked by required conditions
ci / windows e2e (push) Blocked by required conditions
ci / windows machine hyperv (push) Blocked by required conditions
ci / windows machine wsl (push) Blocked by required conditions
ci / macos machine applehv (push) Blocked by required conditions
ci / macos machine libkrun (push) Blocked by required conditions
ci / Total Success (push) Blocked by required conditions
Publish swagger / Build and publish swagger.yaml (push) Waiting to run
zizmor: GitHub Actions Security Analysis / Zizmor (push) Waiting to run
Fix multiple flakes
This commit is contained in:
commit
408f6e74b1
4 changed files with 15 additions and 10 deletions
|
|
@ -45,12 +45,12 @@ func (c *Container) mountSHM(shmOptions string) error {
|
|||
}
|
||||
|
||||
func (c *Container) unmountSHM(mount string) error {
|
||||
if err := unix.Unmount(mount, 0); err != nil {
|
||||
if err != syscall.EINVAL && err != syscall.ENOENT {
|
||||
return fmt.Errorf("unmounting container %s SHM mount %s: %w", c.ID(), mount, err)
|
||||
if err := unix.Unmount(mount, unix.MNT_DETACH); err != nil {
|
||||
if err == syscall.EINVAL || err == syscall.ENOENT {
|
||||
logrus.Debugf("Container %s failed to unmount %s : %v", c.ID(), mount, err)
|
||||
return nil
|
||||
}
|
||||
// If it's just an EINVAL or ENOENT, debug logs only
|
||||
logrus.Debugf("Container %s failed to unmount %s : %v", c.ID(), mount, err)
|
||||
return fmt.Errorf("unmounting container %s SHM mount %s: %w", c.ID(), mount, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ load helpers
|
|||
# exactly 10 seconds. Give it some leeway.
|
||||
delta_t=$(( $t1 - $t0 ))
|
||||
assert $delta_t -gt 8 "podman stop: ran too quickly!"
|
||||
assert $delta_t -le 14 "podman stop: took too long"
|
||||
assert $delta_t -le 18 "podman stop: took too long"
|
||||
|
||||
run_podman rm $cid
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,14 +125,16 @@ load helpers
|
|||
|
||||
# DO NOT CHANGE "sleep infinity"! This is how we get a container to
|
||||
# remain in state "stopping" for long enough to check it.
|
||||
# $1 = container name, $2 = optional stop-timeout (default 2)
|
||||
function __run_healthcheck_container() {
|
||||
local stop_timeout=${2:-2}
|
||||
run_podman run -d --name $1 \
|
||||
--health-cmd /bin/false \
|
||||
--health-interval 1s \
|
||||
--health-retries 2 \
|
||||
--health-timeout 1s \
|
||||
--health-on-failure=stop \
|
||||
--stop-timeout=2 \
|
||||
--stop-timeout=$stop_timeout \
|
||||
--health-start-period 0 \
|
||||
--stop-signal SIGTERM \
|
||||
$IMAGE sleep infinity
|
||||
|
|
@ -179,14 +181,14 @@ function __run_healthcheck_container() {
|
|||
# bats test_tags=ci:parallel
|
||||
@test "podman container rm --force doesn't leave running processes" {
|
||||
local cname=c-$(safename)
|
||||
__run_healthcheck_container $cname
|
||||
__run_healthcheck_container $cname 20
|
||||
local cid=$output
|
||||
|
||||
# We'll use the PID later to confirm that container is not running
|
||||
run_podman inspect --format '{{.State.Pid}}' $cname
|
||||
local pid=$output
|
||||
|
||||
for i in {1..10}; do
|
||||
for i in {1..20}; do
|
||||
run_podman inspect $cname --format '{{.State.Status}}'
|
||||
if [ "$output" = "stopping" ]; then
|
||||
run_podman rm -f $cname
|
||||
|
|
|
|||
|
|
@ -96,6 +96,10 @@ Log[-1].ExitCode | 1
|
|||
Log[-1].Output | \"Uh-oh on stdout!\\\nUh-oh on stderr!\\\n\"
|
||||
" "$current_time" "healthy"
|
||||
|
||||
# Capture time before systemctl checks so we don't miss the "unhealthy"
|
||||
# event that may fire during those checks (health-interval is only 1s).
|
||||
current_time=$(date --iso-8601=ns)
|
||||
|
||||
# Check that we now we do have valid podman units with this
|
||||
# name so that the leak check below does not turn into a NOP without noticing.
|
||||
run -0 systemctl list-units
|
||||
|
|
@ -110,7 +114,6 @@ Log[-1].Output | \"Uh-oh on stdout!\\\nUh-oh on stderr!\\\n\"
|
|||
run -0 systemctl show --all "$cid-*.service"
|
||||
assert "$output" =~ "StartLimitIntervalUSec=0" "The hc service has the right interval set"
|
||||
|
||||
current_time=$(date --iso-8601=ns)
|
||||
# After three successive failures, container should no longer be healthy
|
||||
_check_health $ctrname "Four or more failures" "
|
||||
Status | \"unhealthy\"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue