don't attempt to delete mountpoint if unmount failed

This commit is contained in:
gman 2019-02-26 14:46:21 +01:00
parent 143003bcfd
commit 2f8931315a

View File

@ -149,9 +149,9 @@ func unmountCephRoot(volID volumeID) {
if err := unmountVolume(cephRoot); err != nil {
klog.Errorf("failed to unmount %s with error %s", cephRoot, err)
}
if err := os.Remove(cephRoot); err != nil {
klog.Errorf("failed to remove %s with error %s", cephRoot, err)
} else {
if err := os.Remove(cephRoot); err != nil {
klog.Errorf("failed to remove %s with error %s", cephRoot, err)
}
}
}