libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LIBCLOUD-697) GCE Compute driver create_node does not accept str for ex_boot_disk
Date Wed, 13 May 2015 20:03:00 GMT

    [ https://issues.apache.org/jira/browse/LIBCLOUD-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14542590#comment-14542590
] 

ASF subversion and git services commented on LIBCLOUD-697:
----------------------------------------------------------

Commit 8664118c877a43f1434a576bd46223707589b078 in libcloud's branch refs/heads/trunk from
[~erjohnso]
[ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=8664118 ]

[google compute] fixes LIBCLOUD-697: allow string for ex_boot_disk on create_node

Closes #520

Signed-off-by: Eric Johnson <erjohnso@google.com>


> GCE Compute driver create_node does not accept str for ex_boot_disk
> -------------------------------------------------------------------
>
>                 Key: LIBCLOUD-697
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-697
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>            Reporter: Jason DeTiberus
>            Assignee: Eric Johnson
>
> The documentation for the GCE compute driver states that the ex_boot_disk param for create_node
takes either a StorageVolume or str.  If you pass a string, it results in the following traceback:
> {code:none}
> failed: [localhost] => {"failed": true, "parsed": false}
> Traceback (most recent call last):
>   File "/home/jdetiber/.ansible/tmp/ansible-tmp-1429541392.81-113800638314850/gce", line
2278, in <module>
>     main()
>   File "/home/jdetiber/.ansible/tmp/ansible-tmp-1429541392.81-113800638314850/gce", line
577, in main
>     module.exit_json(**(node_mgr.execute()))
>   File "/home/jdetiber/.ansible/tmp/ansible-tmp-1429541392.81-113800638314850/gce", line
352, in execute
>     metadata)
>   File "/home/jdetiber/.ansible/tmp/ansible-tmp-1429541392.81-113800638314850/gce", line
461, in create_instances_by_names
>     lc_network, lc_zone, metadata)
>   File "/home/jdetiber/.ansible/tmp/ansible-tmp-1429541392.81-113800638314850/gce", line
433, in create_instance_by_name
>     ex_nic_gce_struct=nics
>   File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/gce.py", line 2202,
in create_node
>     ex_automatic_restart)
>   File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/gce.py", line 4507,
in _create_node_req
>     'deviceName': boot_disk.name,
> AttributeError: 'str' object has no attribute 'name'
> {code}
> The issue appears to be that create_node is passing the ex_boot_disk argument directly
to _create_node_req (where the boot_disk param expects a StorageVolume or None).
> Either the docs need to be updated or create_node should instantiate a StorageVolume
from ex_boot_disk if it is a str.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message