Bug 1781115
Summary: | libvirtd: reset CPU affinity to all enabled CPUs, when runs in custom cpuset | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | jiyan <jiyan> |
Component: | libvirt | Assignee: | Pavel Hrdina <phrdina> |
Status: | CLOSED ERRATA | QA Contact: | jiyan <jiyan> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.2 | CC: | dyuan, dzheng, jdenemar, jean-mickael.guerin, lhuang, lmen, lmiksik, phrdina, sergey.kuya, valentina.krasnobaeva, xuzhang, yalzhang |
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-5.10.0-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1746517 | Environment: | |
Last Closed: | 2020-05-05 09:52:05 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1746517 | ||
Bug Blocks: |
Description
jiyan
2019-12-09 10:58:17 UTC
Fixed in upstream by commit v5.9.0-261-g4c0398b528 and part of downstream build libvirt-5.10.0-1.el8. Moving to MODIFIED. Reproduce this bug with libvirt-5.9.0-4.module+el8.2.0+4836+a8e32ad7.x86_64 and verified this bug with libvirt-6.0.0-15.module+el8.2.0+6106+b6345808.x86_64 Version: libvirt-5.9.0-4.module+el8.2.0+4836+a8e32ad7.x86_64 qemu-kvm-4.2.0-16.module+el8.2.0+6092+4f2391c1.x86_64 kernel-4.18.0-192.el8.x86_64 Steps: 1: Configure cpuset.cpus of cgroup # lscpu | grep On On-line CPU(s) list: 0-39 # echo "0,2,4,6,8" > /sys/fs/cgroup/cpuset/machine.slice/cpuset.cpus # cat /sys/fs/cgroup/cpuset/machine.slice/cpuset.cpus 0,2,4,6,8 2: Create a VM with the following XML # cat vm.xml ... <vcpu placement="static">2</vcpu> <cputune> <vcpupin vcpu="0" cpuset="2"/> <vcpupin vcpu="1" cpuset="4"/> </cputune> <cpu> <numa> <cell id="0" cpus="1" memory="1048576" memAccess="shared"/> </numa> </cpu> <numatune> <memory mode="strict" nodeset="0"/> </numatune> # virsh create vm.xml error: Failed to create domain from vm.xml error: Unable to write to '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator/cpuset.cpus': Permission denied 3. Check libvirtd log after step-2 # tail -f /var/log/libvirt/libvirtd.log 2020-03-27 11:03:25.845+0000: 13417: debug : virCgroupV1MakeGroup:613 : Make group /machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator 2020-03-27 11:03:25.845+0000: 13417: debug : virCgroupV1MakeGroup:633 : Make controller /sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator/ 2020-03-27 11:03:25.845+0000: 13417: debug : virCgroupV1MakeGroup:633 : Make controller /sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator/ 2020-03-27 11:03:25.845+0000: 13417: debug : virCgroupV1MakeGroup:633 : Make controller /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator/ 2020-03-27 11:03:25.845+0000: 13417: debug : virCgroupV1CpuSetInherit:557 : Setting up inheritance /machine.slice/machine-qemu\x2d1\x2dvm.scope -> /machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator 2020-03-27 11:03:25.845+0000: 13417: debug : virCgroupGetValueRaw:489 : Get value /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/cpuset.cpus 2020-03-27 11:03:25.845+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.845+0000: 13417: debug : virCgroupV1CpuSetInherit:567 : Inherit cpuset.cpus = 0,2,4,6,8 2020-03-27 11:03:25.845+0000: 13417: debug : virCgroupSetValueRaw:463 : Set value '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator/cpuset.cpus' to '0,2,4,6,8' 2020-03-27 11:03:25.846+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupGetValueRaw:489 : Get value /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/cpuset.mems 2020-03-27 11:03:25.846+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1CpuSetInherit:567 : Inherit cpuset.mems = 0-1 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupSetValueRaw:463 : Set value '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator/cpuset.mems' to '0-1' 2020-03-27 11:03:25.846+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupGetValueRaw:489 : Get value /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/cpuset.memory_migrate 2020-03-27 11:03:25.846+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1CpuSetInherit:567 : Inherit cpuset.memory_migrate = 1 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupSetValueRaw:463 : Set value '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator/cpuset.memory_migrate' to '1' 2020-03-27 11:03:25.846+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1MakeGroup:626 : Skipping unmounted controller memory 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1MakeGroup:626 : Skipping unmounted controller devices 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1MakeGroup:626 : Skipping unmounted controller freezer 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1MakeGroup:626 : Skipping unmounted controller blkio 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1MakeGroup:626 : Skipping unmounted controller net_cls 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1MakeGroup:626 : Skipping unmounted controller perf_event 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1MakeGroup:619 : Not creating systemd controller group 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupV1MakeGroup:672 : Done making controllers for group 2020-03-27 11:03:25.846+0000: 13417: debug : virCgroupSetValueRaw:463 : Set value '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator/cpuset.cpus' to '0-39' 2020-03-27 11:03:25.846+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.846+0000: 13417: error : virCgroupSetValueRaw:473 : Unable to write to '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/emulator/cpuset.cpus': Permission denied 4. Update libvirt and restart libvirtd # yum update libvirt* -y # rpm -qa libvirt libvirt-6.0.0-15.module+el8.2.0+6106+b6345808.x86_64 # systemctl restart libvirtd 5. Restart step-2 and step-3 # virsh create vm.xml Domain vm created from vm.xml # tail -f /var/log/libvirt/libvirtd.log 2020-03-27 11:03:25.841+0000: 13417: debug : virCgroupV1MakeGroup:613 : Make group /machine.slice/machine-qemu\x2d1\x2dvm.scope 2020-03-27 11:03:25.841+0000: 13417: debug : virCgroupV1MakeGroup:633 : Make controller /sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2d1\x2dvm.scope/ 2020-03-27 11:03:25.841+0000: 13417: debug : virCgroupV1MakeGroup:633 : Make controller /sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2d1\x2dvm.scope/ 2020-03-27 11:03:25.841+0000: 13417: debug : virCgroupV1MakeGroup:633 : Make controller /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/ 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupV1CpuSetInherit:557 : Setting up inheritance /machine.slice -> /machine.slice/machine-qemu\x2d1\x2dvm.scope 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupGetValueRaw:489 : Get value /sys/fs/cgroup/cpuset/machine.slice/cpuset.cpus 2020-03-27 11:03:25.842+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupV1CpuSetInherit:567 : Inherit cpuset.cpus = 0,2,4,6,8 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupSetValueRaw:463 : Set value '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/cpuset.cpus' to '0,2,4,6,8' 2020-03-27 11:03:25.842+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupGetValueRaw:489 : Get value /sys/fs/cgroup/cpuset/machine.slice/cpuset.mems 2020-03-27 11:03:25.842+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupV1CpuSetInherit:567 : Inherit cpuset.mems = 0-1 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupSetValueRaw:463 : Set value '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/cpuset.mems' to '0-1' 2020-03-27 11:03:25.842+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupGetValueRaw:489 : Get value /sys/fs/cgroup/cpuset/machine.slice/cpuset.memory_migrate 2020-03-27 11:03:25.842+0000: 13417: debug : virFileClose:114 : Closed fd 37 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupV1CpuSetInherit:567 : Inherit cpuset.memory_migrate = 0 2020-03-27 11:03:25.842+0000: 13417: debug : virCgroupSetValueRaw:463 : Set value '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d1\x2dvm.scope/cpuset.memory_migrate' to '0' All the test results are as expected, move this bug to be verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2017 |