Adam Litke has posted comments on this change. Change subject: sp: race in domains upgrade prevents further pool upgrades ......................................................................
Patch Set 2: (2 comments) https://gerrit.ovirt.org/#/c/57315/2/vdsm/storage/sp.py File vdsm/storage/sp.py: Line 459: Line 460: # This is needed as the domain monitor registered callback and Line 461: # the initiated update threads may modify the list while we Line 462: # iterate over it Line 463: domainsToUpgrade = self._domainsToUpgrade[:] Rather than copying the dict you can just copy the keys: sd_id_list = self._domainsToUpgrade.keys() Line 464: self.log.debug("Registering with state change event") Line 465: self.domainMonitor.onDomainStateChange.register( Line 466: self._upgradeCallback) Line 467: self.log.debug("Running initial domain upgrade threads") Line 464: self.log.debug("Registering with state change event") Line 465: self.domainMonitor.onDomainStateChange.register( Line 466: self._upgradeCallback) Line 467: self.log.debug("Running initial domain upgrade threads") Line 468: for sdUUID in domainsToUpgrade: And iterate over the list here: for sdUUID in sd_id_list: Now you will not get the exception: RuntimeError: dictionary changed size during iteration Line 469: concurrent.thread(self._upgradeCallback, Line 470: args=(sdUUID, True), Line 471: kwargs={"__securityOverride": True}, Line 472: logger=self.log.name).start() -- To view, visit https://gerrit.ovirt.org/57315 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie384c63315214786dc62f2b4998002320e314d30 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches