Skip to content
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 can't be formatted by Label, but only by Labels #1729

Closed
bogdando opened this issue Oct 30, 2018 · 4 comments
Closed

podman ps can't be formatted by Label, but only by Labels #1729

bogdando opened this issue Oct 30, 2018 · 4 comments
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@bogdando
Copy link

kind bug

Description

podman ps can't be formatted by Label, but only by Labels, which breaks the docker CLI compatibility

Steps to reproduce the issue:

  1. Create a container labeled with container_name=test

  2. Try to filter it following docker CLI:

# podman ps -a --filter label=container_name=test --format '{{.Label "container_name"}}'
template: output:1:2: executing "output" at <.Label>: can't evaluate field Label in type shared.PsContainerOutput

# podman ps -a --filter label=container_name=test --format {{.Label "container_name"}}
too many arguments, ps takes no arguments
  1. Try to filter it via Labels instead:
# podman ps -a --filter label=container_name=test --format {{.Labels.container_name}}
test

Describe the results you received:

--format '{{.Label "container_name"}}' is not working for podman, but works for docker

Describe the results you expected:

--format '{{.Label "container_name"}}' should also work for podman

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:       0.10.2-dev
Go Version:    go1.10.2
OS/Arch:       linux/amd64

Output of podman info:

host:
  BuildahVersion: 1.5-dev
  Conmon:
    package: podman-0.10.1.3-2.git6e1aeb0.el7.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 1.12.0, commit: 097cf71375bd18454d1c48b9fdf8ccff2ed995f8-dirty'
  Distribution:
    distribution: fedora
    version: "28"
  MemFree: 11450249216
  MemTotal: 12590895104
  OCIRuntime:
    package: runc-1.0.0-56.dev.git78ef28e.fc28.x86_64
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.1-dev'
  SwapFree: 0
  SwapTotal: 0
  arch: amd64
  cpus: 3
  hostname: localhost.localdomain
  kernel: 4.18.7-200.fc28.x86_64
  os: linux
  uptime: 5h 12m 50.5s (Approximately 0.21 days)
insecure registries:
  registries: []
registries:
  registries:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  ContainerStore:
    number: 125
  GraphDriverName: overlay
  GraphOptions:
  - overlay.mountopt=nodev
  - overlay.override_kernel_check=true
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
  ImageStore:
    number: 3
  RunRoot: /var/run/containers/storage

Additional environment details (AWS, VirtualBox, physical, etc.):

@baude baude self-assigned this Oct 30, 2018
@EmilienM
Copy link
Contributor

EmilienM commented Dec 3, 2018

Workaround here: https://review.openstack.org/#/c/614290/

@baude
Copy link
Member

baude commented Dec 3, 2018

are we good to close?

@EmilienM
Copy link
Contributor

EmilienM commented Dec 3, 2018

@baude yes if you never change it or it'll break our code

@EmilienM
Copy link
Contributor

EmilienM commented Dec 4, 2018

@baude please close

@mheon mheon closed this as completed Dec 4, 2018
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

4 participants