Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-137

Return uuid and provider id

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 0.7.1
    • None
    • Compute

    Description

      libcloud.compute.drivers.rackspace.RackspaceUKNodeDriver inherits OpenStack_1_0_NodeDriver and this does not return the required data with regards to node details that are required to manage rackspace nodes, not with the OpenStack driver in any case. Specifically driver.list.nodes() returns uuid stings for nodes e.g.:

      <Node: uuid=a05c637f548f64d1c847d85abe50bfda46789bec, name=zpf-controller-dev-2-10g-ruk, state=0, public_ips=[xxx.xxx.xxx.xxx'], provider=Rackspace (UK) ...>

      The uuid is not usable in the Rackspace Server or Server Action operations (as defined in their API) as they all require the id parameter.

      The inherited OpenStack ex_rebuild errors with:

      <snip>
      /usr/bin/python /opt/zpf/scripts/libcloud.rebuild.ruk.node $NODE_UUID $NODEIMAGE_UUID
      /opt/zpf/scripts/libcloud.rebuild.ruk.node
      a05c637f548f64d1c847d85abe50bfda46789bec
      10458692
      Traceback (most recent call last):
      File "/opt/zpf/scripts/libcloud.rebuild.ruk.node", line 33, in <module>
      driver.ex_rebuild(sys.argv[1], sys.argv[2])
      File "/usr/lib/python2.6/site-packages/libcloud/compute/drivers/openstack.py", line 467, in ex_rebuild
      data=ET.tostring(elm))
      File "/usr/lib/python2.6/site-packages/libcloud/compute/drivers/openstack.py", line 139, in request
      method=method, headers=headers)
      File "/usr/lib/python2.6/site-packages/libcloud/common/openstack.py", line 267, in request
      return super(OpenStackBaseConnection, self).request(**kwargs)
      File "/usr/lib/python2.6/site-packages/libcloud/common/base.py", line 509, in request
      connection=self)
      File "/usr/lib/python2.6/site-packages/libcloud/compute/drivers/openstack.py", line 242, in _init_
      super(OpenStack_1_0_Response, self)._init_(*args, **kwargs)
      File "/usr/lib/python2.6/site-packages/libcloud/common/base.py", line 74, in _init_
      raise Exception(self.parse_error())
      Exception: 404 Not Found The requested path could not be found.; javax.ws.rs.WebApplicationException: java.lang.NumberFormatException: For input string: "a05c637f548f64d1c847d85abe50bfda46789bec"
      </snip>

      The Rackspace API returns id on all "server" requests e.g.

      wget --no-check-certificate --server-response -O ruk.servers.no.detail --header "X-Auth-Token: xxxxxxxxxxx" https://lon.servers.api.rackspacecloud.com/v1.0/xxxxx/servers

      {"servers":[

      {"id":10085881,"name":"base-centos-6-ruk"}

      ,

      {"id":10087553,"name":"zpf-controller-dev-1-10g-ruk"}

      ,

      {"id":10087643,"name":"zpf-controller-dev-2-10g-ruk"}

      ]}

      Am I doing something incorrect or is the OpenStack driver not compatible with Rackspace? If not then surely libcloud should remove Rackspace from this list of Providers. It would at least save people the time and effort of figuring that out themselves.

      Attachments

        Activity

          People

            Unassigned Unassigned
            earthgecko Gary Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: