Bug 496616
Summary: | libvirt: a pool with the wrong config was defined in pool list | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Nan Zhang <nzhang> | ||||||
Component: | libvirt | Assignee: | Dave Allan <dallan> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 5.4 | CC: | berrange, syeghiay, veillard, virt-maint, xen-maint | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-09-02 09:22:46 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
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 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. 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.
libvirt-0.6.3-14.el5 was built in dist-5E-qu-candidate with the fix, Daniel 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 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 |
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.