RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1685151 - Guest will be destroyed if autostarted pool is destroyed and libvirtd restarted
Summary: Guest will be destroyed if autostarted pool is destroyed and libvirtd restarted
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.0
Assignee: Michal Privoznik
QA Contact: gaojianan
URL:
Whiteboard:
Depends On: 1658504
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-04 13:53 UTC by Michal Privoznik
Modified: 2020-11-14 12:28 UTC (History)
12 users (show)

Fixed In Version: libvirt-4.5.0-29.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1658504
Environment:
Last Closed: 2019-11-05 20:48:05 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3345 0 None None None 2019-11-05 20:48:35 UTC

Description Michal Privoznik 2019-03-04 13:53:39 UTC
+++ This bug was initially created as a clone of Bug #1658504 +++

While working on a fix for this bug ^^^ I've came across another one:

1) start a storage libvirt pool (e.g. type of iscsi)
2) start a domain with a disk from that storage pool, e.g.:

    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw'/>
      <source pool='iscsi-secret-pool' volume='unit:0:0:1'/>
      <target dev='vdc' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>

3) make sure the pool is autostarted (virsh pool-autostart)
4) destroy the pool
5) restart libvirtd
6) observe domain being killed

This is introduced by:
cefb97fb81 virStateDriver - Separate AutoStart from Initialize
e4a969092b Separate out StateAutoStart from StateInitialize

Comment 1 Michal Privoznik 2019-03-04 13:58:01 UTC
Alternatively, when bug 1658504 is fixed then all that is needed to reproduce this bug is to use a volume from iscsi-direct pool since iscsi-direct pools don't keep their state through libvirtd restarts. Then no pool-destroy is ineeded.

Comment 2 Michal Privoznik 2019-03-04 14:02:43 UTC
Patches posted upstream:

https://www.redhat.com/archives/libvir-list/2019-March/msg00088.html

Comment 3 Michal Privoznik 2019-03-06 09:22:47 UTC
I've just pushed patches upstream:

07a9c8bae8 Revert "Separate out StateAutoStart from StateInitialize"
fc380c2e01 Revert "virStateDriver - Separate AutoStart from Initialize"
31c3c35c94 bhyve: Move autostarting of domains into bhyveStateInitialize
c6266ddb02 daemon: Register secret driver before storage driver

v5.1.0-80-g07a9c8bae8

Comment 7 gaojianan 2019-07-03 09:15:15 UTC
Verified in version:
libvirt-5.4.0-1.module+el8.1.0+3304+7eb41d5f.x86_64
qemu-kvm-4.0.0-4.module+el8.1.0+3356+cda7f1ee.x86_64
kernel-4.18.0-107.el8.x86_64

Step:
1) start a storage libvirt pool 
<pool type='iscsi'>
<name>iscsi</name>
<source>
<host name="10.66.4.119"/>
<device path="iqn.2016-03.com.virttest:logical-pool.target4"/>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>

2) start a domain with a disk from that storage pool, e.g.:

    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw'/>
      <source pool='iscsi' volume='unit:0:0:0'/>
      <target dev='vdc' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>

3) virsh pool-autostart iscsi
4) virsh pool-destroy iscsi
5) systemctl restart libvirtd
6) # virsh list 
 Id   Name   State
----------------------
 14   ovmf   running
 19   jgao   running

Guest jgao works well

Comment 8 gaojianan 2019-07-03 10:17:33 UTC
Additional verify:
Also test iscsi-direct pool for the clone Bug #1658504 

    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw'/>
      <source pool='iscsi-direct' volume='unit:0:0:0'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
and do the same work as comment7 ,all works well.

Comment 10 errata-xmlrpc 2019-11-05 20:48:05 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, 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-2019:3345


Note You need to log in before you can comment on or make changes to this bug.