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 1731107

Summary: support podman ps filter regular expressions
Product: Red Hat Enterprise Linux 8 Reporter: Guillaume Abrioux <gabrioux>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.0CC: dornelas, dwalsh, jligon, jnovy, lsm5, mheon, qiwan, tsweeney, weshen
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: podman-1.6.4-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 15:47:16 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:    
Bug Blocks: 1734579, 1735558    

Description Guillaume Abrioux 2019-07-18 10:06:25 UTC
Description of problem:

with docker CLI, it was possible to `ps -f` using regular expressions.


-bash-4.2# docker ps -a
CONTAINER ID        IMAGE                                   COMMAND             CREATED             STATUS              PORTS               NAMES
8b250a9b881d        docker.io/ceph/daemon:latest-nautilus   "sleep 10000"       17 minutes ago      Up 17 minutes                           ceph-osd-33
ba755fd63831        docker.io/ceph/daemon:latest-nautilus   "sleep 10000"       17 minutes ago      Up 17 minutes                           ceph-osd-3
-bash-4.2# docker ps -f "name=ceph-osd-3$"
CONTAINER ID        IMAGE                                   COMMAND             CREATED             STATUS              PORTS               NAMES
ba755fd63831        docker.io/ceph/daemon:latest-nautilus   "sleep 10000"       17 minutes ago      Up 17 minutes                           ceph-osd-3
-bash-4.2# docker ps -f "name=ceph-osd-3"
CONTAINER ID        IMAGE                                   COMMAND             CREATED             STATUS              PORTS               NAMES
8b250a9b881d        docker.io/ceph/daemon:latest-nautilus   "sleep 10000"       17 minutes ago      Up 17 minutes                           ceph-osd-33
ba755fd63831        docker.io/ceph/daemon:latest-nautilus   "sleep 10000"       17 minutes ago      Up 17 minutes                           ceph-osd-3
-bash-4.2# 

from backward compatibility point of view, this is causing issues.



Version-Release number of selected component (if applicable):
# podman --version
podman version 1.0.2-dev


How reproducible:
100%


Actual results:

-bash-4.2# podman ps -a
CONTAINER ID  IMAGE                                  COMMAND               CREATED        STATUS            PORTS  NAMES
6ba3ae865bf4  docker.io/ceph/daemon:latest-nautilus  sleep 10000           2 minutes ago  Up 2 minutes ago         ceph-osd-44
5f550be7e697  docker.io/ceph/daemon:latest-nautilus  sleep 10000           2 minutes ago  Up 2 minutes ago         ceph-osd-4
-bash-4.2# podman ps -f "name=ceph-osd-4$"
-bash-4.2# podman ps -f "name=ceph-osd-4"
CONTAINER ID  IMAGE                                  COMMAND      CREATED         STATUS             PORTS  NAMES
6ba3ae865bf4  docker.io/ceph/daemon:latest-nautilus  sleep 10000  14 minutes ago  Up 14 minutes ago         ceph-osd-44
5f550be7e697  docker.io/ceph/daemon:latest-nautilus  sleep 10000  14 minutes ago  Up 14 minutes ago         ceph-osd-4


Expected results:

-bash-4.2# podman ps -a
CONTAINER ID  IMAGE                                  COMMAND               CREATED        STATUS            PORTS  NAMES
6ba3ae865bf4  docker.io/ceph/daemon:latest-nautilus  sleep 10000           2 minutes ago  Up 2 minutes ago         ceph-osd-44
5f550be7e697  docker.io/ceph/daemon:latest-nautilus  sleep 10000           2 minutes ago  Up 2 minutes ago         ceph-osd-4
-bash-4.2# podman ps -f "name=ceph-osd-4$"
5f550be7e697  docker.io/ceph/daemon:latest-nautilus  sleep 10000           2 minutes ago  Up 2 minutes ago         ceph-osd-4
-bash-4.2#

Comment 4 Daniel Walsh 2019-08-14 10:56:21 UTC
Valentin, is this something that we should do in psgo or in podman?  Is it something you could look at?

Comment 5 Valentin Rothberg 2019-08-14 12:20:40 UTC
(In reply to Daniel Walsh from comment #4)
> Valentin, is this something that we should do in psgo or in podman?  Is it
> something you could look at?

Qi has already fixed that (see https://github.com/containers/libpod/commit/5047c79e71a3). Note that this issue related to podman-ps not podman-top (which is using the psgo lib).

Comment 6 Daniel Walsh 2019-08-15 10:21:21 UTC
Fixd in podman 1.5.0

Comment 7 Tom Sweeney 2020-01-22 15:55:23 UTC
Assigning to Jindrich to validate this is taken care of packaging wise already.

Comment 14 errata-xmlrpc 2020-04-28 15:47:16 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/RHSA-2020:1650