[
https://issues.apache.org/jira/browse/DTACLOUD-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444896#comment-13444896
]
Michal Fojtik commented on DTACLOUD-224:
----------------------------------------
Jan, this is a very nice idea and I would love to have errors 'categorised' and
be helpful in the client decision making. I agree that now the clients need to
have some initial clue about what the errors returned by DC means. In terms on
launching an instance with incorrect hardware profile, we return 502 HTTP
status code which indicates 'Provider Error', because we really don't know if
the provider has enough resources to launch instance with given hardware
profile.
For the list of currently used generic exceptions have look into
'server/lib/deltacloud/drivers/exceptions.rb'[1].
I really have no clue what the 'most common errors' are. An initial list of
them would be helpful. For some errors is hard to decide if you should repeat
the
request in future or not. For instance, if you use 'wrong' image_id when
creating a new instance. If you get eg. "502 - Wrong image", it does not mean
that in
future that 'image_id' will not become available, or if it is just temporary
unavailability of the image... There are many cases like this.
So if Deltacloud API will get some smart error categorisation system, that
system may not work well for everyone. Then rather jumping into this I will
prefer to stay in the 'dumb' mode and just passing what we get from the backend
to clients and make clients decide what to do.
[1]
https://github.com/mifo/deltacloud/blob/master/server/lib/deltacloud/drivers/exceptions.rb
> Error abstraction/categorization
> --------------------------------
>
> Key: DTACLOUD-224
> URL: https://issues.apache.org/jira/browse/DTACLOUD-224
> Project: DeltaCloud
> Issue Type: Improvement
> Reporter: Jan Provaznik
> Assignee: Michal Fojtik
>
> It would be nice to get categorized errors from Deltacloud if something goes
> wrong instead of just forwarding a provider specific error directly to
> client. For example if an instance create failed because something was wrong
> with hw profile, Deltacloud would return HWProfileError exception. The
> original provider specific exception would be included in some description.
> For the beginning most errors would be in some some generic class, only most
> common errors would be categorized, especially these which are related to
> params passed in API calls, for instance creation it would be errors related
> to image id, realms, hwp...
> Use case for Aeolus is this: if instance create action fails for some reason,
> we need to decide if the instance should be launched on same provider with
> different configuration (different realm/hwp...) or if it's better to try
> launch the instance on another provider account or even provider.
> Deltacloud is the best place where the error abstraction should be done
> because:
> - Deltacloud is the abstraction layer which should abstract provider-specific
> behavior
> - each Deltacloud client would have to implement it's own error abstraction
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira