phsm commented on code in PR #10221:
URL: https://github.com/apache/cloudstack/pull/10221#discussion_r1926741646


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -2796,8 +2800,18 @@ public int calculateCpuShares(VirtualMachineTO vmTO) {
 
         if (hostCpuMaxCapacity > 0) {

Review Comment:
   You are correct: the Cloudstack agent correctly determines that the system 
uses cgroup v2.
   
   However, the older libvirt applies the cgroupv1 range as the restriction 
regardless to which cgroup version it uses.
   For example, the libvirt code of version 8.0.0 which is used in Ubuntu 
22.04: 
https://github.com/libvirt/libvirt/blob/v8.0.0/src/conf/domain_validate.c#L1536-L1538
 . As you see there, the function just checks the value to be within range, 
without consideration which cgroup version is in action. 
   
   So technically this PR does not fix a bug in Cloudstack - it adjust 
Cloudstack to be compatible with the buggy behavior of older Libvirt.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to