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

Error when use "image prune --all" via forwarding API and docker cli #20469

Closed
philippjenni opened this issue Oct 24, 2023 · 10 comments · Fixed by #20481
Closed

Error when use "image prune --all" via forwarding API and docker cli #20469

philippjenni opened this issue Oct 24, 2023 · 10 comments · Fixed by #20481
Assignees
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

Comments

@philippjenni
Copy link

philippjenni commented Oct 24, 2023

Issue Description

If an image exists in Podman that is no longer in use and the command "docker image prune -a" is executed via the Forward API and Docker CLI, the error message "Error response from daemon: specifying "dangling" filter more than once with different values is not supported" appears. If the command is executed via "podman image prune -a", the cleanup works correctly.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Download Image docker pull nginx
  2. Clean Images docker image prune -a

Describe the results you received

Error Message: Error response from daemon: specifying "dangling" filter more than once with different values is not supported

Describe the results you expected

The image should be removed.

podman info output

host:
  arch: amd64
  buildahVersion: 1.32.0
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  - misc
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.7-2.fc38.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.7, commit: '
  cpuUtilization:
    idlePercent: 99.64
    systemPercent: 0.2
    userPercent: 0.15
  cpus: 4
  databaseBackend: boltdb
  distribution:
    distribution: fedora
    variant: container
    version: "38"
  eventLogger: journald
  freeLocks: 2048
  hostname: VGENERAL96
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.15.133.1-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 7665016832
  memTotal: 10413207552
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.8.0-1.fc38.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.8.0
    package: netavark-1.8.0-2.fc38.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.8.0
  ociRuntime:
    name: crun
    package: crun-1.10-1.fc38.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.10
      commit: c053c83c57551bca13ead8600237341818975974
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20231004.gf851084-1.fc38.x86_64
    version: |
      pasta 0^20231004.gf851084-1.fc38.x86_64
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  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.2-1.fc38.x86_64
    version: |-
      slirp4netns version 1.2.2
      commit: 0ee2d87523e906518d34a6b423271e4826f71faf
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 3221225472
  swapTotal: 3221225472
  uptime: 2h 34m 17.00s (Approximately 0.08 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 2787717120
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 47
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.7.0
  Built: 1695839078
  BuiltTime: Wed Sep 27 20:24:38 2023
  GitCommit: ""
  GoVersion: go1.20.8
  Os: linux
  OsArch: linux/amd64
  Version: 4.7.0

Podman in a container

No

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

OS: Windows 2022
WSL version: 2.0.6.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.20348.1787
Podman Version: 4.7.1
Docker CLI Version 24.0.6, build ed223bc

@philippjenni philippjenni added the kind/bug Categorizes issue or PR as related to a bug. label Oct 24, 2023
@github-actions github-actions bot added the remote Problem is in podman-remote label Oct 24, 2023
@vrothberg vrothberg self-assigned this Oct 25, 2023
@vrothberg
Copy link
Member

Thanks for reaching out, @philippjenni. I am taking a look.

vrothberg added a commit to vrothberg/libpod that referenced this issue Oct 25, 2023
Docker deals with the --all flag on the client side while Podman does it
on the server side.  Hence, make sure to not set the dangling filter
with two different values in the backend.

Fixes: containers#20469
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
@philippjenni
Copy link
Author

@vrothberg I have tested if the issue is fixed with 4.7.2. The Bug still exists.

@vrothberg
Copy link
Member

The fix has not been backported to v4.7.2 but will be released with Podman v4.8 (November).

@philippjenni
Copy link
Author

@vrothberg I have tested with 4.8-rc1. Bug still exists

Podman Version

podman -v
podman version 4.8.0-rc1

Output

docker image prune --all
WARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y
Error response from daemon: specifying "dangling" filter more than once with different values is not supported

Same error exists when i call

docker system prune -a
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all images without at least one container associated to them
  - all build cache

Are you sure you want to continue? [y/N] y
Error response from daemon: specifying "dangling" filter more than once with different values is not supported

@vrothberg
Copy link
Member

@philippjenni it works on my end. Are you sure that you pointed the docker client to right binary/socket?

I ran ./bin/podman system service -t0 --log-level=info and then DOCKER_HOST="unix:///run/user/1000/podman/podman.sock" docker image prune --all and do not see the issue anymore. The fix also included regression tests.

@philippjenni
Copy link
Author

@vrothberg I run Podman under Windows 2022

@philippjenni
Copy link
Author

@vrothberg I have see that my WSL Machine have Podman 4.7.0 installed. I will try update this and then try again. I give you feedback about this.

@vrothberg
Copy link
Member

Ah, that explains it. It was a server-side fix, so updating the client won't fix the issue.

@philippjenni
Copy link
Author

@vrothberg I have tried to update the WSL Image. But the latest version of the image has version 4.7.2

@philippjenni
Copy link
Author

@vrothberg With a manual updated wsl image (test mode) works fix. Thanks for support.

@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 Feb 28, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants