-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman attach prints nothing until modification #6253
Comments
A friendly reminder that this issue had no activity for 30 days. |
@mheon PTAL |
I got a message |
I think we must have changed something about how resize is handled that broke this. We used to unconditionally resize the screen, which would trigger terminal prompts to re-display. It looks like this was disabled at some point, though... |
Alright, this is not as simple as I assumed. We are actually sending a resize event, but it's not forcing a redraw of the terminal. Further, I'm seeing that detaching from an attach session is actively killing the container, which is definitely not good. |
Also, very confusing: I have no idea where the "normal attach" error message is coming from. That string exists nowhere in Podman or Conmon, nor do I see any obvious string composition of error messages. |
Ah, found it - looks like leftover debug from a c/image update from @vrothberg that slipped into the v2.0 branch and nowhere else. |
I tested it again. Something else that I found: podman leaves the container with unclean output.
I got my old prompt from the host system. But the output of htop is still hanging around until I override it with some other content. |
Ah, think I have it. We need to send a SIGWINCH to the container to force redraw after attach completes. |
#7592 to fix |
Basically, we want to force the application in the container to (iff the container was made with a terminal) redraw said terminal immediately after an attach completes, so the fresh Attach session will be able to see what's going on (e.g. will have a shell prompt). Our current attach functions are unfortunately geared more towards `podman run` than `podman attach` and will start forwarding resize events *immediately* instead of waiting until the attach session is alive (much safer for short-lived `podman run` sessions, but broken for the `podman attach` case). To avoid a major rewrite, let's just manually send a SIGWINCH after attach succeeds to force a redraw. Fixes containers#6253 Signed-off-by: Matthew Heon <[email protected]>
I came across this bug as well. Is it possible to also print a newline when detaching? Docker prints |
Can you open a fresh bug about that? But sure, that should be doable. |
Description
If I attach to a container the terminal is still empty until:
I could not find any other issue with that problem.
/kind bug
Steps to reproduce the issue:
podman run --name test -it debian bash
podman attach test
Describe the results you expected:
I would expect that there is an output without modify the screen size or the content.
docker
handles this case better.Output of
podman version
:The text was updated successfully, but these errors were encountered: