Bug 496616 - libvirt: a pool with the wrong config was defined in pool list
Summary: libvirt: a pool with the wrong config was defined in pool list
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Dave Allan
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-20 11:32 UTC by Nan Zhang
Modified: 2016-04-26 14:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 09:22:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
xml for storage pool creation (218 bytes, text/plain)
2009-04-20 11:32 UTC, Nan Zhang
no flags Details
proposed fix (1.21 KB, patch)
2009-06-30 16:08 UTC, Dave Allan
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:1269 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2009-09-01 09:31:21 UTC

Description Nan Zhang 2009-04-20 11:32:58 UTC
Created attachment 340321 [details]
xml for storage pool creation

Description of problem:
a pool with the wrong config was defined in pool list, and it cannot be undefined.

Version-Release number of selected component (if applicable):
rhel5u3: 2.6.18-128.1.6.el5xen
libvirt-0.6.2-1.el5

How reproducible:
Always

Steps to Reproduce:
1. Create a pool with wrong xml description (attached xml file)
2. # virsh pool-undefine test
  
Actual results:
Cannot undefine the created pool. The error messages as below:
-----
error: Failed to undefine pool test
error: internal error no config file for test
-----

Expected results:
The pool with wrong xml config should not be defined successfully.

Additional info:
Only reboot machine can make the pool destroy.

Comment 1 Daniel Berrangé 2009-06-08 12:57:19 UTC
Looking at the code it appears the 'storagePoolCreate' method in storage_driver.c is missing a call virStoragePoolObjRemove in the failure path for the 'startPool' and 'refreshPool'  calls.

I cannot see any workaround to this problem aside from restarting libvirtd. Since we recommand against restarting libvirtd, I think this is a serious enough bug to be made a blocker for 5.4

Comment 5 Dave Allan 2009-06-30 15:09:44 UTC
Reproduced the problem, which was fixed in git on 2009-06-22.  Unfortunately, the fix that's upstream has the effect of destroying pools that already exist, so I'm doing a separate fix.

Comment 6 Dave Allan 2009-06-30 16:08:43 UTC
Created attachment 349968 [details]
proposed fix

The attached patch contains the upstream fix for this bug as well as a small fix to that fix that caused existing pools to be deleted if an attempt was made to create the same pool twice.

Comment 10 Daniel Veillard 2009-07-07 19:13:18 UTC
libvirt-0.6.3-14.el5 was built in dist-5E-qu-candidate with the fix,

Daniel

Comment 13 Nan Zhang 2009-07-09 08:27:47 UTC
This bug has been fixed with libvirt 0.6.3-14.el5 on RHEL-5.4. Set status to VERIFIED.

# virsh pool-create dir.xml
error: Failed to create pool from dir.xml
error: cannot open path '/pool': No such file or directory

Comment 15 errata-xmlrpc 2009-09-02 09:22:46 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1269.html


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