Bug#904303: /sys/fs/cgroup/cpu, cpuacct/machine.slice changed after systemctl daemon-reload

Zhu Yijun lovemrd at gmail.com
Mon Jul 23 03:11:15 BST 2018


Package: systemd
Version: 232-25+deb9u4


Description of problem:
After a 'systemctl daemon-reload' followed by any service 'systemctl
restart xxx' the blkio, cpu,cpuacct、memory cgroup path changed.

Steps to Reproduce:
1. Create and launch a basic VM
2. Check that the cgroups are mapped properly for example with 'virsh
memtune VM_NAME'
3. Execute 'systemctl daemon-reload'
4. Restart _any_ service on your machine, such as : systemctl restart libvirtd

before:
10:perf_event:/machine/qemu-1462-zyjtest.libvirt-qemu
9:blkio:/machine/qemu-1462-zyjtest.libvirt-qemu
8:cpu,cpuacct:/machine/qemu-1462-zyjtest.libvirt-qemu/emulator
7:memory:/machine/qemu-1462-zyjtest.libvirt-qemu
6:freezer:/machine/qemu-1462-zyjtest.libvirt-qemu
5:pids:/system.slice/libvirtd.service
4:devices:/machine/qemu-1462-zyjtest.libvirt-qemu
3:cpuset:/machine/qemu-1462-zyjtest.libvirt-qemu/emulator
2:net_cls,net_prio:/machine/qemu-1462-zyjtest.libvirt-qemu
1:name=systemd:/system.slice/libvirtd.service

after results:
10:perf_event:/machine/qemu-1462-zyjtest.libvirt-qemu
9:blkio:/
8:cpu,cpuacct:/
7:memory:/
6:freezer:/machine/qemu-1462-zyjtest.libvirt-qemu
5:pids:/system.slice/libvirtd.service
4:devices:/system.slice/libvirtd.service
3:cpuset:/machine/qemu-1462-zyjtest.libvirt-qemu/emulator
2:net_cls,net_prio:/machine/qemu-1462-zyjtest.libvirt-qemu
1:name=systemd:/system.slice/libvirtd.servi

# virsh memtune zyj_test
error: Unable to get memory parameters
error: Requested operation is not valid: cgroup memory controller is not mounted

I found a similar description at :
https://bugzilla.redhat.com/show_bug.cgi?id=1140215

And I had checked this systemd version had merged the patches.
core: introduce new Delegate=yes/no property controlling creation of
cgroup subhierarchies
core: don't migrate PIDs for units that may contain subcgroups, do
this only for leaf units

However, this issue is still exist.

Zhu Yijun



More information about the Pkg-systemd-maintainers mailing list