Log warning message when failed to remove rbd lock

It is hard to debug without any error message when lock is not removed
successfully.
This commit is contained in:
Jeffrey Zhang 2018-02-22 12:31:06 +08:00
parent 097d3f13d1
commit afbe47a382

View File

@ -213,6 +213,8 @@ func (util *RBDUtil) rbdUnlock(b rbdMounter) error {
cmd, err = b.exec.Run("rbd", args...)
if err == nil {
glog.V(4).Infof("rbd: successfully remove lock (locker_id: %s) on image: %s/%s with id %s mon %s", lock_id, b.Pool, b.Image, b.Id, mon)
} else {
glog.Warningf("rbd: failed to remove lock (lock_id: %s) on image: %s/%s with id %s mon %s: %v", lock_id, b.Pool, b.Image, b.Id, mon, err)
}
}