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 kube down --force doesn't seem to work #18797
Comments
So the issue seems to be that we're not extracting volume names while tearing down during when they are part of a Pod i.e. they are not defined explicitly as a PersistentVolumeClaim kind object and hence these volumes are not removed. The following patch[1] should take care of it, could you try it once and see if it works for you? main...danishprakash:podman:kube-down-volrm cc/ @Luap99 |
Please open a PR for this fix. |
Ok after almost nuking my PC lol I managed to apply your patch @danishprakash and it works! Thanks! |
* add e2e test Closes containers#18797 Signed-off-by: danishprakash <danish.prakash@suse.com>
* add e2e test Closes containers#18797 Signed-off-by: danishprakash <danish.prakash@suse.com>
* add e2e test Closes containers#18797 Signed-off-by: danishprakash <danish.prakash@suse.com>
* add e2e test Closes containers#18797 Signed-off-by: danishprakash <danish.prakash@suse.com>
* add e2e test Closes containers#18797 Signed-off-by: danishprakash <danish.prakash@suse.com>
Issue Description
Hi, I'm trying to clean up a pod created with
podman kube play
but the volume isn't being removed.From the official documentation:
But this parameter doesn't seem to work, the pod and container are in fact removed but the volume isn't.
This is my yaml file (in the steps section below I reported all the commands that I used to generate it):
The command
podman kube down --force
doesn't remove the volumepostgres-volume
even though the force parameter is used.Steps to reproduce the issue
Steps to reproduce the issue
podman run -d --name postgres -e POSTGRES_PASSWORD=test -p 5432:5432 -v postgres-volume:/var/lib/postgresql/data postgres
podman kube generate postgres > postgres.yaml
podman stop postgres && podman rm postgres && podman volume rm postgres-volume
podman kube play postgres.yaml
podman kube down --force postgres.yaml
podman volume ls
Describe the results you received
podman-volume
is still thereDescribe the results you expected
podman-volume
should be removed with the --force parameterpodman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
I even tried with
podman kube play --down --force
but it's the same thing, the volume isn't being removed.The text was updated successfully, but these errors were encountered: