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 start with filter only starts first result #18153

Closed
gricey432 opened this issue Apr 12, 2023 · 1 comment · Fixed by #18198
Closed

podman start with filter only starts first result #18153

gricey432 opened this issue Apr 12, 2023 · 1 comment · Fixed by #18198
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote windows issue/bug on Windows

Comments

@gricey432
Copy link

gricey432 commented Apr 12, 2023

Issue Description

Running the following command on windows only starts the first container in the list.

podman ps --filter "restart-policy=always" --all

This command is taken from https://github.com/containers/podman/blob/main/contrib/systemd/system/podman-restart.service.in

I'm unsure if this is windows specific, but I feel like if the service was broken on Linux someone would have reported that by now and I can't find anything.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Create multiple containers with restart-policy always
  2. Restart the podman machine or otherwise ensure the containers are stopped
  3. Confirm the restart policy using podman ps --filter "restart-policy=always" --all
  4. Run podman start --filter "restart-policy=always" --all

Describe the results you received

On the first execution of the command, the first container is started and its ID returned. Running the command again is a noop

Describe the results you expected

The first run of the command should start all filtered containers

podman info output

Client:       Podman Engine
Version:      4.4.4
API Version:  4.4.4
Go Version:   go1.19.5
Git Commit:   c8223435f49a860c8ac4281a85db39232745a7cb
Built:        Tue Mar 28 06:12:38 2023
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      4.4.1
API Version:  4.4.1
Go Version:   go1.18.10
Built:        Fri Feb 17 20:31:22 2023
OS/Arch:      linux/amd64
PS C:\Users\myuser> podman info
host:
  arch: amd64
  buildahVersion: 1.29.0
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  - rdma
  - misc
  cgroupManager: cgroupfs
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.5-1.fc36.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.5, commit: '
  cpuUtilization:
    idlePercent: 99.86
    systemPercent: 0.09
    userPercent: 0.05
  cpus: 12
  distribution:
    distribution: fedora
    variant: container
    version: "36"
  eventLogger: journald
  hostname: redactedmydesktop
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.15.90.1-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 15406223360
  memTotal: 16621084672
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.8.1-1.fc36.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.8.1
      commit: f8a096be060b22ccd3d5f3ebe44108517fbf6c30
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +WASM:wasmedge +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-0.2.beta.0.fc36.x86_64
    version: |-
      slirp4netns version 1.2.0-beta.0
      commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 4294967296
  swapTotal: 4294967296
  uptime: 5h 52m 53.00s (Approximately 0.21 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 2
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 6484070400
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 3
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.4.1
  Built: 1676629882
  BuiltTime: Fri Feb 17 20:31:22 2023
  GitCommit: ""
  GoVersion: go1.18.10
  Os: linux
  OsArch: linux/amd64
  Version: 4.4.1

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

Set up through podman-desktop

Additional information

No response

@gricey432 gricey432 added the kind/bug Categorizes issue or PR as related to a bug. label Apr 12, 2023
@github-actions github-actions bot added remote Problem is in podman-remote windows issue/bug on Windows labels Apr 12, 2023
@vrothberg
Copy link
Member

Thanks for reaching out, @gricey432!

I can reproduce on Linux as well with the remote client.

vrothberg added a commit to vrothberg/libpod that referenced this issue Apr 14, 2023
Fix a number of bugs wrt. filtering remote containers and how to
process specified names or IDs.  I _really_ do not like the duplication
between remote and local Podman but want to focus on fixing containers#18153
for now.

What I desire in the future is to consolidate all functionality of
looking up containers (all, latest, filters, specified names/IDs, etc.)
and for remote clients to just call containers/list etc.

Fixes: containers#18153
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue Apr 14, 2023
Fix a number of bugs wrt. filtering remote containers and how to
process specified names or IDs.  I _really_ do not like the duplication
between remote and local Podman but want to focus on fixing containers#18153
for now.

What I desire in the future is to consolidate all functionality of
looking up containers (all, latest, filters, specified names/IDs, etc.)
and for remote clients to just call containers/list etc.

Fixes: containers#18153
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue Apr 17, 2023
Fix a number of bugs wrt. filtering remote containers and how to
process specified names or IDs.  I _really_ do not like the duplication
between remote and local Podman but want to focus on fixing containers#18153
for now.

What I desire in the future is to consolidate all functionality of
looking up containers (all, latest, filters, specified names/IDs, etc.)
and for remote clients to just call containers/list etc.

Fixes: containers#18153
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue Apr 17, 2023
Fix a number of bugs wrt. filtering remote containers and how to
process specified names or IDs.  I _really_ do not like the duplication
between remote and local Podman but want to focus on fixing containers#18153
for now.

What I desire in the future is to consolidate all functionality of
looking up containers (all, latest, filters, specified names/IDs, etc.)
and for remote clients to just call containers/list etc.

Fixes: containers#18153
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
@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 Aug 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote windows issue/bug on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants