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: rc   
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