Lior Vernia has posted comments on this change.

Change subject: engine: Improve reporting when scheduling fail on network
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.ovirt.org/#/c/29790/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/NetworkPolicyUnit.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/NetworkPolicyUnit.java:

Line 183: 
Line 184:         // Check if display network attached to host and has a proper 
boot protocol
Line 185:         if (displayNic == null) {
Line 186:             log.debugFormat("host {0} is missing the cluster's 
display network", host.getName());
Line 187:             return new 
ValidationResult(VdcBllMessages.VAR__DETAIL__DISPLAY_NETWORK_MISSING);
> Check the logic: If the display network is not set, then I have a null valu
Differentiate between the displayNic and displayNetwork. displayNetwork is 
passed here as an argument, and it should "never" be null, even if displayNic 
is null.

I said "never" because this was only fixed in 3.4 (if I'm not mistaken), 
actually the best thing to do would be to indeed check if it's null, in which 
case call replace the variable with NetworkUtiles.getEngineNetwork(). This 
comment is relevant to the replacement below as well...
Line 188:         }
Line 189: 
Line 190:         if (displayNic.getBootProtocol() == NetworkBootProtocol.NONE) 
{
Line 191:             log.debugFormat("Host {0} has the display network {1} 
configured with improper boot protocol on interface {2}.",


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic60daf20842ba69457b293f451060e21381faf80
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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