Return-Path: X-Original-To: apmail-libcloud-notifications-archive@www.apache.org Delivered-To: apmail-libcloud-notifications-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D8FA1801A for ; Fri, 11 Dec 2015 13:01:11 +0000 (UTC) Received: (qmail 12657 invoked by uid 500); 11 Dec 2015 13:01:11 -0000 Delivered-To: apmail-libcloud-notifications-archive@libcloud.apache.org Received: (qmail 12632 invoked by uid 500); 11 Dec 2015 13:01:11 -0000 Mailing-List: contact notifications-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list notifications@libcloud.apache.org Received: (qmail 12621 invoked by uid 99); 11 Dec 2015 13:01:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Dec 2015 13:01:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E42B12C14F6 for ; Fri, 11 Dec 2015 13:01:10 +0000 (UTC) Date: Fri, 11 Dec 2015 13:01:10 +0000 (UTC) From: "Miguel Caballer (JIRA)" To: notifications@libcloud.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LIBCLOUD-784) bug in the function ex_create_multiple_nodes of GCE driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)