Skip to content

Commit

Permalink
vdsbroker: change resize and pin cpu pinning policy
Browse files Browse the repository at this point in the history
VDSM does not recognizing `resize and pin NUMA` policy. To let VDSM act
as expected the policy it needs is `manual`, as we have CPU pinning in
this policy and they are part of the shared pool.

Change-Id: Ic742086b8626009e177b0f22c77e268fd501d3c1
Bug-Url: https://bugzilla.redhat.com/2074582
Signed-off-by: Liran Rotenberg <lrotenbe@redhat.com>
  • Loading branch information
liranr23 authored and mrkev-gh committed Apr 19, 2022
1 parent b03a04a commit 351eab9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,9 @@ private void writeBalloonMetadata() {
private void writeCpuPinningPolicyMetadata() {
CpuPinningPolicy cpuPinningPolicy = vm.getCpuPinningPolicy();
// CpuPinningPolicy.NONE may happen when the engine generates CPU pinning based on the NUMA pinning.
if (vm.getVmPinning() != null && cpuPinningPolicy == CpuPinningPolicy.NONE) {
// VDSM doesn't recognize 'resize and pin numa' we need to switch it to 'manual'.
if (cpuPinningPolicy == CpuPinningPolicy.RESIZE_AND_PIN_NUMA ||
vm.getVmPinning() != null && cpuPinningPolicy == CpuPinningPolicy.NONE) {
cpuPinningPolicy = CpuPinningPolicy.MANUAL;
}
writer.writeElement(OVIRT_VM_URI, "cpuPolicy", cpuPinningPolicy.name().toLowerCase());
Expand Down

0 comments on commit 351eab9

Please sign in to comment.