Skip to content

Commit

Permalink
The podman volume prune does not support filter
Browse files Browse the repository at this point in the history
  • Loading branch information
afbjorklund committed May 9, 2020
1 parent 1bd56a4 commit 3fa4b91
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/minikube/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3fa4b91

Please sign in to comment.