-
Bug
-
Resolution: Not a Bug
-
Minor
-
None
-
rhel-9.2.0
-
None
-
Low
-
rhel-sst-virtualization
-
ssg_virtualization
-
None
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
s390x
-
None
Description of problem:
A machine with an invalid CPU set - out of the range of available host cpus - starts successfully but is expected to fail. This seemingly happens inconsistently on a specific host with a specific number of CPUs and doesn't reproduce on other archs or s390x hosts where two different error messages are displayed and the machines wouldn't start (as expected).
Version-Release number of selected component (if applicable):
libvirt-8.9.0-2.el9.s390x
kernel-5.14.0-197.el9.s390x
How reproducible:
100% on specific s390x host
Steps to Reproduce:
1. On a host with 12 CPUs (value "CPU(s)" from lscpu|grep CPU), define a domain with cpu set out of range, e.g.
<vcpu cpuset="0-12,^2" current="3" placement="static">8</vcpu>
or equivalently
<vcpu cpuset="0-1,3-12" current="3" placement="static">8</vcpu>
2. Try to start the vm
Actual results:
The VM starts successfully
Expected results:
The VM doesn't start, instead there's an error message from cgroups "Numerical result out of range"
Additional info:
A) Yingshun confirmed the expected result on x86_64.
B) In the reported case we see cgroup values
- cat /sys/fs/cgroup/machine.slice/machine-qemu\\x2d1\\x2davocado\\x2dvt
x2dvm1.scope/libvirt/emulator/cpuset.cpus
0-1,3-12 - cat /sys/fs/cgroup/machine.slice/machine-qemu\\x2d1\\x2davocado\\x2dvt
x2dvm1.scope/libvirt/emulator/cpuset.cpus.effective
0-1,3-11
C) On another s390x host with 4 CPUs and the same component versions, this can't be reproduced, instead another error message is showing. With
<vcpu placement='static' cpuset='0-4,^2' current='3'>4</vcpu>
we get an error message
error: Invalid value '0-1,3-4' for 'cpuset.cpus': Invalid argument
Auto case is vcpu_affinity.negative_test.vcpu.outrange_cpuset
- external trackers