From 3fa4b9164dca6d9f01cda49881549cf8a2c85188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Sat, 9 May 2020 13:58:12 +0200 Subject: [PATCH] The podman volume prune does not support filter --- cmd/minikube/cmd/delete.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 101f7aae52..711cf59da8 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -109,6 +109,11 @@ func deleteContainersAndVolumes(ociBin string) { glog.Warningf("error delete volumes by label %q (might be okay): %+v", delLabel, errs) } + if ociBin == oci.Podman { + // podman prune does not support --filter + return + } + errs = oci.PruneAllVolumesByLabel(ociBin, delLabel) if len(errs) > 0 { // it will not error if there is nothing to delete glog.Warningf("error pruning volumes by label %q (might be okay): %+v", delLabel, errs) @@ -246,6 +251,11 @@ func deletePossibleKicLeftOver(cname string, driverName string) { glog.Warningf("error deleting volumes (might be okay).\nTo see the list of volumes run: 'docker volume ls'\n:%v", errs) } + if bin == oci.Podman { + // podman prune does not support --filter + return + } + errs = oci.PruneAllVolumesByLabel(bin, delLabel) if len(errs) > 0 { // it will not error if there is nothing to delete glog.Warningf("error pruning volume (might be okay):\n%v", errs)