Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1126

Jclouds needs to use either legacy compute or update validation to account for 2.1 API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.9.2
    • 2.0.0
    • jclouds-compute
    • 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:

      {u'name': u'SNORT-0.2-0.2.0.20150626002613-IPS-1-snort_disk-20150626002613.qcow2', u'links': [], u'ram': 2048, u'vcpus': 2, u'disk': 50, u'id': u'IPS-1_RegionOne'}

      . Additional properties are not allowed (u'links' was unexpected)", "code": 400}}]

      Attachments

        Activity

          People

            Unassigned Unassigned
            arvindn05 Arvind Nadendla
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: