Bug 1946697

Summary: systemctl restart libvirtd shuts down all VMs on the host
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Michal Skrivanek <michal.skrivanek>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Fangge Jin <fjin>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.4CC: fjin, jdenemar, lsvaty, virt-maint, yalzhang, ymankad
Target Milestone: rc   
Target Release: 8.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-7.0.0-13.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-25 06:48:32 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1946204    

Description Michal Skrivanek 2021-04-06 17:06:52 UTC
See dependent bug 1946204. This behavior completely breaks RHV. 

Introduced in f035f53baa2e5dc00b8e866e594672a90b4cea78 and reverted in 32c5e432044689b6679cdedeb1026f27653449d8. 

Sadly the problem is present in libvirt-7.0.0-11.module+el8.4.0+10505+3a8d753f.x86_64

Comment 5 Fangge Jin 2021-04-07 07:24:10 UTC
This issue can be reproduced by below steps(with libvirt-guests), but ovirt doesn't use libvirt-guests, so I think we'd better cover it in RHV integration testing.

# cat /etc/sysconfig/libvirt-guests
ON_BOOT=ignore
ON_SHUTDOWN=shutdown

# systemctl start libvirtd
# systemctl start libvirt-guests

# virsh start avocado-vt-vm1

# systemctl restart libvirtd

# virsh list --all
 Id   Name             State
---------------------------------
 -    avocado-vt-vm1   shut off

Comment 6 Fangge Jin 2021-04-07 07:56:58 UTC
And note that vm should not be set to autostarted:
# virsh list --all --autostart
 Id   Name   State
--------------------

Comment 7 Fangge Jin 2021-04-07 08:25:42 UTC
(In reply to Fangge Jin from comment #5)
> This issue can be reproduced by below steps(with libvirt-guests), but ovirt
> doesn't use libvirt-guests, so I think we'd better cover it in RHV
> integration testing.
Sorry, my memory is wrong. ovirt uses libvirt-guests:
static/usr/lib/systemd/system/vdsmd.service.in:8:Before=libvirt-guests.service

Comment 8 Michal Skrivanek 2021-04-07 08:51:09 UTC
indeed. but we lack a dedicated test for it:/

Comment 11 Fangge Jin 2021-04-08 04:12:51 UTC
Test pass with libvirt-7.0.0-13.module+el8.4.0+10604+5608c2b4.x86_64.
Same steps as comment5 and comment6

Comment 15 errata-xmlrpc 2021-05-25 06:48:32 UTC
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 (virt:av 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-2021:2098