Alona Kaplan has posted comments on this change.

Change subject: engine: Host with no display network should not be selected to 
run VMs
......................................................................


Patch Set 5: (5 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java
Line 302: 
Line 303:                 @Override
Line 304:                 public VdcBllMessages validate(VDS vds, StringBuilder 
sb, boolean isMigrate) {
Line 305:                     VdcBllMessages returnValue = 
validateRequiredNetworksAvailable(vds);
Line 306:                     if 
(VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_NETWORKS.equals(returnValue)) {
Done
Line 307:                         sb.append("is missing networks required by VM 
nics ").append(Entities.interfacesByNetworkName(getVmNICs())
Line 308:                                         .keySet());
Line 309:                     } else if 
(VdcBllMessages.ACTION_TYPE_FAILED_MISSING_DISPLAY_NETWORK.equals(returnValue)) 
{
Line 310:                         sb.append("is missing the cluster's display 
network");


Line 305:                     VdcBllMessages returnValue = 
validateRequiredNetworksAvailable(vds);
Line 306:                     if 
(VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_NETWORKS.equals(returnValue)) {
Line 307:                         sb.append("is missing networks required by VM 
nics ").append(Entities.interfacesByNetworkName(getVmNICs())
Line 308:                                         .keySet());
Line 309:                     } else if 
(VdcBllMessages.ACTION_TYPE_FAILED_MISSING_DISPLAY_NETWORK.equals(returnValue)) 
{
Done
Line 310:                         sb.append("is missing the cluster's display 
network");
Line 311:                     }
Line 312:                     return returnValue;
Line 313:                 }


Line 416:         return false;
Line 417:     }
Line 418: 
Line 419:     private void resolveDisplayNetwork(VDS host, List<Network> 
allNetworksInCluster) {
Line 420:         // Find the cluster's display network
Done
Line 421:         for (Network tempNetwork : allNetworksInCluster) {
Line 422:             if (tempNetwork.getCluster().isDisplay()) {
Line 423:                 displayNetwork = tempNetwork;
Line 424:                 displayNetworkInitialized = true;


Line 420:         // Find the cluster's display network
Line 421:         for (Network tempNetwork : allNetworksInCluster) {
Line 422:             if (tempNetwork.getCluster().isDisplay()) {
Line 423:                 displayNetwork = tempNetwork;
Line 424:                 displayNetworkInitialized = true;
Done
Line 425:                 break;
Line 426:             }
Line 427:         }
Line 428:     }


Line 454:      * 2. true: a Cluster-Required Network that is defined on an 
Active vNic of the VM.
Line 455:      *
Line 456:      * @param vdsId
Line 457:      *            The Host id.
Line 458:      * @return <code>true</code> if all required Networks are 
attached to a Host Nic, otherwise, <code>false</code>.
Done
Line 459:      */
Line 460:     private VdcBllMessages validateRequiredNetworksAvailable(VDS vds) 
{
Line 461:         final List<VdsNetworkInterface> allInterfacesForVds = 
getInterfaceDAO().getAllInterfacesForVds(vds.getId());
Line 462:         final List<Network> clusterNetworks = 
getNetworkDAO().getAllForCluster(vds.getVdsGroupId());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie90e2821f2299be85b1d4c9a6f064a4053f93e73
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to