[
https://issues.apache.org/jira/browse/LIBCLOUD-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason DeTiberus updated LIBCLOUD-697:
-------------------------------------
Priority: Major (was: Minor)
> 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
>
> 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)