-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman-ps: --filter option has different behaviour than docker #1341
Comments
Alright, so this is related to multiple filters being passed in at once. I'll take a look on Monday. |
@mheon right, when you pass multiple --filter, only the last one is actually processed. |
See https://docs.docker.com/engine/reference/commandline/ps/#options |
The frontend code for |
It ended up being simpler than I thought, so I hammered out a fix - #1345 |
Closed-by #1345 |
/kind bug
Description
When using podman-ps, --filter option has a a different behaviour than docker CLI.
Steps to reproduce the issue:
podman ps -a --filter "label=container_name=keystone" --filter "label=config_id=tripleo_step3" --format {{.Names}}
Describe the results you received:
All containers with config_id=tripleo_step3 are returned.
Describe the results you expected:
It should return containers with container_name=keystone AND config_id=tripleo_step3.
How to make it work:
podman ps -a --filter label=container_name=keystone label=config_id=tripleo_step3 --format {{.Names}}
This command returned what I needed.
Additional information you deem important (e.g. issue happens only occasionally):
A few notes about how it works with Docker:
This command doesn't work:
docker ps -a --filter label=container_name=keystone label=config_id=tripleo_step3 --format {{.Names}}
While this one worked and returned what we expected:
docker ps -a --filter label=container_name=keystone --filter label=config_id=tripleo_step3 --format {{.Names}}
Output of
podman version
:Version: 0.8.4-dev
Go Version: go1.10.3
OS/Arch: linux/amd64
Output of
podman info
:host:
Conmon:
package: podman-0.8.2.1-1.gitf38eb4f.el7.x86_64
path: /usr/libexec/podman/conmon
version: 'conmon version 1.12.0-dev, commit: 74bba30adae4fdcacf887d35e4d6331318765028-dirty'
MemFree: 269758464
MemTotal: 8201699328
OCIRuntime:
package: runc-1.0.0-37.rc5.dev.gitad0f525.el7.x86_64
path: /usr/bin/runc
version: 'runc version spec: 1.0.0'
SwapFree: 1609035776
SwapTotal: 1610608640
arch: amd64
cpus: 4
hostname: undercloud75.localdomain
kernel: 3.10.0-862.11.6.el7.x86_64
os: linux
uptime: 18h 38m 40.28s (Approximately 0.75 days)
insecure registries:
registries: []
registries:
registries:
store:
ContainerStore:
number: 69
GraphDriverName: overlay
GraphOptions:
GraphRoot: /var/lib/containers/storage
GraphStatus:
Backing Filesystem: xfs
Native Overlay Diff: "true"
Supports d_type: "true"
ImageStore:
number: 28
RunRoot: /var/run/containers/storage
Additional environment details (AWS, VirtualBox, physical, etc.):
Running in local vagrant (virtualbox provider)
The text was updated successfully, but these errors were encountered: