sureshanaparti commented on a change in pull request #4527:
URL: https://github.com/apache/cloudstack/pull/4527#discussion_r539875986



##########
File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
##########
@@ -4239,10 +4239,10 @@ private void setCpuTopology(CpuModeDef cmd, int vcpus, 
Map<String, String> detai
                 numCoresPerSocket = 6;
             } else if (vcpus % 4 == 0) {
                 numCoresPerSocket = 4;
-            } else {
-                numCoresPerSocket = 1;
             }
         }
-        cmd.setTopology(numCoresPerSocket, vcpus / numCoresPerSocket);
+        if (numCoresPerSocket > 0) {
+            cmd.setTopology(numCoresPerSocket, vcpus / numCoresPerSocket);
+        }

Review comment:
       code LGTM




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to