-
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
non-tty logs/container attach format broken #16856
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Comments
Is it always 5 seconds? Or is it the amount of seconds you sleep. |
The amount of seconds you sleep. My guess is that the log items produced before the attach API call is done have the wrong format, while the log items produced after the API call are correct. |
Yeah I found the bug, the hard part is to write a good test |
Luap99
added a commit
to Luap99/libpod
that referenced
this issue
Dec 15, 2022
When we read logs there can be full or partial lines, when it is full we need to append a newline, thus the message length must be incremented by one. Fixes containers#16856 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99
added a commit
to Luap99/libpod
that referenced
this issue
Dec 16, 2022
When we read logs there can be full or partial lines, when it is full we need to append a newline, thus the message length must be incremented by one. Fixes containers#16856 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99
added a commit
to Luap99/libpod
that referenced
this issue
Dec 16, 2022
When we read logs there can be full or partial lines, when it is full we need to append a newline, thus the message length must be incremented by one. Fixes containers#16856 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
github-actions
bot
added
the
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
label
Sep 7, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Podman seems to have a bug in attach format which is described here https://docs.docker.com/engine/api/v1.41/#tag/Container/operation/ContainerAttach
The bug only seems to appear for the log items produced before the attach command is executed, not after
Steps to reproduce the issue:
The same steps in form of a script:
Describe the results you received:
Looking at the
dump.bin
produced with the above reproduction procedure, one can clearly see how thelength
field is incorrect (indicates 3 bytes for a 4-byte payload) during the first 5 seconds, and correct (indicates 4 bytes) during the last 5 seconds.Describe the results you expected:
I expected the
length
to be4
for all messages.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: