Re: [openstack-dev] [nova]Libvirt error code for failing volume in nova

2016-05-19 Thread Daniel P. Berrange
On Wed, May 18, 2016 at 07:57:17PM +, Radhakrishnan, Siva wrote:
> Hi All!
> Currently I am working on this bug 
> https://bugs.launchpad.net/nova/+bug/1168011 which says we have to change  
> error message displayed  when attaching a volume fails. Currently it catches 
> all operation errors that libvirt can raise and assume that all of them are 
> the source of device being busy. You can find the source of this code here 
> https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L1160.
>  I have few questions on this bug
>  
> 1.what kind of error message and other required info should we include in 
> the exception to make it look more  generalized instead of the current 
> one ?
>  
> 2.Should we raise separate exception for "Device is Busy" or a single 
> general exception would work fine ?
>  
> 3.If we need separate exception for device being busy what would
> be the equivalent libvirt error code  for that

There is not any specific libvirt error code used for this situation that
you can detect, which is why the code is catching the general libvirt
error. 

Regards,
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 :|

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova]Libvirt error code for failing volume in nova

2016-05-19 Thread Silvan Kaiser
Hi!
Regarding 1. I'd start with giving a generic message, e.g. "error while
attaching volume" that does not point to a specific reason.
Regarding 2., if the reason is identifiable throwing the corresponding
exception would come in handy. Only use the generic failure if there's no
specific error knowledge.
I'm hitting that bug, too, great to see it addressed! :)
Best regards
Silvan



2016-05-18 21:57 GMT+02:00 Radhakrishnan, Siva :

> Hi All!
> Currently I am working on this bug
> https://bugs.launchpad.net/nova/+bug/1168011 which says we have to
> change  error message displayed  when attaching a volume fails. Currently
> it catches all operation errors that libvirt can raise and assume that all
> of them are the source of device being busy. You can find the source of
> this code here
> https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L1160.
> I have few questions on this bug
>
> 1.  what kind of error message and other required info should we
> include in the exception to make it look more  generalized instead of
> the current one ?
>
> 2.  Should we raise separate exception for "Device is Busy" or a
> single general exception would work fine ?
>
> 3.  If we need separate exception for device being busy what would be
> the equivalent libvirt error code  for that
>
> I would like to have your feedback/suggestions to proceed further with
> this bug.
>
> Regards,
> Siva
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Dr. Silvan Kaiser
Quobyte GmbH
Hardenbergplatz 2, 10623 Berlin - Germany
+49-30-814 591 800 - www.quobyte.com
Amtsgericht Berlin-Charlottenburg, HRB 149012B
Management board: Dr. Felix Hupfeld, Dr. Björn Kolbeck, Dr. Jan Stender
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev