Bug 2032365
Summary: | libvirt-daemon scriptlet fails to disable units and close sockets during package removal | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | smitterl |
Component: | libvirt | Assignee: | Daniel Berrangé <berrange> |
libvirt sub component: | General | QA Contact: | yafu <yafu> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | unspecified | CC: | berrange, jdenemar, jjaburek, pkrempa, virt-maint, xuzhang, yafu, yanqzhan |
Version: | 9.0 | Keywords: | Triaged |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-8.0.0-0rc1.1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-17 12:45:52 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.0.0 |
Embargoed: |
Description
smitterl
2021-12-14 12:07:53 UTC
(In reply to smitterl from comment #0) > Running scriptlet: libvirt-daemon-7.10.0-1.el9.s390x > 19/20 > Removed /etc/systemd/system/sockets.target.wants/virtproxyd.socket. > Failed to disable unit: Unit file virtlogd-ro.socket does not exist. > Failed to disable unit: Unit file virtlockdd.service does not exist. Opps, there's a typo here 'virtlockdd' should 'virtlockd'. https://listman.redhat.com/archives/libvir-list/2021-December/msg00646.html Also, there's no -ro.socket for virtlogd / virtlockd so we need to stop refering to that https://listman.redhat.com/archives/libvir-list/2021-December/msg00651.html I've confirmed that those two mistakes in the %preun script are what resulted in the systemd socket units being left active after uninstall. So pulling in the two upstream fixes should address this. Verified pass with libvirt-8.0.0-1. *** Bug 2041626 has been marked as a duplicate of this bug. *** Test with libvirt-8.0.0-1.el9.x86_64. Test steps: 1.Install libvirt pkgs: #yum -y install libvirt* 2.Start virtqemud: #systemctl start virtqemud 3.Start a guest: #virsh start vm1 4.Check virtlogd* status: # systemctl -a | grep -i virtlogd virtlogd.service loaded active running Virtual machine log manager virtlogd-admin.socket loaded active running Virtual machine log manager socket virtlogd.socket loaded active running Virtual machine log manager socket 5.Remove libvirt pkgs: #yum -y remove libvirt* 6.Check daemons installed by libvirt pkgs: #systemctl -a | grep -i virt ... ● libvirtd.service not-found inactive dead libvirtd.service ... ● virtnetworkd.service not-found inactive dead virtnetworkd.service ... ● virt-guest-shutdown.target not-found inactive dead virt-guest-shutdown.target ... 7.Install libvirt pkgs again: #yum -y install libvirt* 8.Start virtqemud service: #systemctl start virtqemud 9.Start a guest: #virsh start vm1 Domain 'vm1' started 10.Check virtlogd* service status: # systemctl -a | grep -i virtlogd virtlogd.service loaded active running Virtual machine log manager virtlogd-admin.socket loaded active running Virtual machine log manager socket virtlogd.socket loaded active running Virtual machine log manager socket Hi Daniel, In step4, after removing libvirt pkgs, still show some service info installed by libvirt pkgs. Would you help to check it please? Thanks. (In reply to yafu from comment #10) > Test with libvirt-8.0.0-1.el9.x86_64. > > Test steps: > 1.Install libvirt pkgs: > #yum -y install libvirt* > > 2.Start virtqemud: > #systemctl start virtqemud > > 3.Start a guest: > #virsh start vm1 > > 4.Check virtlogd* status: > # systemctl -a | grep -i virtlogd > virtlogd.service > loaded active running Virtual machine log manager > virtlogd-admin.socket > loaded active running Virtual machine log manager socket > virtlogd.socket > > loaded active running Virtual machine log manager socket > > 5.Remove libvirt pkgs: > #yum -y remove libvirt* > > 6.Check daemons installed by libvirt pkgs: > #systemctl -a | grep -i virt > ... > ● libvirtd.service > not-found inactive dead libvirtd.service > ... > ● virtnetworkd.service > not-found inactive dead virtnetworkd.service > ... > > ● virt-guest-shutdown.target > not-found inactive dead virt-guest-shutdown.target > ... > > 7.Install libvirt pkgs again: > #yum -y install libvirt* > > 8.Start virtqemud service: > #systemctl start virtqemud > > 9.Start a guest: > #virsh start vm1 > Domain 'vm1' started > > 10.Check virtlogd* service status: > # systemctl -a | grep -i virtlogd > virtlogd.service > loaded active running Virtual machine log manager > virtlogd-admin.socket > loaded active running Virtual machine log manager socket > virtlogd.socket > loaded active running Virtual machine log manager socket > > > Hi Daniel, > In step4, after removing libvirt pkgs, still show some service info > installed by libvirt pkgs. Would you help to check it please? > Thanks. You started a guest in step (3), but didn't stop it before un-installing libvirt RPMs. It is not a valid scenario to have a guest running while un-installing libvirt. It is possible is is the cause of the behaviour, so could you re-test ensuring any guests and/or virtual networks are stopped before un-installing. (In reply to Daniel Berrangé from comment #11) > (In reply to yafu from comment #10) > > Test with libvirt-8.0.0-1.el9.x86_64. > > > > Test steps: > > 1.Install libvirt pkgs: > > #yum -y install libvirt* > > > > 2.Start virtqemud: > > #systemctl start virtqemud > > > > 3.Start a guest: > > #virsh start vm1 > > > > 4.Check virtlogd* status: > > # systemctl -a | grep -i virtlogd > > virtlogd.service > > loaded active running Virtual machine log manager > > virtlogd-admin.socket > > loaded active running Virtual machine log manager socket > > virtlogd.socket > > > > loaded active running Virtual machine log manager socket > > > > 5.Remove libvirt pkgs: > > #yum -y remove libvirt* > > > > 6.Check daemons installed by libvirt pkgs: > > #systemctl -a | grep -i virt > > ... > > ● libvirtd.service > > not-found inactive dead libvirtd.service > > ... > > ● virtnetworkd.service > > not-found inactive dead virtnetworkd.service > > ... > > > > ● virt-guest-shutdown.target > > not-found inactive dead virt-guest-shutdown.target > > ... > > > > 7.Install libvirt pkgs again: > > #yum -y install libvirt* > > > > 8.Start virtqemud service: > > #systemctl start virtqemud > > > > 9.Start a guest: > > #virsh start vm1 > > Domain 'vm1' started > > > > 10.Check virtlogd* service status: > > # systemctl -a | grep -i virtlogd > > virtlogd.service > > loaded active running Virtual machine log manager > > virtlogd-admin.socket > > loaded active running Virtual machine log manager socket > > virtlogd.socket > > loaded active running Virtual machine log manager socket > > > > > > Hi Daniel, > > In step4, after removing libvirt pkgs, still show some service info > > installed by libvirt pkgs. Would you help to check it please? > > Thanks. > > You started a guest in step (3), but didn't stop it before un-installing > libvirt RPMs. It is not a valid scenario to have a guest running while > un-installing libvirt. It is possible is is the cause of the behaviour, so > could you re-test ensuring any guests and/or virtual networks are stopped > before un-installing. No service left if i removed libvirt pkgs with guests and virtnetworkd service stopped. Thanks for your clarification. Move the bug to Verified according to comment 10 - 12. 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 (new packages: libvirt), 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-2022:2390 |