[openstack-dev] [nova] Future of the Nova API

Thierry Carrez thierry at openstack.org
Wed Feb 26 10:40:25 UTC 2014


Kenichi Oomichi wrote:
>> From: Christopher Yeoh [mailto:cbkyeoh at gmail.com]
>> So the problem here is what we consider a "bug" becomes a feature from
>> a user of the API point of view. Eg they really shouldn't be passing
>> some data in a request, but its ignored and doesn't cause any issues
>> and the request ends up doing what they expect.
> 
> In addition, current v2 API behavior is not consistent when receiving
> unexpected API parameters. Most v2 APIs ignore unexpected API parameters,
> but some v2 APIs return a BadRequest response. For example, "update host"
> API does it in this case by https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/hosts.py#L185
> 
> Through v3 API development, we are making all v3 APIs return a BadRequest
> in this case. I think we cannot apply this kind of strict validation to
> running v2 API.

We may need to differentiate between breaking the API and breaking
corner-case behavior. In one case you force everyone in the ecosystem to
adapt (the libraries, the end user code). In the other you only
(potentially) affect those that were not following the API correctly.

So there may be a middle ground between "sticking with dirty V2 forever"
and "Go to V3 and accept a long V2 deprecation":

We could make a V3 that doesn't break the API, only breaks behavior in
error cases due to its stronger input validation. A V3 that shouldn't
break code that was following the API, nor require heavy library
changes. It's still a major API bump because behavior may change and
some end users will be screwed in the process, but damage is more
limited, so V2 could go away after a shorter deprecation period.

-- 
Thierry Carrez (ttx)



More information about the OpenStack-dev mailing list