[systemd-devel] machined: after CPU offline then online, vcpupin KVM guest failed to start
Dr. Werner Fink
werner at suse.de
Wed Aug 3 12:46:13 UTC 2016
Hi,
problem with v228 (and I guess this is also later AFAICS from logs of
current git) that repeating CPU hotplug events (offline/online). The
root cause is that cpuset.cpus become not restored by machined.
Please note that libvirt can not do this as it is not allowed to do so.
Steps to reproduce:
1. Configure vCPU pinning.
# virsh vcpupin guest-os 0 0-3 --config
2. Boot the guest.
# virsh start guest-os
3. Shutdown the guest.
# virsh shutdown guest-os
4. Offline one of host CPUs.
# echo 0 > /sys/devices/system/cpu/cpu3/online
5. Online the host CPU again.
# echo 1 > /sys/devices/system/cpu/cpu3/online
6. Boot the guest again.
# virsh start guest-os
Actual result:
error: Failed to start domain guest-os
error: Unable to write to '/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2d2\x2dsles12sp2\x2dbeta3.scope/vcpu0/cpuset.cpus': Permission denied
Expected result:
The KVM guest may boot without errors.
this could be done by hand with
# echo 0-31 > /sys/fs/cgroup/cpuset/machine.slice/cpuset.cpus
as libvirt can't touch the cpuset in machine.slice scope since
this one is owned by machined.
This problem is also discussed at upstream of libvirt
https://www.redhat.com/archives/libvir-list/2012-April/msg00777.html
and seems to be a well know problem not only here:
https://bugzilla.redhat.com/show_bug.cgi?id=838070
from the kernel's side this seems to a behavior by design, from right before
the cpuset_hotplug_workfn():
/*
* [...]
* Non-root cpusets are only affected by offlining. If any CPUs or memory
* nodes have been taken down, cpuset_hotplug_update_tasks() is invoked on
* all descendants.
* [...]
*/
Werner
PS: Using https://github.com/systemd/systemd/issues/new seems to be very limited
with > *NOTE: Do not submit bug reports about anything but the two most recently
> released systemd versions upstream!*
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160803/8c8f7ade/attachment.sig>
More information about the systemd-devel
mailing list