Liron Ar has posted comments on this change.

Change subject: core: allow current master domain to be selected as the new 
master
......................................................................


Patch Set 7:

(2 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java
Line 95:     protected boolean reconstructMaster() {
Line 96:         proceedStorageDomainTreatmentByDomainType(true);
Line 97: 
Line 98:         // To issue a reconstructMaster you need to set the domain 
inactive unless the selected domain is the current master
Line 99:         if (getParameters().isInactive() && 
!getStorageDomain().getId().equals(_newMasterStorageDomainId)) {
IMO not, we care about the chosen domain.
Line 100:             executeInNewTransaction(new TransactionMethod<Void>() {
Line 101:                 @Override
Line 102:                 public Void runInTransaction() {
Line 103:                     
setStorageDomainStatus(StorageDomainStatus.InActive, getCompensationContext());


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
Line 320:                 for (StorageDomain dbStorageDomain : storageDomains) {
Line 321:                     if ((storageDomain == null || (duringReconstruct 
|| !dbStorageDomain.getId()
Line 322:                             .equals(storageDomain.getId())))
Line 323:                             && 
((dbStorageDomain.getStorageDomainType() == StorageDomainType.Data)
Line 324:                             ||
it's the automatic formatting, Im planning further refactor that'll reduce the 
code here so it will look better i assume.
Line 325:                             (canChooseCurrentMasterAsNewMaster && 
dbStorageDomain.getStorageDomainType() == StorageDomainType.Master))) {
Line 326:                         if (dbStorageDomain.getStatus() == 
StorageDomainStatus.Active
Line 327:                                 || dbStorageDomain.getStatus() == 
StorageDomainStatus.Unknown) {
Line 328:                             newMaster = dbStorageDomain;


-- 
To view, visit http://gerrit.ovirt.org/22016
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I705298d4f94b4afacc3ca028bb0a4e6080ac5a46
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
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

Reply via email to