Skip to content
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-remote gobbles stdin #4095

Closed
edsantiago opened this issue Sep 24, 2019 · 1 comment · Fixed by #4102
Closed

podman-remote gobbles stdin #4095

edsantiago opened this issue Sep 24, 2019 · 1 comment · Fixed by #4102
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@edsantiago
Copy link
Member

podman-remote unnecessarily (and incorrectly) reads its stdin:

# echo hi | (podman-remote run alpine true;cat)

Compare to plain podman, or to anything else:

# echo hi | (podman run alpine true;cat)
hi
# echo hi | (date; cat)
Tue 24 Sep 2019 02:03:29 PM UTC
hi

Sometimes, but not always, the podman varlink process spits out an error:

ERRO[0885] read unixpacket @->/var/run/libpod/socket/fe150ab32648aceb1db3c3d68e426d628117b04b7d8754a2f2d09109bb4dedc0/attach: read:
connection reset by peer

I believe that fixing this bug will go a long way toward clearing up many of the weird CI failures currently being seen.

podman-1.6.0-2.fc30.x86_64 but this is a longstanding bug

edsantiago added a commit to edsantiago/libpod that referenced this issue Sep 24, 2019
Test had incorrectly been disabled for all podman; it
should've been disabled only for podman-remote. Fixed
that, and fixed the problem that was causing failures:
podman-remote is gobbling up stdin (containers#4095), so no
tests were actually being run at all, or only one.
Fixed by redirecting input on the run_podman invocation.
Added, as backup, a confirmation mechanism to ensure
that all expected tests are being run.

Note that test is reenabled, but the output check is
disabled for podman-remote due to containers#4096; this at least
lets us check exit status.

Signed-off-by: Ed Santiago <[email protected]>
@edsantiago
Copy link
Member Author

edsantiago commented Sep 24, 2019

The echo example is not particularly real-worldly; here's a better example of how stdin-gobbling violates POLA:

# cat /tmp/dirlist
/tmp
/etc
/var
# while read dir;do podman-remote run alpine ls -ld $dir;done </tmp/dirlist
drwxrwxrwt    2 root     root          4096 Aug 20 10:30 /tmp

[UPDATE] adding -t makes no difference here.

baude added a commit to baude/podman that referenced this issue Sep 24, 2019
when running a container remotely, we should only be sending stdin when
running with --interactive; otherwise use nil.

Fixes: containers#4095

Signed-off-by: baude <[email protected]>
@github-actions 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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant