Bug 1304319
Summary: | Manually created cow clone of rbd device is removed by virStorageBackendRBDBuildVolFrom if it has the same name as existing one | ||
---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Yang Yang <yanyang> |
Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> |
Status: | NEW --- | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | dyuan, hhan, jferlan, mzhan, wido |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 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
Yang Yang
2016-02-03 10:05:56 UTC
I think this is because libvirt thinks the cloning operation failed and it tries to clean up. If you would refresh the pool after creating the RBD volume manually this wouldn' t happen. This is more a libvirt logic problem then a RBD storage driver specific issue. Good catch though, but I don't know how to fix this right now. oh... ouch... Long story short, I fixed a similar issue in/from the buildVol path; however, I seem to have forgotten the buildVolFrom path mainly because there was no rbd buildVolFrom code at the time. The two existing buildVolFrom backend API's in FS and DISK used code which ended up down in the path of buildVol, so it slipped my mind. Anyway, see commit id '4cd7d220c9b' - there's a lot of patches that support that and quite a bit of history, but I believe if you make a similar change in storageVolCreateXMLFrom where if "buildret < 0" rather than calling DeleteInternal, call storageVolRemoveFromPool using newvol Also helps that you can "test" my theory with a real rbd instance! |