Liron Aravot has posted comments on this change. Change subject: core: move getNewMaster to ReconstructMasterDomain ......................................................................
Patch Set 10: (3 comments) this patch wasjust briefly reviewed, i'm pending to answers on patches higher in the series as they might affect this one. http://gerrit.ovirt.org/#/c/28444/10/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommand.java: Line 209: if (getStorageDomain().getStorageDomainType() == StorageDomainType.Master) { Line 210: newMaster = electNewMaster(); Line 211: proceedStorageDomainTreatmentByDomainType(newMaster, true); Line 212: } else { Line 213: newMaster = null; let's just define it as null and remove the if block, if needed it'll be overriden Line 214: } Line 215: Line 216: final Guid newMasterId = newMaster != null ? newMaster.getId() : Guid.Empty; Line 217: Line 323: /** Line 324: * In case of master domain this method decide if to move master to other domain or move pool to maintenance (since Line 325: * there is no master domain) Line 326: * Line 327: * @param lockNewMaster If true the new master domain will not be locked the comment is wrong, if it's true it will be locked. Line 328: */ Line 329: protected void proceedStorageDomainTreatmentByDomainType(final StorageDomain newMaster, Line 330: final boolean lockNewMaster) { Line 331: if (newMaster != null) { http://gerrit.ovirt.org/#/c/28444/10/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java: Line 118: addCanDoActionMessage(VdcBllMessages.VAR__TYPE__STORAGE__DOMAIN); Line 119: } Line 120: Line 121: protected boolean reconstructMaster() { Line 122: newMasterStorageDomainId = getNewMaster().getId(); npe might occur, use getNewMasterId() Line 123: proceedStorageDomainTreatmentByDomainType(getNewMaster(), false); Line 124: Line 125: // To issue a reconstructMaster you need to set the domain inactive unless the selected domain is the current master Line 126: if (getParameters().isInactive() && !getStorageDomain().getId().equals(getNewMasterId())) { -- To view, visit http://gerrit.ovirt.org/28444 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I30d342a4c5802cdfbf2c78b50dad4c797c137fe2 Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches