Bug 1820437
| Summary: | Libvirtd service is not restarted on upgrade if socket activation is disabled | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | mxie <mxie> |
| Component: | libvirt | Assignee: | Martin Kletzander <mkletzan> |
| libvirt sub component: | General | QA Contact: | yafu <yafu> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | medium | ||
| Priority: | high | CC: | berrange, chhu, dzheng, jdenemar, jferlan, jsuchane, juzhou, lizhu, lmen, mkletzan, mzhan, tyan, tzheng, virt-maint, xiaodwan, xuzhang, yafu, yalzhang |
| Version: | unspecified | Keywords: | Reopened, Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-9.0.0-1.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-09 07:26:10 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: | 9.0.0 |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1897025 | ||
It seems to be introduced by commit 66d04312d03c24c62bcf3b1dc2706f8775d4e2d3. If you intentionally edit the /etc/sysconfig/libvirtd you basically disable socket activation with next upgrade and keep the traditional startup mode without restarting the daemon. Dan is this intentional? If so, please close this bug. Thanks. This is a valid bug - we must *ALWAYS* ensure libvirtd is restarted if it was previously running. This is true regardless of socket activation state. Bulk update: Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release. After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. Hi John, I reopened the bug. Could you help to confirm whether this bug should be fixed please? Thanks. Passing the needinfo to Jarda... Seems based on Daniel's response that this needs to be resolved - whether it has or hasn't already been resolved is something I'm not sure. Can you please re-test it with current RHEL-9 and add reproducer description to the comment? Thanks. (In reply to Jaroslav Suchanek from comment #11) > Can you please re-test it with current RHEL-9 and add reproducer description > to the comment? Thanks. Hi Jarda, In my understanding, the bug only reproduces when upgrading from rhel8 or lower versions and can not reproduce when upgrading from rhel9, because modular daemons starting by systemd always exist with the socket activation. According to https://bugzilla.redhat.com/show_bug.cgi?id=1822890#c2, virtproxyd process does not support "--listen" option. Thanks, Yan Fu Hi Jarda, Could you please help to evaluate if this bug need to be fixed? If yes, I will extend the stale date or it will be auto closed. Thank you! After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. Yes, this should be fixed. Fix proposed upstream: https://www.mail-archive.com/libvir-list@redhat.com/msg234877.html Fixed upstream with v9.0.0-rc1-3-g8f93d546d198:
commit 8f93d546d198c7dc47068dbc0f233aad28b0e33a
Author: Martin Kletzander <mkletzan>
Date: Tue Jan 10 12:21:56 2023 +0100
spec: Restart libvirtd on upgrade without socket activation
Reproduced with libvirt-8.10.0-1.el9.x86_64.
Verified with libvirt-9.0.0-2.el9.x86_64.
Test steps:
1.Disable virtqemud and enable libvirtd:
#systemclt disable virtqemud
#systemctl enable libvirtd
2.Create sysconfig file to disable socket activation:
#cat /etc/sysconfig/libvirtd
LIBVIRTD_ARGS="--listen"
3.Revert to the traditional mode:
# systemctl mask libvirtd.socket libvirtd-ro.socket \
libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket
4.Disable auth_tls in libvirtd.conf:
#vim /etc/libvirt/libvirtd.conf
listen_tls = 1
auth_tls = "none"
5.Restart libvirtd:
#systemctl restart libvirtd
6.Check libvirtd's mode:
# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset:>
Active: active (running) since Sun 2023-01-29 03:02:53 EST; 5s ago
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 829411 (libvirtd)
Tasks: 19 (limit: 32768)
Memory: 18.8M
CPU: 552ms
CGroup: /system.slice/libvirtd.service
└─829411 ***/usr/sbin/libvirtd --listen***
7.Upgrade libvirt pkgs:
#yum -y upgrade libvirt
...
Upgraded:
libvirt-9.0.0-2.el9.x86_64
libvirt-client-9.0.0-2.el9.x86_64
libvirt-daemon-9.0.0-2.el9.x86_64
libvirt-daemon-config-network-9.0.0-2.el9.x86_64
...
8.Confirm libvirtd was restarting in step7:
# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: disabled)
Active: ***active (running) since Sun 2023-01-29 03:12:34 EST; 6s ago***
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 830260 (libvirtd)
Tasks: 19 (limit: 32768)
Memory: 22.9M
CPU: 556ms
CGroup: /system.slice/libvirtd.service
└─830260 /usr/sbin/libvirtd --listen
Verified with libvirt-9.0.0-3.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 (libvirt 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/RHBA-2023:2171 |
Description of problem: Libvirtd service with systemd socket activation disabled can't restart automatically after updating/downgrading libvirt packages Version-Release number of selected component (if applicable): libvirt-6.0.0-16.module+el8.2.0+6139+d66dece5.x86_64 qemu-kvm-4.2.0-17.module+el8.2.0+6141+0f540f16.x86_64 virt-v2v-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64 How reproducible: 100% Steps to Reproduce: 1.Modify /etc/sysconfig/libvirtd to disable systemd socket activation # If systemd socket activation is disabled, then the following # can be used to listen on TCP/TLS sockets LIBVIRTD_ARGS="--listen" 2.Check current version of libvirt packages and status of libvirtd service, the active time of libvirtd service is 2020-04-03 10:39:50 # rpm -q libvirt libvirt-6.0.0-12.module+el8.2.0+6034+e58cb6e4.x86_64 # service libvirtd status Redirecting to /bin/systemctl status libvirtd.service ● libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2020-04-03 10:39:50 CST; 2min 26s ago Docs: man:libvirtd(8) https://libvirt.org Main PID: 189988 (libvirtd) Tasks: 17 (limit: 32768) Memory: 26.8M CGroup: /system.slice/libvirtd.service └─189988 /usr/sbin/libvirtd --listen 3.Update libvirt packages to 6.0.0-16, check status of libvirtd service after updating, found active time of libvirtd service is still 2020-04-03 10:39:50 which means libvirtd service isn't restarted automatically #yum update libvirt -y #rpm -q libvirt libvirt-6.0.0-16.module+el8.2.0+6139+d66dece5.x86_64 # service libvirtd status Redirecting to /bin/systemctl status libvirtd.service ● libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2020-04-03 10:39:50 CST; 5min ago Docs: man:libvirtd(8) https://libvirt.org Main PID: 189988 (libvirtd) Tasks: 17 (limit: 32768) Memory: 26.9M CGroup: /system.slice/libvirtd.service └─189988 /usr/sbin/libvirtd --listen Actual results: As above description Expected results: Libvirtd service with systemd socket activation disabled can't restart automatically after updating/downgrading libvirt packages Additional info: Libvirtd service with systemd socket activation enabled can restart automatically after updating/downgrading libvirt packages 1.Modify /etc/sysconfig/libvirtd to enable systemd socket activation # cat /etc/sysconfig/libvirtd ... #LIBVIRTD_ARGS="--timeout 120" .... 2.Check current libvirt package version and libvirtd service status # rpm -q libvirt libvirt-6.0.0-12.module+el8.2.0+6034+e58cb6e4.x86_64 # systemctl status libvirtd ● libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2020-04-03 13:18:45 CST; 1min 27s ago Docs: man:libvirtd(8) https://libvirt.org Main PID: 203497 (libvirtd) Tasks: 17 (limit: 32768) Memory: 26.3M CGroup: /system.slice/libvirtd.service └─203497 /usr/sbin/libvirtd 3. Update libvirt and check libvirtd service status, the active time of libvirtd service is changed # yum update libvirt -y # rpm -q libvirt libvirt-6.0.0-16.module+el8.2.0+6139+d66dece5.x86_64 # systemctl status libvirtd ● libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2020-04-03 13:22:22 CST; 29s ago Docs: man:libvirtd(8) https://libvirt.org Main PID: 204219 (libvirtd) Tasks: 17 (limit: 32768) Memory: 25.4M CGroup: /system.slice/libvirtd.service └─204219 /usr/sbin/libvirtd