Eduardo has uploaded a new change for review.
Change subject: Remove force parameter in StoragePool.spmStop() ......................................................................
Remove force parameter in StoragePool.spmStop()
Change-Id: I7eaf8883e62a72445e27f0bc9876fe61a10bcb3f Signed-off-by: Eduardo ewarszaw@redhat.com --- M vdsm/storage/sp.py 1 file changed, 20 insertions(+), 18 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/13929/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py index ca20f9a..70c5802 100644 --- a/vdsm/storage/sp.py +++ b/vdsm/storage/sp.py @@ -340,8 +340,8 @@
except Exception as e: self.log.error("Unexpected error", exc_info=True) - self.log.error("failed: %s" % str(e)) - self.stopSpm(force=True, __securityOverride=True) + self.log.error("failed: spmRole:%s %s", self.spmRole, str(e)) + self.stopSpm(__securityOverride=True) raise
@unsecured @@ -392,44 +392,46 @@ else: cls.log.debug("master `%s` is not mounted, skipping", master)
- def stopSpm(self, force=False): + def stopSpm(self): with self.lock: - if not force and self.spmRole == SPM_FREE: + if self.spmRole == SPM_FREE: return True
self._shutDownUpgrade() self._setUnsafe()
- stopFailed = False - + failedStops = [] try: self.cleanupMasterMount() except: # If unmounting fails the vdsm panics. - stopFailed = True + failedStops.append("cleanupMasterMount")
- try: - if self.spmMailer: + if self.spmMailer: + try: self.spmMailer.stop() - except: - # Here we are just begin polite. - # SPM will also clean this on start up. - pass + except: + # Here we are just begin polite. + # SPM will also clean this on start up. + self.log.debug("fail: spmMailer %s", self.spmMailer)
- if not stopFailed: + if not failedStops: try: self.setMetaParam(PMDK_SPM_ID, SPM_ID_FREE, __securityOverride=True) except: - pass # The system can handle this inconsistency + # The system can handle this inconsistency + self.log.debug("fail: reset %s to %s", + PMDK_SPM_ID, SPM_ID_FREE)
try: self.masterDomain.releaseClusterLock() except: - stopFailed = True + failedStops.append("releaseClusterLock")
- if stopFailed: - misc.panic("Unrecoverable errors during SPM stop process.") + if failedStops: + misc.panic("Unrecoverable errors during SPM stop process: %s.", + ", ".join(failedStops))
self.spmRole = SPM_FREE
-- To view, visit http://gerrit.ovirt.org/13929 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I7eaf8883e62a72445e27f0bc9876fe61a10bcb3f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Remove force parameter in StoragePool.spmStop() ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1970/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13929 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7eaf8883e62a72445e27f0bc9876fe61a10bcb3f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Remove force parameter in StoragePool.spmStop() ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2027/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13929 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7eaf8883e62a72445e27f0bc9876fe61a10bcb3f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Remove force parameter in StoragePool.spmStop() ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2027/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1970/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13929 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7eaf8883e62a72445e27f0bc9876fe61a10bcb3f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ayal Baron has posted comments on this change.
Change subject: Remove force parameter in StoragePool.spmStop() ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/storage/sp.py Line 393: cls.log.debug("master `%s` is not mounted, skipping", master) Line 394: Line 395: def stopSpm(self): Line 396: with self.lock: Line 397: if self.spmRole == SPM_FREE: this changes the semantics. Since this is an spm operation, if I'm not spm when this method is called then this will throw an exception. If I'm under the clustered lock however and pass securityoverride then it's feasible that this if will evaluate to true even though we need to cleanup. In any event, if you're removing force, you need to remove this if. Line 398: return True Line 399: Line 400: self._shutDownUpgrade() Line 401: self._setUnsafe()
-- To view, visit http://gerrit.ovirt.org/13929 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7eaf8883e62a72445e27f0bc9876fe61a10bcb3f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Daniel Paikov paikov@gmail.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Itamar Heim has posted comments on this change.
Change subject: Remove force parameter in StoragePool.spmStop() ......................................................................
Patch Set 1:
ping - still relevant?
Itamar Heim has abandoned this change.
Change subject: Remove force parameter in StoragePool.spmStop() ......................................................................
Abandoned
no reply - abandoning - please restore if still relevant
vdsm-patches@lists.fedorahosted.org