You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2020/03/18 14:20:26 UTC
[GitHub] [libcloud] kbknapp opened a new issue #1441: GCE create_node() with
location=None (default) throws AttributeError
kbknapp opened a new issue #1441: GCE create_node() with location=None (default) throws AttributeError
URL: https://github.com/apache/libcloud/issues/1441
## Summary
Running with the GCE driver using `create_node(.. , location=None)` (which is a default) throws an `AttributeError`
## Detailed Information
OS: Ubuntu 19.10
libcloud Version: `apache-libcloud==2.8.1`
Python version: `Python 3.7.5`
Code to reproduce:
```python
gce = get_driver(Provider.GCE)(
f'{user}@{project_id}.iam.gserviceaccount.com',
api_key_file,
project=project_id)
gce.create_node(name, size, None,
ex_network=network,
ex_subnetwork=subnet,
ex_tags=tags,
ex_metadata=metadata,
external_ip='ephemeral',
internal_ip=internal_ip,
ex_image_family=image,
ex_disk_size=disk_sz)
```
With exception:
```
Traceback (most recent call last):
[ .. snip .. ]
File "/home/kevin/.local/lib/python3.7/site-packages/proj/gcp/builder.py", line 181, in create_vm
ex_disk_size=disk_sz)
File "/home/kevin/.local/lib/python3.7/site-packages/libcloud/compute/drivers/gce.py", line 4169, in create_node
location = self.ex_get_zone(location)
File "/home/kevin/.local/lib/python3.7/site-packages/libcloud/compute/drivers/gce.py", line 7811, in ex_get_zone
if name.startswith('https://'):
AttributeError: 'NoneType' object has no attribute 'startswith'
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [libcloud] Kami commented on issue #1441: GCE create_node() with
location=None (default) throws AttributeError
Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1441: GCE create_node() with location=None (default) throws AttributeError
URL: https://github.com/apache/libcloud/issues/1441#issuecomment-600844103
I had a look and the issue is related to not passing ``datacenter`` argument to the driver constructor.
Location needs to be specified one way or another - either via constructor datacenter argument or via location argument to the create_node method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [libcloud] Kami commented on issue #1441: GCE create_node() with
location=None (default) throws AttributeError
Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1441: GCE create_node() with location=None (default) throws AttributeError
URL: https://github.com/apache/libcloud/issues/1441#issuecomment-600848147
Having said that - I will also open a PR so an exception is throw if neither of those is provided and clarify that in the docs.
Thanks again for reporting this.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [libcloud] Kami closed issue #1441: GCE create_node() with
location=None (default) throws AttributeError
Posted by GitBox <gi...@apache.org>.
Kami closed issue #1441: GCE create_node() with location=None (default) throws AttributeError
URL: https://github.com/apache/libcloud/issues/1441
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [libcloud] Kami commented on issue #1441: GCE create_node() with
location=None (default) throws AttributeError
Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1441: GCE create_node() with location=None (default) throws AttributeError
URL: https://github.com/apache/libcloud/issues/1441#issuecomment-600815502
Thanks for reporting this.
It's likely related to recent **kwargs refactoring. I will have a look.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services