add logging for prune

pull/6635/head
Medya Gh 2020-02-16 11:54:56 -08:00
parent a007c0790c
commit 3ce0164281
1 changed files with 2 additions and 0 deletions

View File

@ -19,12 +19,14 @@ package oci
import (
"os/exec"
"github.com/golang/glog"
"github.com/pkg/errors"
)
// DeleteAllVolumesByLabel delets all volumes that have a specific label
// example: docker volume prune -f --filter label=name.minikube.sigs.k8s.io=minikube
func DeleteAllVolumesByLabel(ociBin string, label string) error {
glog.Infof("trying to prune all %s volumes with label %s", ociBin, label)
if ociBin == Docker {
if err := PointToHostDockerDaemon(); err != nil {
return errors.Wrap(err, "point host docker-daemon")