Bug 1731107 - support podman ps filter regular expressions
Summary: support podman ps filter regular expressions
Keywords:
Status: ON_QA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: 8.2
Assignee: Jindrich Novy
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1734579 1735558
TreeView+ depends on / blocked
 
Reported: 2019-07-18 10:06 UTC by Guillaume Abrioux
Modified: 2020-02-20 06:57 UTC (History)
8 users (show)

Fixed In Version: podman-1.6.4-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

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.


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