Bug 707495

Summary: It is not possible to delete a volume while it's being created
Product: Red Hat Enterprise Linux 5 Reporter: Matthew Booth <mbooth>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: dallan, hjiang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 707494 Environment:
Last Closed: 2012-01-30 22:08:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 707494    
Bug Blocks: 706343    

Description Matthew Booth 2011-05-25 09:04:03 UTC
+++ This bug was initially created as a clone of Bug #707494 +++

Volume creation can take a long time. Attempting to delete a volume which is still being created returns an error. It is not currently possible to work round this, for example with an API to cancel the creation process.

This impacts V2V. V2V removes all inconsistent volumes if the conversion process fails or is interrupted. This cleanup will fail if the user hits Ctrl-C during a long-running volume creation, because the volume cannot be deleted. This will cause subsequent V2V conversions to fail because the volume already exists.

Comment 1 Huming Jiang 2011-06-03 05:24:59 UTC
Could reproduce this bug on the following components of rh5.6:
libvirt-0.8.2-15.el5
virt-manager-0.6.1-13.el5
kernel-2.6.18-238.el5

Steps:
open two terminal at the same time:
on one terminal:
# virsh vol-create-as default vol-test2.raw 4194304000 --allocation 3024347136 --format raw
(running)

on the other terminal:
#virsh vol-delete --pool default vol-test2.raw
error: Failed to delete vol vol-test2.raw
error: internal error volume 'vol-test2.raw' is still being allocated.