Vitor de Lima has posted comments on this change.

Change subject: core, engine, webadmin: Consider only online logical CPUs
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.ovirt.org/#/c/33788/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmManagementCommandBase.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmManagementCommandBase.java:

Line 134:         }
Line 135: 
Line 136:         Collection<Integer> onlinePcpus = new HashSet<>();
Line 137: 
Line 138:         if (dedicatedVds.getOnlineCpus() != null) {
> add dedicatedVds != null check here
Is there any chance that the VM is associated to a invalid host (i.e. is pinned 
to a non-null invalid VDS id)?
Line 139:             String[] onlinePcpusStr = 
dedicatedVds.getOnlineCpus().split(",");
Line 140: 
Line 141:             for (String Pcpu : onlinePcpusStr) {
Line 142:                 onlinePcpus.add(Integer.parseInt(Pcpu));


Line 166:                 return 
failCanDoAction(VdcBllMessages.VM_PINNING_PINNED_TO_NO_CPU);
Line 167:             }
Line 168: 
Line 169:             // check only from cluster version 3.2
Line 170:             if (dedicatedVds != null &&
> ..and you can remove the check here (which will also make findbugs happy ;)
Done
Line 171:                     dedicatedVds.getVdsGroupCompatibilityVersion() != 
null &&
Line 172:                     
dedicatedVds.getVdsGroupCompatibilityVersion().compareTo(Version.v3_2) >= 0 &&
Line 173:                     dedicatedVds.getOnlineCpus() != null) {
Line 174: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib20f20d6003502fe2f2864abb5ad8f4f5a19ecdc
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima <vdel...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Vitor de Lima <vdel...@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