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

bug in the function ex_create_multiple_nodes of GCE driver

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Compute
    • Labels:

      Description

      Hi,

      I have found a bug in the GCE driver of apache libcloud (v 0.19) when executing the function .ex_create_multiple_nodes:

      nodes = driver.ex_create_multiple_nodes(**args)
      File "/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py", line 2602, in ex_create_multiple_nodes
      self._multi_create_node(status, node_attrs)
      File "/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py", line 4869, in _multi_create_node
      ex_automatic_restart=node_attrs['ex_automatic_restart'])
      File "/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py", line 4711, in _create_node_req
      ex_disk_type = self.ex_get_disktype(ex_disk_type)
      File "/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py", line 3932, in ex_get_disktype
      request = '/zones/%s/diskTypes/%s' % (zone.name, name)
      AttributeError: 'NoneType' object has no attribute 'name'

      The problem is at function ex_get_disktype, because the parameter zone is "None".

      I'm not sure if it is the correct solution but I solve this problem changing the line 4711 of the gce.py driver (_create_node_req function), adding the location parameter:

      • From this:
        ex_disk_type = self.ex_get_disktype(ex_disk_type)
      • To this:
        ex_disk_type = self.ex_get_disktype(ex_disk_type, location)

      Best regards.

        Attachments

          Activity

            People

            • Assignee:
              erjohnso Eric Johnson
              Reporter:
              micafer Miguel Caballer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: