Federico Simoncelli has posted comments on this change.

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


Patch Set 1:

(5 comments)

....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
Line 1015:             // Step 1: if the host is not Up remove it from all the 
entries in the _domainsVisibility
Line 1016:             if (vds.getStatus() == VDSStatus.Maintenance) {
Line 1017:                 for (HashSet<Guid> domainHostsSet : 
_domainsVisibility.values()) {
Line 1018:                     if (domainHostsSet.contains(vds.getId())) {
Line 1019:                         log.infoFormat("Removing domain in 
maintenance {0} from the domain visibility map",
Log entries are for me at this stage.
Line 1020:                                 vds.getName());
Line 1021:                         domainHostsSet.remove(vds.getId());
Line 1022:                     }
Line 1023:                 }


Line 1043: 
Line 1044:                 domainHostsSet = 
_domainsVisibility.get(domainData.getDomainId());
Line 1045:                 if (domainHostsSet == null) {
Line 1046:                     log.infoFormat("Adding the domain {0} to the 
domain visibility map",
Line 1047:                             domainData.getDomainId());
Log entries are for me at this stage.
Line 1048:                     domainHostsSet = new HashSet<>();
Line 1049:                     _domainsVisibility.put(domainData.getDomainId(), 
domainHostsSet);
Line 1050:                 }
Line 1051: 


Line 1050:                 }
Line 1051: 
Line 1052:                 if (!domainHostsSet.contains(vds.getId()) && 
!isDomainReportedAsProblematic(domainData, false)) {
Line 1053:                     log.infoFormat("Adding a new VDS {0} to the 
visibility map for domain {1}",
Line 1054:                             vds.getName(), domainData.getDomainId());
Log entries are for me at this stage.
Line 1055:                     domainHostsSet.add(vds.getId());
Line 1056:                 }
Line 1057:             }
Line 1058: 


Line 1063:                 if (domainData == null || 
isDomainReportedAsProblematic(domainData, false)) {
Line 1064:                     HashSet<Guid> domainHostsSet = 
_domainsVisibility.get(poolDomain.getId());
Line 1065:                     if (domainHostsSet != null && 
domainHostsSet.contains(vds.getId())) {
Line 1066:                         log.infoFormat("Removing VDS {0} from the 
visibility map of domain {1}",
Line 1067:                                 vds.getName(), poolDomain.getId());
Log entries are for me at this stage.
Line 1068:                         domainHostsSet.remove(vds.getId());
Line 1069:                     }
Line 1070:                 }
Line 1071:             }


Line 1073:             // Step 4: check if any domain can be removed from the 
map (detached and not reported by any vds)
Line 1074:             for (Guid storageDomainId : _domainsVisibility.keySet()) 
{
Line 1075:                 if (!poolDomainMap.containsKey(storageDomainId)) {
Line 1076:                     // TODO: check that there are not vds in the 
HashSet
Line 1077:                     log.infoFormat("Removing domain {0} from the 
visibility map");
Log entries are for me at this stage.
Line 1078:                     _domainsVisibility.remove(storageDomainId);
Line 1079:                 }
Line 1080:             }
Line 1081: 


-- 
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: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[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