Bug 1811728 - Libvirt drops disks with startupPolicy too aggressively
Summary: Libvirt drops disks with startupPolicy too aggressively
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: 8.0
Assignee: Michal Privoznik
QA Contact: Meina Li
URL:
Whiteboard:
Depends On:
Blocks: 1810416 1811425
TreeView+ depends on / blocked
 
Reported: 2020-03-09 15:49 UTC by Michal Privoznik
Modified: 2020-05-05 09:58 UTC (History)
14 users (show)

Fixed In Version: libvirt-6.0.0-10.el8
Doc Type: No Doc Update
Doc Text:
Clone Of: 1811425
Environment:
Last Closed: 2020-05-05 09:57:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:58:51 UTC

Description Michal Privoznik 2020-03-09 15:49:53 UTC
+++ This bug was initially created as a clone of Bug #1811425 +++

There is a libvirt regression caused by:

  63469116cc virDomainDiskTranslateSourcePool: split code to setup one storage source

which tries to fix the bug 1804603. The problem is the referenced commit introduced a typo which caused libvirt to drop sources for all disks which have startup policy configured.

Comment 1 Michal Privoznik 2020-03-09 15:52:02 UTC
Patch posted upstream:

https://www.redhat.com/archives/libvir-list/2020-March/msg00241.html

Comment 2 Michal Privoznik 2020-03-10 07:02:03 UTC
Pushed upstream as:

  3918dbd84e virDomainDiskTranslateSourcePool: Check for disk type correctly

v6.1.0-69-g3918dbd84e

Comment 7 Meina Li 2020-03-16 10:00:46 UTC
Hi Michal,

I start domain with cdrom disk with startupPolicy='optional' failed, I think it may be a new bug, can you help to review it? Thank you in advance.

Test Version:
libvirt-6.0.0-10.el8

Test Steps:
1. Prepare a guest xml with cdrom disk with startupPolicy='optional'.
# vim lmn.xml
...
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/var/lib/libvirt/images/non-exist.img' startupPolicy='optional'/>
<target dev='sda' bus='sata'/>
<readonly/>
</disk>
...
2. Define the guest and start it.
# virsh define lmn.xml; virsh start lmn
Domain lmn defined from lmn.xml

error: Failed to start domain lmn
error: Cannot access storage file '/var/lib/libvirt/images/non-exist.img': No such file or directory

Comment 8 Michal Privoznik 2020-03-16 11:13:01 UTC
I cannot reproduce on upstream. I will investigate further.

Comment 9 Michal Privoznik 2020-03-16 12:13:45 UTC
Well, I can't reproduce downstream neither. Can you attach debug logs please?

Comment 10 Meina Li 2020-03-17 02:55:21 UTC
Thanks for your review and test, I also cannot reproduce in other machine with the same libvirt version. 
So I think may there are some problems on my machine or guest xml, I'll check again.

Comment 13 errata-xmlrpc 2020-05-05 09:57:51 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/RHBA-2020:2017


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