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: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
