From dcabf6dd717ad495ba71d2788a64255defb852fd Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 26 Mar 2021 10:54:33 -0400 Subject: Remove resize race condition Since podman-remote resize requests can come in at random times, this generates a real potential for race conditions. We should only be attempting to resize TTY on running containers, but the containers can go from running to stopped at any time, and returning an error to the caller is just causing noice. This change will basically ignore requests to resize terminals if the container is not running and return the caller to success. All other callers will still return failure. Fixes: https://github.com/containers/podman/issues/9831 Signed-off-by: Daniel J Walsh --- test/system/450-interactive.bats | 3 --- 1 file changed, 3 deletions(-) (limited to 'test') diff --git a/test/system/450-interactive.bats b/test/system/450-interactive.bats index d047b9f25..a9bf52ee8 100644 --- a/test/system/450-interactive.bats +++ b/test/system/450-interactive.bats @@ -57,9 +57,6 @@ function teardown() { # ...and make sure stty under podman reads that. # FIXME: 'sleep 1' is needed for podman-remote; without it, there's - # a race condition resulting in the following warning: - # WARN[0000] failed to resize TTY: container "xx" in wrong state "stopped" - # (also "created") run_podman run -it --name mystty $IMAGE sh -c 'sleep 1;stty size' <$PODMAN_TEST_PTY is "$output" "$rows $cols" "stty under podman reads the correct dimensions" } -- cgit v1.2.3-54-g00ecf