Sergey Gotliv has posted comments on this change.

Change subject: core: prevent maintenance when domain is sill in use
......................................................................


Patch Set 5:

(6 comments)

http://gerrit.ovirt.org/#/c/22045/5//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2013-12-04 17:43:13 +0100
Line 4: Commit:     Federico Simoncelli <[email protected]>
Line 5: CommitDate: 2014-01-13 09:25:31 +0100
Line 6: 
Line 7: core: prevent maintenance when domain is sill in use
s/sill/still
Line 8: 
Line 9: Change-Id: I55cd5aa6a6dc32f374a4bb21b159d3cb30da65f5


http://gerrit.ovirt.org/#/c/22045/5/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 108:                 return 
failCanDoAction(VdcBllMessages.ERROR_CANNOT_DEACTIVATE_MASTER_WITH_NON_DATA_DOMAINS);
Line 109:             }
Line 110: 
Line 111:             if (!filterDomainsByStatus(domains, 
StorageDomainStatus.Locked).isEmpty()
Line 112:                     || !filterDomainsByStatus(domains, 
StorageDomainStatus.MovingToMaintenance).isEmpty()) {
Does this message still relevant here? Its name indicates that we are talking 
about locked storage domain, now we have this new status.

VdcBllMessages.ERROR_CANNOT_DEACTIVATE_MASTER_WITH_LOCKED_DOMAINS
Line 113:                 return 
failCanDoAction(VdcBllMessages.ERROR_CANNOT_DEACTIVATE_MASTER_WITH_LOCKED_DOMAINS);
Line 114:             }
Line 115:         }
Line 116:         if (!getParameters().getIsInternal()


http://gerrit.ovirt.org/#/c/22045/5/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java:

Line 1010:             mCurrentVdsId = null;
Line 1011:         }
Line 1012: 
Line 1013:         private final DomainVisibility _domainsVisibility = new 
DomainVisibility();
Line 1014: 
Please, remove "_".
Line 1015:         private static Map<Guid, VDSDomainsData> 
getDataDomainsMap(ArrayList<VDSDomainsData> domainsDataList) {
Line 1016:             Map<Guid, VDSDomainsData> dataDomainMap = new 
HashMap<>();
Line 1017:             for (VDSDomainsData domainsData : domainsDataList) {
Line 1018:                 dataDomainMap.put(domainsData.getDomainId(), 
domainsData);


Line 1059:                 }
Line 1060:             }
Line 1061:         }
Line 1062: 
Line 1063:         private void moveDomainToMaintenance(StorageDomain 
poolDomain) {
Please, change poolDomain to just domain.
Line 1064:             // This is relevant only for domains that are in the 
process of being moved to maintenance
Line 1065:             if (poolDomain.getStatus() != 
StorageDomainStatus.MovingToMaintenance) {
Line 1066:                 return;
Line 1067:             }


Line 1065:             if (poolDomain.getStatus() != 
StorageDomainStatus.MovingToMaintenance) {
Line 1066:                 return;
Line 1067:             }
Line 1068: 
Line 1069:             for (VDS poolVds : 
DbFacade.getInstance().getVdsDao().getAllForStoragePool(_storagePoolId)) {
I would use hosts instead of poolVds.
Line 1070:                 // Skip vds that are in maintenance
Line 1071:                 if (poolVds.getStatus() == VDSStatus.Maintenance) {
Line 1072:                     continue;
Line 1073:                 }


Line 1072:                     continue;
Line 1073:                 }
Line 1074: 
Line 1075:                 if 
(!_domainsVisibility.isDomainUnreportedByVds(poolVds.getId(), 
poolDomain.getId())) {
Line 1076:                     // Domain is still visible or unreachable by one 
vds, cannot move to maintenance
Please, add appropriate log message here. Unreachable by which host.
Line 1077:                     return;
Line 1078:                 }
Line 1079:             }
Line 1080: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I55cd5aa6a6dc32f374a4bb21b159d3cb30da65f5
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to