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

OpenNebula Compute Network Description

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5.2, 0.6.1
    • 0.6.1
    • Compute
    • Debian Squeeze using 0.5.2 libcloud extracted archive file.

    Description

      An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.

      Function Call:
      cloudProvider.connection.list_nodes()

      Exception Output:
      Traceback (most recent call last):
      File "test.py", line 65, in <module>
      nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
      File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
      return self._to_nodes(self.connection.request('/compute').object)
      File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
      computes.append(self._to_node(compute))
      File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
      networks.append(element.attrib["ip"])
      KeyError: 'ip'

      Cause:
      for element in compute.findall("NIC"):
      networks.append(element.attrib["ip"])

      OpenNebula/OCCI Compute Definition
      <COMPUTE href="http://www.opennebula.org/compute/32">
      <ID>32</ID>
      ...
      <NIC>
      <NETWORK href="http://www.opennebula.org/network/12"/>
      <MAC>00:ff:72:31:23:17</MAC>
      <IP>192.168.0.12</IP>
      ...
      </NIC>
      ...
      </COMPUTE>

      Conclusion:
      IP address information is not an attribute. Rather it's a child element of the NIC.

      Patch:
      With patch, the NIC information is returned correctly:
      <Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

      Attachments

        1. opennebula.network.error.py.patch
          0.6 kB
          Hutson Betts

        Activity

          People

            Unassigned Unassigned
            hut101 Hutson Betts
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified