-
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 system prune --filter="label!=key"
doesn't work
#14182
Comments
podman system prune --filter="label!key"
doesn't workpodman system prune --filter="label!=key"
doesn't work
Just to give you information about my exact use-case. The |
Filter negation was recently added to the |
@jkonecny12 Can I close this issue? |
Hi @rhatdan if I understand it correctly than this is not resolved. The change pointed above should be extended also to the |
Ok is anyone interested in making this change? Has anyone verified that this is not already fixed? Since podman system prune uses the same library, at least for images, this should be fixed. |
A friendly reminder that this issue had no activity for 30 days. |
@cdoern PTAL |
there was some eerily similar code in c/common and in podman for creating filter functions for various types. Move some of it here and add support for the label!= filter in libimage and libnetwork that basically creates the inverse function of label= after this merges, will file a PR with the fix for containers within podman as well there is already a label!= test in libimage/filters_test. Libimage somehow lets this syntax slide even though it does not actually imact anything in podman see containers/podman#14182 Signed-off-by: Charlie Doern <[email protected]>
there was some eerily similar code in c/common and in podman for creating filter functions for various types. Move some of it here and add support for the label!= filter in libimage and libnetwork that basically creates the inverse function of label= after this merges, will file a PR with the fix for containers within podman as well there is already a label!= test in libimage/filters_test. Libimage somehow lets this syntax slide even though it does not actually imact anything in podman see containers/podman#14182 Signed-off-by: Charlie Doern <[email protected]>
there was some eerily similar code in c/common and in podman for creating filter functions for various types. Move some of it here and add support for the label!= filter in libnetwork only. Libimage already supports it. after this merges, will file a PR with the fix for containers within podman as well see containers/podman#14182 Signed-off-by: Charlie Doern <[email protected]>
network and container prune could not handle the label!=... filter. vendor in c/common to fix this and add some podman level handling to make everything run smoothly resolves containers#14182 Signed-off-by: Charlie Doern <[email protected]>
Thanks for fixing this! |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When calling
podman system prune --filter="label!=com.test.test"
I'm getting error output:Steps to reproduce the issue:
podman system prune --filter="label!=com.test.test"
Describe the results you received:
Describe the results you expected:
I should be able to prune all the images and containers which doesn't contain given label.
Additional information you deem important (e.g. issue happens only occasionally):
Happens all the time.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
Fedora 36 but it happened also on Fedora 35.
The text was updated successfully, but these errors were encountered: