Moti Asayag has posted comments on this change.

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


Patch Set 1: (4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java
Line 391: 
Line 392:     /**
Line 393:      * Determines whether the cluster's display network is defined on 
the vds.
Line 394:      *
Line 395:      * @param vds
s/vds/host
Line 396:      *            The VDS.
Line 397:      * @return <c>true</c> if the cluster's display network is 
defined on the vds; otherwise, <c>false</c>.
Line 398:      */
Line 399:     private boolean isDisplayNetworkAvailable(VDS vds) {


Line 392:     /**
Line 393:      * Determines whether the cluster's display network is defined on 
the vds.
Line 394:      *
Line 395:      * @param vds
Line 396:      *            The VDS.
s/vds/host
Line 397:      * @return <c>true</c> if the cluster's display network is 
defined on the vds; otherwise, <c>false</c>.
Line 398:      */
Line 399:     private boolean isDisplayNetworkAvailable(VDS vds) {
Line 400:         Network displayNetwork = null;


Line 395:      * @param vds
Line 396:      *            The VDS.
Line 397:      * @return <c>true</c> if the cluster's display network is 
defined on the vds; otherwise, <c>false</c>.
Line 398:      */
Line 399:     private boolean isDisplayNetworkAvailable(VDS vds) {
s/isDisplayNetworkAvailable/displayNetworkAvailable
as isXXX by the java bean naming convention is reserved for primitive boolean 
getters.
Line 400:         Network displayNetwork = null;
Line 401: 
Line 402:         // Find the cluster's display network
Line 403:         List<Network> allNetworksInCluster =


Line 398:      */
Line 399:     private boolean isDisplayNetworkAvailable(VDS vds) {
Line 400:         Network displayNetwork = null;
Line 401: 
Line 402:         // Find the cluster's display network
The display network should be changed between between the examination of the 
hosts within the cluster, therefore you can obtain it once, prior to iterating 
over the hosts instead of repeatedly fetching it from the DB.

getVdsToRunOn() seems like a good spot for it.

So if there is no displayNetwork configured on the cluster, the validator 
should always return true.
Line 403:         List<Network> allNetworksInCluster =
Line 404:                 
DbFacade.getInstance().getNetworkDao().getAllForCluster(vds.getVdsGroupId());
Line 405: 
Line 406:         for (Network tempNetwork : allNetworksInCluster) {


--
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: 1
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