Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1723470

Summary: podman exec rc-code needs to distinguish between stopped containers and non existing ones [rhel-8.0.0.z]
Product: Red Hat Enterprise Linux 8 Reporter: Oneata Mircea Teodor <toneata>
Component: podmanAssignee: Brent Baude <bbaude>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: high Docs Contact:
Priority: urgent    
Version: 8.0CC: atomic-bugs, ddarrah, dornelas, dwalsh, jligon, jnovy, lmiccini, lsm5, mheon, michele, pthomas, wchadwic, ypu
Target Milestone: rcKeywords: ZStream
Target Release: 8.1Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: podman-1.0.2-1.git4426985.module+el8.0.0.z+3525+56c076c3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1719626 Environment:
Last Closed: 2019-07-30 19:50:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1719626    
Bug Blocks: 1727325    

Comment 2 Daniel Walsh 2019-06-24 16:42:59 UTC
Fixed in podman 1.4.2 release.

Comment 7 Joy Pu 2019-07-22 12:05:27 UTC
Test with podman-1.0.3-1.git9d78c0c.module+el8.0.0.z+3717+fdd07b7c.x86_64. And seems the exit code already updated. So set this to verified, Details:
#  podman exec memcached /bin/true; echo $?
unable to exec into memcached: no container with name or ID memcached found: no such container
125
# podman ps -a
CONTAINER ID  IMAGE                             COMMAND  CREATED        STATUS                    PORTS  NAMES
eb4605318818  docker.io/library/busybox:latest  sh       8 seconds ago  Exited (0) 8 seconds ago         unruffled_mirzakhani
# podman exec eb4605318818 /bin/true ; echo $?
cannot exec into container that is not running: container state improper
126

Comment 9 errata-xmlrpc 2019-07-30 19:50:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1956