fix klog format error

This commit is contained in:
qingsenLi 2019-05-25 22:30:29 +08:00
parent 9ddc9ccc57
commit 62dea14351
2 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ func diskTearDown(manager diskManager, c rbdUnmounter, volPath string, mounter m
} }
if notMnt { if notMnt {
if err := os.Remove(volPath); err != nil { if err := os.Remove(volPath); err != nil {
klog.V(2).Info("Error removing mountpoint ", volPath, ": ", err) klog.V(2).Infof("Error removing mountpoint %s: %v", volPath, err)
return err return err
} }
} }

View File

@ -621,7 +621,7 @@ func (util *RBDUtil) DeleteImage(p *rbdVolumeDeleter) error {
return fmt.Errorf("error %v, rbd output: %v", err, rbdOutput) return fmt.Errorf("error %v, rbd output: %v", err, rbdOutput)
} }
if found { if found {
klog.Info("rbd is still being used ", p.rbdMounter.Image) klog.Infof("rbd %s is still being used ", p.rbdMounter.Image)
return fmt.Errorf("rbd image %s/%s is still being used, rbd output: %v", p.rbdMounter.Pool, p.rbdMounter.Image, rbdOutput) return fmt.Errorf("rbd image %s/%s is still being used, rbd output: %v", p.rbdMounter.Pool, p.rbdMounter.Image, rbdOutput)
} }
// rbd rm. // rbd rm.