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@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@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Handling svdsm exception in multipath opeartion ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/504/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10508 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Handling svdsm exception in multipath opeartion ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/539/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10508 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Handling svdsm exception in multipath opeartion ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/504/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/539/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/10508 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Handling svdsm exception in multipath opeartion ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
.................................................... Commit Message Line 9: without handling the exception, the exception is raised to hsm __init__ Line 10: and cause failure in initialization. afterwards, vdsm is not Line 11: operational for hsm operations. Line 12: Line 13: This patch consider svdsm failure as an error in operation without why do we want to keep on working when svdsm is throwing exception? it is quite an important piece of vdsm; I'd rather bail out if it cannot start. Line 14: paralyzed vdsm. Line 15: Line 16: Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3 Line 17: Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=890365
.................................................... File vdsm/storage/multipath.py Line 90: svdsm = supervdsm.getProxy() Line 91: mpathconf = svdsm.readMultipathConf() Line 92: # we don't handle specific exception types here because any exception Line 93: # means that the operation failed and we can't destinguish if multipath Line 94: # is enabled or not if we cannot distinguish between True and False, why are you returning False? raising an exception is just for such cases. Line 95: except: Line 96: log.error("failure in reading multipath conf", exc_info=True) Line 97: return False Line 98:
-- To view, visit http://gerrit.ovirt.org/10508 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Yaniv Bronhaim has posted comments on this change.
Change subject: Handling svdsm exception in multipath opeartion ......................................................................
Patch Set 1:
I know that you're right and this workaround looks like ignoring svdsm failures, that in general is totally wrong.
But, calling to svdsm as part of hsm.__init__ sounds risky to me, since svdsm can throw exception (also inside the proxy function) and that exception cause failure in hsm initialization, which means vdsm can't function afterwards but still running..
Is this right handling? maybe we should kill vdsm if such exception is raised, it's better then let vdsm to continue..
Am I missing something?
-- To view, visit http://gerrit.ovirt.org/10508 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Handling svdsm exception in multipath opeartion ......................................................................
Patch Set 1:
It is a long standing requirement to keep vdsm responsive when the storage subsystem fails to start.
Keeping vdsm if supervdsm is missing is more dubious, but I'd rather solve it as having a systemd requirement (see your own thread on vdsm-devel) over a specific hack in hsm.__init__.
-- To view, visit http://gerrit.ovirt.org/10508 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Yaniv Bronhaim has abandoned this change.
Change subject: Handling svdsm exception in multipath opeartion ......................................................................
Patch Set 1: Abandoned
-- To view, visit http://gerrit.ovirt.org/10508 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon Gerrit-Change-Id: Id56ab966f3a21f4ef9fac0ad05e4f00f25cc16b3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org