[openstack-dev] [nova] Fine-grained error reporting via the external API
I've recently been writing a tool which uses Nova's external API. This is my first time consuming this API, so it has involved a certain amount of discovery. The tool is here for the curious: https://gist.github.com/mdbooth/163f5fdf47ab45d7addd I have felt hamstrung by the general inability to distinguish between different types of error. For example, if a live migration failed is it because: 1. The compute driver doesn't support support it. 2. This instance requires block storage migration. 3. Something ephemeral. These 3 errors all require different responses: 1. Quit and don't try again. 2. Try again immediately with the block migration argument.[1] 3. Try again in a bit. However, all I have is that I made a BadRequest. I could potentially grep the human readable error message, but the text of that message doesn't form part of the API, and it may be translated in any case. As an API consumer, it seems I can't really tell anything other than 'it didn't work'. More than that requires guesswork, heuristics and inference. I don't think I've missed some source of additional wisdom, but it would obviously be great if I have. Has there ever been any effort to define some contract around more fine-grained error reporting? Thanks, Matt [1] Incidentally, this suggests to me that live migrate should just do this anyway. -- Matthew Booth Red Hat Engineering, Virtualisation Team Phone: +442070094448 (UK) GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490 __ 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] Fine-grained error reporting via the external API
On 11/09/15 12:19, Sean Dague wrote: > On 09/11/2015 05:41 AM, Matthew Booth wrote: >> I've recently been writing a tool which uses Nova's external API. This >> is my first time consuming this API, so it has involved a certain amount >> of discovery. The tool is here for the curious: >> >> https://gist.github.com/mdbooth/163f5fdf47ab45d7addd >> >> I have felt hamstrung by the general inability to distinguish between >> different types of error. For example, if a live migration failed is it >> because: >> >> 1. The compute driver doesn't support support it. >> >> 2. This instance requires block storage migration. >> >> 3. Something ephemeral. >> >> These 3 errors all require different responses: >> >> 1. Quit and don't try again. >> >> 2. Try again immediately with the block migration argument.[1] >> >> 3. Try again in a bit. >> >> However, all I have is that I made a BadRequest. I could potentially >> grep the human readable error message, but the text of that message >> doesn't form part of the API, and it may be translated in any case. As >> an API consumer, it seems I can't really tell anything other than 'it >> didn't work'. More than that requires guesswork, heuristics and inference. >> >> I don't think I've missed some source of additional wisdom, but it would >> obviously be great if I have. Has there ever been any effort to define >> some contract around more fine-grained error reporting? >> >> Thanks, >> >> Matt >> >> [1] Incidentally, this suggests to me that live migrate should just do >> this anyway. > > This is an API working group recommendation evolving here. The crux of > which is going to be a structured json error return document that will > contain more info. https://review.openstack.org/#/c/167793/ Thanks, Sean, that's exactly what I was looking for. I'll continue this discussion in that review. Matt -- Matthew Booth Red Hat Engineering, Virtualisation Team Phone: +442070094448 (UK) GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490 __ 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] Fine-grained error reporting via the external API
On 09/11/2015 05:41 AM, Matthew Booth wrote: > I've recently been writing a tool which uses Nova's external API. This > is my first time consuming this API, so it has involved a certain amount > of discovery. The tool is here for the curious: > > https://gist.github.com/mdbooth/163f5fdf47ab45d7addd > > I have felt hamstrung by the general inability to distinguish between > different types of error. For example, if a live migration failed is it > because: > > 1. The compute driver doesn't support support it. > > 2. This instance requires block storage migration. > > 3. Something ephemeral. > > These 3 errors all require different responses: > > 1. Quit and don't try again. > > 2. Try again immediately with the block migration argument.[1] > > 3. Try again in a bit. > > However, all I have is that I made a BadRequest. I could potentially > grep the human readable error message, but the text of that message > doesn't form part of the API, and it may be translated in any case. As > an API consumer, it seems I can't really tell anything other than 'it > didn't work'. More than that requires guesswork, heuristics and inference. > > I don't think I've missed some source of additional wisdom, but it would > obviously be great if I have. Has there ever been any effort to define > some contract around more fine-grained error reporting? > > Thanks, > > Matt > > [1] Incidentally, this suggests to me that live migrate should just do > this anyway. This is an API working group recommendation evolving here. The crux of which is going to be a structured json error return document that will contain more info. https://review.openstack.org/#/c/167793/ -Sean -- Sean Dague http://dague.net __ 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] Fine-grained error reporting via the external API
> From: mbo...@redhat.com > To: openstack-dev@lists.openstack.org > Date: Fri, 11 Sep 2015 10:41:47 +0100 > Subject: [openstack-dev] [nova] Fine-grained error reporting via the > external API > > However, all I have is that I made a BadRequest. I could potentially > grep the human readable error message, but the text of that message > doesn't form part of the API, and it may be translated in any case. As > an API consumer, it seems I can't really tell anything other than 'it > didn't work'. More than that requires guesswork, heuristics and inference. > > I don't think I've missed some source of additional wisdom, but it would > obviously be great if I have. Has there ever been any effort to define > some contract around more fine-grained error reporting? Matt, iiuc this has been discussed early [1]. There is a review [2] mentioned at the end of that thread. [1] http://markmail.org/message/6l6szrm6ox7w2cxk [2] https://review.openstack.org/#/c/167793/ __ 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