[ https://issues.apache.org/jira/browse/LIBCLOUD-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Miguel Caballer updated LIBCLOUD-784: ------------------------------------- Labels: gce (was: ) 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. > bug in the function ex_create_multiple_nodes of GCE driver > ---------------------------------------------------------- > > Key: LIBCLOUD-784 > URL: https://issues.apache.org/jira/browse/LIBCLOUD-784 > Project: Libcloud > Issue Type: Bug > Components: Compute > Reporter: Miguel Caballer > Priority: Minor > Labels: gce > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)