Bug 1349895

Summary: libvirt should allow identical serial numbers for disks
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: agedosier, berrange, clalancette, crobinso, dyuan, itamar, laine, libvirt-maint, pkrempa, pzhang, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.3.3.2-1.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-22 15:57:45 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:

Description Dan Horák 2016-06-24 13:16:39 UTC
With recent libvirt it is not possible to create a domain where 2 virtual disks backed by the same image share the same serial number. I guess it is because of bug 1245013. But there is a strong use case for it - testing multipath storage setup without requiring external, possibly expensive, multipath capable storage, read for example http://sharkcz.livejournal.com/12846.html

It still works in libvirt-1.2.18.1-2.fc22 but not in libvirt-1.3.3.1-3.fc24

Comment 1 Daniel Berrangé 2016-06-24 13:35:29 UTC
Agreed, that is a valid use case and libvirt should not have tried to block it. We should revert all the patches from that referenced bug.

Comment 2 Cole Robinson 2016-06-24 13:38:12 UTC
CCing pkrempa who provided the patches for bug 1245013

Comment 3 Dan Horák 2016-06-24 13:54:15 UTC
Maybe it's just some logic missing to allow "my" use case, but still provide higher safety for regular users.

Comment 4 Daniel Berrangé 2016-06-24 13:56:14 UTC
It is generally not libvirt's job to impose policy decisions like this, unless it is functionally required by the virtualization layer. Even in real physical hardware you can attach 2 disks with the same serial - i've had cheap USB HDDs which did this.

Comment 5 Peter Krempa 2016-06-24 15:31:58 UTC
I agree. I wasn't aware of the necessity to have identical IDs. Since it doesn't pose any problems I've reverted both the serial and WWN check:

commit 5da28cc3069b573f54f0bcaf8eb75476bcfdc6e9
Author: Peter Krempa <pkrempa>
Date:   Fri Jun 24 17:01:27 2016 +0200

    conf: Allow disks with identical WWN or serial
    
    Disallowing them broke a use case of testing multipath configurations
    for storage. Originally this was added as it was impossible to
    use certain /dev/disk-by... links but the disks worked properly.

Comment 6 Fedora Update System 2016-07-19 11:24:50 UTC
libvirt-1.3.3.2-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-65cc608ebe

Comment 7 Fedora Update System 2016-07-20 01:53:28 UTC
libvirt-1.3.3.2-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-65cc608ebe

Comment 8 Fedora Update System 2016-07-22 15:56:39 UTC
libvirt-1.3.3.2-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.