The podman volume prune does not support filter

pull/7959/head
Anders F Björklund 2020-05-09 13:58:12 +02:00
parent 1bd56a40cf
commit 3fa4b9164d
1 changed files with 10 additions and 0 deletions

View File

@ -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)