This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new b3c3f917186 api: add to cpu speed parameter a description of the
cgroup2 case (#9191)
b3c3f917186 is described below
commit b3c3f917186efe46bc84e1bf7955989f5cb0b935
Author: dahn <[email protected]>
AuthorDate: Thu Jun 13 09:06:20 2024 +0200
api: add to cpu speed parameter a description of the cgroup2 case (#9191)
This PR adds to the cpuSpeed parameter of CreateServiceOfferingCmd a
description how it will be interpreted in the case cgroups are being used on
KVM.
Fixes: #6743
Co-authored-by: Bryan Lima <[email protected]>
---------
Co-authored-by: Bryan Lima <[email protected]>
---
.../api/command/admin/offering/CreateServiceOfferingCmd.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
index d947f6f0659..e3b2887ad33 100644
---
a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
+++
b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
@@ -56,7 +56,11 @@ public class CreateServiceOfferingCmd extends BaseCmd {
@Parameter(name = ApiConstants.CPU_NUMBER, type = CommandType.INTEGER,
required = false, description = "the CPU number of the service offering")
private Integer cpuNumber;
- @Parameter(name = ApiConstants.CPU_SPEED, type = CommandType.INTEGER,
required = false, description = "the CPU speed of the service offering in MHz.")
+ @Parameter(name = ApiConstants.CPU_SPEED, type = CommandType.INTEGER,
required = false, description = "For VMware and Xen based hypervisors this is
the CPU speed of the service offering in MHz.\n" +
+ "For the KVM hypervisor," +
+ " the values of the parameters cpuSpeed and cpuNumber will be used
to calculate the `shares` value. This value is used by the KVM hypervisor to
calculate how much time" +
+ " the VM will have access to the host's CPU. The `shares` value
does not have a unit, and its purpose is being a weight value for the host to
compare between its guest" +
+ " VMs. For more information, see
https://libvirt.org/formatdomain.html#cpu-tuning.")
private Integer cpuSpeed;
@Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING,
description = "The display text of the service offering, defaults to 'name'.")