Bug 2075765
| Summary: | [cgroup] Libvirt cannot operate vm control groups after restarting virtqemud | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | yisun |
| Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
| libvirt sub component: | General | QA Contact: | yisun |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | medium | ||
| Priority: | medium | CC: | dzheng, jdenemar, jsuchane, lmen, mprivozn, virt-maint, xuzhang, yafu, yalzhang |
| Version: | 9.1 | Keywords: | Automation, Regression, Upstream |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-8.3.0-1.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-15 10:04:06 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: | 8.3.0 |
| Embargoed: | |||
|
Description
yisun
2022-04-15 08:17:37 UTC
In fact, there's nothing split daemon specific about this. It's a pure typo that reversed one condition during code refactor. Patch posted here: https://listman.redhat.com/archives/libvir-list/2022-April/230167.html Merged upstream as:
commit eac8de54a68725402ec4785888dddad656db609d
Author: Michal Prívozník <mprivozn>
AuthorDate: Tue Apr 19 17:22:22 2022 +0200
Commit: Michal Prívozník <mprivozn>
CommitDate: Wed Apr 20 09:52:56 2022 +0200
domain_cgroup: Fix a condition in virDomainCgroupConnectCgroup()
While parts of QEMU's CGroup code were moved under hypervisor
agnostic location (src/hypervisor/) a typo sneaked in. The
inspiration for virDomainCgroupConnectCgroup() comes from
qemuConnectCgroup(). The former is called upon reconnecting to a
running domain (after daemon restart). While the latter returned
early if the daemon was running unprivileged, the former returns
early if the daemon runs privileged. This is obviously wrong,
because root can set up CGroups.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2075765
Fixes: 788e2b58cb1896f1c25ebbdbde4bafddc5ed4dc9
Signed-off-by: Michal Privoznik <mprivozn>
Reviewed-by: Ján Tomko <jtomko>
v8.2.0-193-geac8de54a6
*** Bug 2073905 has been marked as a duplicate of this bug. *** Previrified with:
[root@yisun-mar-fed x86_64]# rpm -qa | grep libvirt-8
libvirt-8.3.0-1.fc34.x86_64
Steps:
1. enable modular daemon manually and check cgroup mounted
#systemctl stop libvirtd.service
#systemctl stop libvirtd{,-ro,-admin,-tcp,-tls}.socket
#systemctl start virtqemud
#systemctl start virtproxyd
[root@yisun-mar-fed x86_64]# mount | grep cgroup
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate,memory_recursiveprot)
2. have a running vm
[root@yisun-mar-fed x86_64]# virsh domstate lmn
running
3. set vm's mem hard limit
[root@yisun-mar-fed x86_64]# virsh memtune lmn --hard-limit=222222222
[root@yisun-mar-fed x86_64]# virsh memtune lmn
hard_limit : 222222220
soft_limit : unlimited
swap_hard_limit: unlimited
4. restart virtqmeud
[root@yisun-mar-fed x86_64]# systemctl restart virtqemud
[root@yisun-mar-fed x86_64]# systemctl status virtqemud
● virtqemud.service - Virtualization qemu daemon
Loaded: loaded (/usr/lib/systemd/system/virtqemud.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2022-04-22 12:29:26 UTC; 9s ago
TriggeredBy: ● virtqemud.socket
● virtqemud-admin.socket
● virtqemud-ro.socket
Docs: man:virtqemud(8)
https://libvirt.org
Main PID: 251218 (virtqemud)
Tasks: 19 (limit: 32768)
Memory: 8.6M
CPU: 795ms
CGroup: /system.slice/virtqemud.service
└─251218 /usr/sbin/virtqemud --timeout 120
Apr 22 12:29:26 yisun-mar-fed systemd[1]: Starting Virtualization qemu daemon...
Apr 22 12:29:26 yisun-mar-fed systemd[1]: Started Virtualization qemu daemon.
5. check the memtune taking effect
[root@yisun-mar-fed x86_64]# virsh memtune lmn
hard_limit : 222222220
soft_limit : unlimited
swap_hard_limit: unlimited
*** Bug 2078791 has been marked as a duplicate of this bug. *** test result passed with libvirt-8.3.0-1.el9.x86_64 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 (Low: libvirt security, bug fix, and enhancement update), 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/RHSA-2022:8003 |