Nir Soffer has posted comments on this change. Change subject: sp: deactivateSd - remove domain from pending for upgrade list ......................................................................
Patch Set 1: Code-Review-1 (3 comments) https://gerrit.ovirt.org/#/c/45773/1/vdsm/storage/sp.py File vdsm/storage/sp.py: Line 152: except: Line 153: self.log.error("Error while preparing domain `%s` upgrade", sdUUID, Line 154: exc_info=True) Line 155: return Line 156: Please remove this unneeded whitespace change Line 157: with rmanager.acquireResource(STORAGE, sdUUID, Line 158: rm.LockType.exclusive): Line 159: with rmanager.acquireResource(STORAGE, "upgrade_" + sdUUID, Line 160: rm.LockType.exclusive): Line 154: exc_info=True) Line 155: return Line 156: Line 157: with rmanager.acquireResource(STORAGE, sdUUID, Line 158: rm.LockType.exclusive): Previously we took exclusive lock for each domain, so we can upgrade several domains concurrently. Taking the domain lock will allow only one upgrade. Line 159: with rmanager.acquireResource(STORAGE, "upgrade_" + sdUUID, Line 160: rm.LockType.exclusive): Line 161: if sdUUID not in self._domainsToUpgrade: Line 162: return Line 1097: self.masterMigrate(sdUUID, newMsdUUID, masterVersion) Line 1098: self._deactivateSD(domList, sdUUID) Line 1099: else: Line 1100: with rmanager.acquireResource(STORAGE, "upgrade_" + self.spUUID, Line 1101: rm.LockType.exclusive): This will not work if the upgrade thread is holding the resource, for example when the storage is not accessible and the thread is trying to access storage. Line 1102: masterDir = os.path.join(dom.domaindir, sd.MASTER_FS_DIR) Line 1103: try: Line 1104: m = mount.getMountFromTarget(masterDir) Line 1105: except OSError as e: -- To view, visit https://gerrit.ovirt.org/45773 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4451b348b8837dd83d95aea2be4a4536b33cdd99 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches