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

Openstack Nova listing details fails when using changes-since

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.8.1, 1.9.0
    • Fix Version/s: None
    • Component/s: jclouds-labs-openstack
    • Labels:
      None
    • Environment:
      Vanilla Openstack Cloud

      Description

      When using code to limit the results from Nova, the argument changes since is sent as a long as a query parameter.

      This attribute is not and was never supported by Nova with such format, date must be an ISO date as seen here: https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/servers.py#L163

      Problem can be reproduced that way :

        nova.getNovaApi()
                   .getServerApiForZone(defaultZone)
                      .listInDetail(PaginationOptions.Builder.changesSince(new Date()))
                                                               .iterator()
      

      This code fails with HTTP 400 since format for changes-since is incorrect (at least with Openstack Icehouse and Later)

      The problem may probably be fixed here :
      apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/options/ListOptions.java at line 64 where

      this.queryParameters.put("changes-since", checkNotNull(changesSince, "changesSince").getTime() / 1000 + "");
      

      is simply using long conversion instead of sending ISO format date

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pierre.souchay Pierre Souchay
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: