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 593951 - Defining the same name storage pool with different target path or type
Summary: Defining the same name storage pool with different target path or type
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-20 06:24 UTC by Alex Jia
Modified: 2010-11-11 14:48 UTC (History)
6 users (show)

Fixed In Version: libvirt-0_8_1-11_el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-11 14:48:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
the detail (7.35 KB, text/plain)
2010-05-20 06:26 UTC, Alex Jia
no flags Details

Description Alex Jia 2010-05-20 06:24:51 UTC
Description of problem:
There are two problems for defining the same name pool with different target path or type:
1.the first pool is inactive

Libvirt uses name to identify a storage pool/volume (domain, network etc),if you define two storage pools with the same name and different target path(mount point) or storage type, libvirt will only reserve last defined one,I think libvirt should give a friendly prompt information at least, because users may define lots of storage pools, but he forgot pool name, so he may define a pool with the same name and different type, this will directly cover previous defined pool without any warning, it isn't friendly for user.

2.the first pool is active

in addition, if I active the storage pool, then defining a pool with the same name and diffrent type, the pool can be defined successfully. libvirt will use last defined pool xml if I set the pool autostart, when I reboot host or libvirtd service, it will also directly cover previous defined pool without any warning, that is more terrible.  

Note that, It may influnce defining domain, network, nodedivce etc if this is a problem. 

Version-Release number of selected component (if applicable):
[root@dhcp-66-70-62 libvirt-test-API]# uname -a
Linux dhcp-66-70-62.nay.redhat.com 2.6.32-25.el6.x86_64 #1 SMP Mon May 10 17:30:22 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

[root@dhcp-66-70-62 libvirt-test-API]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 6.0 Beta (Santiago)

[root@dhcp-66-70-62 libvirt-test-API]# rpm -qa|grep kvm
qemu-kvm-tools-0.12.1.2-2.53.el6.x86_64
qemu-kvm-debuginfo-0.12.1.2-2.48.el6.x86_64
qemu-kvm-0.12.1.2-2.53.el6.x86_64

[root@dhcp-66-70-62 libvirt-test-API]# rpm -qa|grep libvirt
libvirt-java-devel-0.4.2-2.el6.noarch
libvirt-python-0.8.1-4.el6.x86_64
libvirt-client-0.8.1-4.el6.x86_64
libvirt-0.8.1-4.el6.x86_64
libvirt-devel-0.8.1-4.el6.x86_64
libvirt-cim-debuginfo-0.5.8-2.el6.x86_64
libvirt-java-0.4.2-2.el6.noarch
libvirt-cim-0.5.8-3.el6.x86_64
libvirt-java-javadoc-0.4.2-2.el6.noarch
libvirt-debuginfo-0.8.1-3.el6.x86_64
libvirt-qpid-0.2.17-7.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.to define a 'HostVG' pool with 'logical' type
2.to build the pool 
3.to define a 'HostVG' pool with 'netfs' type
3.to active 'HostVG' pool
4.repeat 1
5.to set 'HostVG' autostart
6.to reboot host or libvirtd service 
  
Actual results:
previous defined pool will be directly covered.

Expected results:
fix it

Additional info:
please see attachment.

Comment 1 Alex Jia 2010-05-20 06:26:19 UTC
Created attachment 415318 [details]
the detail

Comment 3 Daniel Berrangé 2010-05-28 08:44:07 UTC
This patch addresses name+UUID uniqueness

https://www.redhat.com/archives/libvir-list/2010-May/msg01129.html

Comment 4 RHEL Program Management 2010-06-07 15:53:24 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 6 Dave Allan 2010-06-29 02:57:28 UTC
libvirt-0_8_1-11_el6 has been built in RHEL-6-candidate with the fix.

Dave

Comment 8 Alex Jia 2010-07-02 08:59:55 UTC
The bug has been fixed on RHEL6-beta with libvirt-0.8.1-13.el6.x86_64.


The following error information will be raised when I define the same name storage pool with different target path or type, it is a expectant result:

# virsh pool-define nfspool.xml
error: Failed to define pool from nfspool.xml
error: operation failed: pool 'HostVG' already exists with uuid 05a70c74-084b-1993-1448-d588cd0d9bd5


# uname -a
Linux dhcp-66-70-62.nay.redhat.com 2.6.32-37.el6.x86_64 #1 SMP Sun Jun 20 19:29:35 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
# rpm -q libvirt
libvirt-0.8.1-13.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.90.el6.x86_64

Comment 9 releng-rhel@redhat.com 2010-11-11 14:48:26 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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