Bug 1754922 - podman exec -i does not attach stdin with 1.5
Summary: podman exec -i does not attach stdin with 1.5
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: podman
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Hunt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1827324
TreeView+ depends on / blocked
 
Reported: 2019-09-24 11:24 UTC by Jan Pazdziora (Red Hat)
Modified: 2020-04-23 16:40 UTC (History)
7 users (show)

Fixed In Version: podman-1.9.0-1.fc31.x86_64
Clone Of:
: 1827324 (view as bug list)
Environment:
Last Closed: 2020-04-23 16:40:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github containers libpod pull 4818 0 None closed exec: fix pipes 2020-08-25 18:29:22 UTC

Description Jan Pazdziora (Red Hat) 2019-09-24 11:24:44 UTC
Description of problem:

The man podman-exec(1) says

       --interactive, -i=true|false

       When set to true, keep stdin open even if not attached. The default is false.

However, I am not able to pipe to podman to get the data to the process running in the container via podman exec.

Version-Release number of selected component (if applicable):

podman-1.5.1-3.git0005792.fc31.x86_64
podman-1.5.2-0.27.dev.git112a3cc.fc32.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. podman run --rm --name test-podman-exec -d registry.fedoraproject.org/fedora:30 sleep 60
2. echo asdf | podman exec -i test-podman-exec cat

Actual results:

On Fedora 31: empty output.

On Fedora rawhide:
Error: read unixpacket @->/var/run/libpod/socket/59ad86c6f892d4b02a76e240615b1085995bba891072fb1895e28f193b3883b5/attach: read: connection reset by peer

Expected results:

asdf

Additional info:

This is a regression against podman-1.4.4-4.fc30.x86_64.

We have freeipa-container tests where we run

  echo $PASSWORD | sudo podman exec -i the-container kinit admin

It started to fail with podman (1.5.1-1~ubuntu16.04~ppa1). I was able to reproduce the problem on Fedora, and on rawhide it seems even more broken than in Fedora 31.

Comment 1 Jan Pazdziora (Red Hat) 2019-09-24 11:28:27 UTC
I've also tested podman exec -i=true and --interactive, in case they were needed to make the -i option actually do something (unlike docker and unlike podman 1.4).

The podman exec -i=true behaves exactly like -i on both Fedora 31 (no output) and on Fedora rawhide (that connection reset by peer error).

However, podman exec --interactive causes even Fedora 31 to produce that connection reset by peer error.

Comment 2 Matthew Heon 2019-10-28 14:08:51 UTC
Upstream tracker: https://github.com/containers/libpod/issues/3302

This one is proving extremely difficult to track down, but seems to be in the handling of `-i` with exec after we migrated to conmon.

Comment 3 Ben Cotton 2019-10-31 18:43:42 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Jan Pazdziora (Red Hat) 2019-11-01 09:34:58 UTC
Updating version as the issue is still present with podman-1.6.2-2.fc31.x86_64.

Comment 5 Daniel Walsh 2019-11-01 13:31:26 UTC
Peter do the fixes we just merged into podman fix this issue?

Comment 6 Peter Hunt 2019-11-01 13:41:49 UTC
No, the piped input still doesn't seem to make it to the container, but we're getting closer. Work still needs to be done

Comment 7 Peter Hunt 2020-01-15 19:50:17 UTC
Finally found a fix in https://github.com/containers/libpod/pull/4818
This will land in either 1.7.1 or 1.8 depending on which version is cut next


Note You need to log in before you can comment on or make changes to this bug.