You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/05/13 21:56:00 UTC
[jira] [Commented] (LIBCLOUD-697) GCE Compute driver create_node
does not accept str for ex_boot_disk
[ https://issues.apache.org/jira/browse/LIBCLOUD-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14542580#comment-14542580 ]
ASF GitHub Bot commented on LIBCLOUD-697:
-----------------------------------------
GitHub user erjohnso opened a pull request:
https://github.com/apache/libcloud/pull/520
[google compute] bugfix: allow string for ex_boot_disk on create_node
Bugfix to allow a `str` argument for `ex_boot_disk` on `create_node()`. This is a fix for https://issues.apache.org/jira/browse/LIBCLOUD-697
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/erjohnso/libcloud jira697
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/libcloud/pull/520.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #520
----
commit 69ec7aa0bae33ad77d668b7c10e123f8a30e1e83
Author: Eric Johnson <er...@google.com>
Date: 2015-05-13T19:53:32Z
[google compute] bugfix: allow string for ex_boot_disk on create_node
----
> 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)