Yaniv Bronhaim has uploaded a new change for review.
Change subject: Handling svdsm exception in multipath opeartion
......................................................................
Handling svdsm exception in multipath opeartion
without handling the exception, the exception is raised to hsm __init__
and cause failure in initialization. afterwards, vdsm is not
operational for hsm operations.
This patch consider svdsm failure as an error in operation without
paralyzed vdsm.
Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3
Bug-Id:
https://bugzilla.redhat.com/show_bug.cgi?id=890365
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M vdsm/storage/multipath.py
1 file changed, 10 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/10508/1
diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py
index ecb644e..52d157b 100644
--- a/vdsm/storage/multipath.py
+++ b/vdsm/storage/multipath.py
@@ -86,8 +86,16 @@
"""
if os.path.exists(MPATH_CONF):
first = second = ''
- svdsm = supervdsm.getProxy()
- mpathconf = svdsm.readMultipathConf()
+ try:
+ svdsm = supervdsm.getProxy()
+ mpathconf = svdsm.readMultipathConf()
+ # we don't handle specific exception types here because any exception
+ # means that the operation failed and we can't destinguish if multipath
+ # is enabled or not
+ except:
+ log.error("failure in reading multipath conf", exc_info=True)
+ return False
+
try:
first = mpathconf[0]
second = mpathconf[1]
--
To view, visit
http://gerrit.ovirt.org/10508
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>