Yeela Kaplan has uploaded a new change for review.
Change subject: clientIF: only warn when failing to deactivate lvs after alignment scan
......................................................................
clientIF: only warn when failing to deactivate lvs after alignment scan
The deactivation fails because the vm can be up when performing scan,
which means deactivate should fail when vm is up and we should only
log instead of raise.
Related to BZ#998411
Change-Id: I2e22c136d11537d3cd96815ea52ae893b97787c0
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M vdsm/clientIF.py
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/18882/1
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 38822fe..5e20e29 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -27,6 +27,7 @@
from storage.dispatcher import Dispatcher
from storage.hsm import HSM
+from storage import storage_exception as se
import alignmentScan
from vdsm.config import config
import ksm
@@ -380,7 +381,11 @@
for line in out:
aligning[line.partitionName] = line.alignmentScanResult
finally:
- self.teardownVolumePath(drive)
+ try:
+ self.teardownVolumePath(drive)
+ except se.CannotDeactivateLogicalVolume as e:
+ self.log.warning("Cannot deactivate LVs if used by a vm: %s",
+ str(e))
return {'status': doneCode, 'alignment': aligning}
--
To view, visit
http://gerrit.ovirt.org/18882
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e22c136d11537d3cd96815ea52ae893b97787c0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>