Re: [libvirt] [PATCH] storage: fix volDelete return when volume still being allocated
On Wed, May 25, 2011 at 12:12:46PM +0100, Daniel P. Berrange wrote: On Wed, May 25, 2011 at 11:55:08AM +0100, Matthew Booth wrote: volDelete used to return VIR_ERR_INTERNAL_ERROR when attempting to delete a volume which was still being allocated. It should return VIR_ERR_OPERATION_INVALID. * src/storage/storage_driver.c: Fix return of volDelete. --- src/storage/storage_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 2da2feb..d9c2137 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -1914,7 +1914,7 @@ storageVolumeDelete(virStorageVolPtr obj, } if (vol-building) { -virStorageReportError(VIR_ERR_INTERNAL_ERROR, +virStorageReportError(VIR_ERR_OPERATION_INVALID, _(volume '%s' is still being allocated.), vol-name); goto cleanup; ACK Okay, I finally commited this, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ dan...@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] storage: fix volDelete return when volume still being allocated
volDelete used to return VIR_ERR_INTERNAL_ERROR when attempting to delete a volume which was still being allocated. It should return VIR_ERR_OPERATION_INVALID. * src/storage/storage_driver.c: Fix return of volDelete. --- src/storage/storage_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 2da2feb..d9c2137 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -1914,7 +1914,7 @@ storageVolumeDelete(virStorageVolPtr obj, } if (vol-building) { -virStorageReportError(VIR_ERR_INTERNAL_ERROR, +virStorageReportError(VIR_ERR_OPERATION_INVALID, _(volume '%s' is still being allocated.), vol-name); goto cleanup; -- 1.7.4.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] storage: fix volDelete return when volume still being allocated
On Wed, May 25, 2011 at 11:55:08AM +0100, Matthew Booth wrote: volDelete used to return VIR_ERR_INTERNAL_ERROR when attempting to delete a volume which was still being allocated. It should return VIR_ERR_OPERATION_INVALID. * src/storage/storage_driver.c: Fix return of volDelete. --- src/storage/storage_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 2da2feb..d9c2137 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -1914,7 +1914,7 @@ storageVolumeDelete(virStorageVolPtr obj, } if (vol-building) { -virStorageReportError(VIR_ERR_INTERNAL_ERROR, +virStorageReportError(VIR_ERR_OPERATION_INVALID, _(volume '%s' is still being allocated.), vol-name); goto cleanup; ACK If someone is motivated, it would be desirable to actually make delete work, even while the volume is building. Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list