Bug 496616 - libvirt: a pool with the wrong config was defined in pool list
libvirt: a pool with the wrong config was defined in pool list
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Dave Allan
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-20 07:32 EDT by Nan Zhang
Modified: 2016-04-26 10:56 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 05:22:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Nan Zhang 2009-04-20 07:32:58 EDT
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 Berrange 2009-06-08 08:57:19 EDT
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 11:09:44 EDT
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 12:08:43 EDT
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 15:13:18 EDT
libvirt-0.6.3-14.el5 was built in dist-5E-qu-candidate with the fix,

Daniel
Comment 13 Nan Zhang 2009-07-09 04:27:47 EDT
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 05:22:46 EDT
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.