> 在 2015年8月21日,上午3:09,Jay Pipes <jaypi...@gmail.com> 写道:
> 
> On 08/20/2015 02:08 PM, melanie witt wrote:
>> On Aug 20, 2015, at 5:40, Alex Xu <hejie...@intel.com> wrote:
>> 
>>> So user may wrote client like this:
>>> 
>>> if response.status == 500 and ‘OverQuota’ in response.message:
>>>     …..
>> 
>> I thought we're not supporting that type of case. My understanding is that 
>> we should never be returning 500 and if we are, it's a bug fix to change it 
>> to an appropriate error status code without version bumps. I find it in the 
>> documentation [1][2] too.
> 
> Yup, you are correct.

Yea, from API-WG guideline, and from my understanding, I also agree to 500 
isn’t expect error. 

Why I thinking of this, is because I want to explain how to deal with different 
deployment of openstack.

The one of goal for micro versions is to make our API consistent between 
different deployment and discoverable the change between the deployment.

Finally in this email I get answer for the different deployment question by 
make 500 as contract. yea, finally no one think this is right.

So, let me change another way to answer this question, and the baseline is 500 
isn’t part of contract.

My answer is we did not have good API contract in the beginning(in the 
nova-spec).  For example, the bug we return 500 for overquota, if we have api 
ref or nova-spec said, we will return 403 for overquota, then the thing is very 
easy, we fix it with return 403 and no micro versions. But we didn’t have such 
doc or spec describe that, then we don’t know the API contract. But I think 
people we feel insane if we require such detail nova-spec again.

So I changed the answer a little again in the 
https://review.openstack.org/#/c/215195/ 
<https://review.openstack.org/#/c/215195/>:

500 isn't expect error. So user never should based on 500 error, and we won't 
guarantee anything on 500.
There may have bug we should return 4** but we return 500. But if 4** is 
existed logic in the beginning of the API(Maybe we forget describe that in the 
nova-spec or api ref.), then we think the 4** already is part of API contract, 
we should fix it to match the contract, and it needn't new microversions.
And we should back-port this fix. Operator should update their deployment to 
fix that bug.

Does this sounds make sense?

Thanks
Alex

> 
> Best,
> -jay
> 
> __________________________________________________________________________
> 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

__________________________________________________________________________
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

Reply via email to