Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.9.2
-
None
-
Openstack Liberty+
Description
As part of Openstack releases(Kilo+), V2.1 of the API's are being exposed.
2.1 supports stronger input validation. see here
Another impact is strong input validation of JSON-Schema. JSON-Schema contains the “additionalProperties” feature which can deny undefined properties in an input request. V2 API just ignored undefined properties if a request contain, but V2.1 API denies the request and returns a BadRequest response to a client.
During V2.1 development, we found that Tempest also passed undefined properties to Nova API, and Nova V2 API just ignored them then tests succeeded. However Nova V2.1 API rejected these requests and tests failed. So that was Tempest bug, but we imagined this kind of problem would happen on the other SDKs. Before fixing this Tempest bug, we investigated major SDKs(fog, jclouds)’s code and we confirmed these SDKs send a valid request without undefined properties and they don’t contain this kind of problem.
For creating flavors in openstack, Jcloud includes the links properties which were safely ignored in V2 API but causing issues in V2.1 API
Jclouds needs to use either legacy compute URL or update validation to account for 2.1 API.
I see this as a general problem, not sure why the tests are not failing to indicate this problem
POST http://172.19.46.39:8774/v2.1/8d0578a052814946b2115e72a026bf44/flavors
HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: [{"badRequest": {"message": "Invalid input for field/attribute flavor. Value:
. Additional properties are not allowed (u'links' was unexpected)", "code": 400}}]