You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Bruno Mahé (JIRA)" <ji...@apache.org> on 2012/06/29 21:54:44 UTC
[dev] [jira] [Created] (LIBCLOUD-219) Libcloud should not always set up a
network id when creating a node
Bruno Mahé created LIBCLOUD-219:
-----------------------------------
Summary: Libcloud should not always set up a network id when creating a node
Key: LIBCLOUD-219
URL: https://issues.apache.org/jira/browse/LIBCLOUD-219
Project: Libcloud
Issue Type: Bug
Components: Compute
Reporter: Bruno Mahé
I am using libcloud from trunk and here is what I get when I try to create a node:
{noformat}
Creating node Bigtop-4-test-13
Traceback (most recent call last):
File "/home/bruno/cloudstack.py", line 35, in <module>
main()
File "/home/bruno/cloudstack.py", line 32, in main
node = cs.create_node( 'Bigtop-4-test-' + str(num), sizes[image_size], images[image_name])
File "/home/bruno/freesoftware/libcloud/libcloud/compute/drivers/cloudstack.py", line 239, in create_node
**extra_args
File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 122, in _async_request
return self.connection._async_request(command, **kwargs)
File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 70, in _async_request
context=context)
File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 690, in async_request
response = request(**kwargs)
File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 96, in _sync_request
result = self.request(self.driver.path, params=kwargs)
File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 583, in request
connection=self)
File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 76, in __init__
raise Exception(self.parse_error())
Exception: {'deployvirtualmachineresponse': {'errorcode': 431, 'uuidList': [], 'errortext': "Can't specify network Ids in Basic zone"}}
{noformat}
But when doing the following modification, I can get it working:
{noformat}
diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
index e8a0012..f80ab56 100644
--- a/libcloud/compute/drivers/cloudstack.py
+++ b/libcloud/compute/drivers/cloudstack.py
@@ -222,12 +222,7 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
location = self.list_locations()[0]
network_id = kwargs.pop('network_id', None)
- if network_id is None:
- networks = self._sync_request('listNetworks')
-
- if networks:
- extra_args['networkids'] = networks['network'][0]['id']
- else:
+ if network_id is not None:
extra_args['networkids'] = network_id
result = self._async_request('deployVirtualMachine',
{noformat}
I am not familiar enough with cloudstack to tell when the network_id should or should not be passed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[dev] [jira] [Commented] (LIBCLOUD-219) Libcloud should not always set up
a network id when creating a node
Posted by "Bruno Mahé (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LIBCLOUD-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404320#comment-13404320 ]
Bruno Mahé commented on LIBCLOUD-219:
-------------------------------------
CloudStack 3.0.3
> Libcloud should not always set up a network id when creating a node
> -------------------------------------------------------------------
>
> Key: LIBCLOUD-219
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-219
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Reporter: Bruno Mahé
>
> I am using libcloud from trunk and here is what I get when I try to create a node:
> {noformat}
> Creating node Bigtop-4-test-13
> Traceback (most recent call last):
> File "/home/bruno/cloudstack.py", line 35, in <module>
> main()
> File "/home/bruno/cloudstack.py", line 32, in main
> node = cs.create_node( 'Bigtop-4-test-' + str(num), sizes[image_size], images[image_name])
> File "/home/bruno/freesoftware/libcloud/libcloud/compute/drivers/cloudstack.py", line 239, in create_node
> **extra_args
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 122, in _async_request
> return self.connection._async_request(command, **kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 70, in _async_request
> context=context)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 690, in async_request
> response = request(**kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 96, in _sync_request
> result = self.request(self.driver.path, params=kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 583, in request
> connection=self)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 76, in __init__
> raise Exception(self.parse_error())
> Exception: {'deployvirtualmachineresponse': {'errorcode': 431, 'uuidList': [], 'errortext': "Can't specify network Ids in Basic zone"}}
> {noformat}
> But when doing the following modification, I can get it working:
> {noformat}
> diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
> index e8a0012..f80ab56 100644
> --- a/libcloud/compute/drivers/cloudstack.py
> +++ b/libcloud/compute/drivers/cloudstack.py
> @@ -222,12 +222,7 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
> location = self.list_locations()[0]
>
> network_id = kwargs.pop('network_id', None)
> - if network_id is None:
> - networks = self._sync_request('listNetworks')
> -
> - if networks:
> - extra_args['networkids'] = networks['network'][0]['id']
> - else:
> + if network_id is not None:
> extra_args['networkids'] = network_id
>
> result = self._async_request('deployVirtualMachine',
> {noformat}
> I am not familiar enough with cloudstack to tell when the network_id should or should not be passed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[dev] [jira] [Reopened] (LIBCLOUD-219) Libcloud should not always set up
a network id when creating a node
Posted by "Tomaz Muraus (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LIBCLOUD-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomaz Muraus reopened LIBCLOUD-219:
-----------------------------------
Sorry, didn't mean to resolve it just yet.
> Libcloud should not always set up a network id when creating a node
> -------------------------------------------------------------------
>
> Key: LIBCLOUD-219
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-219
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Reporter: Bruno Mahé
>
> I am using libcloud from trunk and here is what I get when I try to create a node:
> {noformat}
> Creating node Bigtop-4-test-13
> Traceback (most recent call last):
> File "/home/bruno/cloudstack.py", line 35, in <module>
> main()
> File "/home/bruno/cloudstack.py", line 32, in main
> node = cs.create_node( 'Bigtop-4-test-' + str(num), sizes[image_size], images[image_name])
> File "/home/bruno/freesoftware/libcloud/libcloud/compute/drivers/cloudstack.py", line 239, in create_node
> **extra_args
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 122, in _async_request
> return self.connection._async_request(command, **kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 70, in _async_request
> context=context)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 690, in async_request
> response = request(**kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 96, in _sync_request
> result = self.request(self.driver.path, params=kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 583, in request
> connection=self)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 76, in __init__
> raise Exception(self.parse_error())
> Exception: {'deployvirtualmachineresponse': {'errorcode': 431, 'uuidList': [], 'errortext': "Can't specify network Ids in Basic zone"}}
> {noformat}
> But when doing the following modification, I can get it working:
> {noformat}
> diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
> index e8a0012..f80ab56 100644
> --- a/libcloud/compute/drivers/cloudstack.py
> +++ b/libcloud/compute/drivers/cloudstack.py
> @@ -222,12 +222,7 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
> location = self.list_locations()[0]
>
> network_id = kwargs.pop('network_id', None)
> - if network_id is None:
> - networks = self._sync_request('listNetworks')
> -
> - if networks:
> - extra_args['networkids'] = networks['network'][0]['id']
> - else:
> + if network_id is not None:
> extra_args['networkids'] = network_id
>
> result = self._async_request('deployVirtualMachine',
> {noformat}
> I am not familiar enough with cloudstack to tell when the network_id should or should not be passed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[dev] [jira] [Resolved] (LIBCLOUD-219) Libcloud should not always set up
a network id when creating a node
Posted by "Tomaz Muraus (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LIBCLOUD-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomaz Muraus resolved LIBCLOUD-219.
-----------------------------------
Resolution: Fixed
Assignee: Tomaz Muraus
I just checked API docs for the past couple of API versions and yes it seems like network_id argument is optional. I modified the code and now you need to explicitly pass "network_id" argument to the create_node method.
> Libcloud should not always set up a network id when creating a node
> -------------------------------------------------------------------
>
> Key: LIBCLOUD-219
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-219
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Reporter: Bruno Mahé
> Assignee: Tomaz Muraus
>
> I am using libcloud from trunk and here is what I get when I try to create a node:
> {noformat}
> Creating node Bigtop-4-test-13
> Traceback (most recent call last):
> File "/home/bruno/cloudstack.py", line 35, in <module>
> main()
> File "/home/bruno/cloudstack.py", line 32, in main
> node = cs.create_node( 'Bigtop-4-test-' + str(num), sizes[image_size], images[image_name])
> File "/home/bruno/freesoftware/libcloud/libcloud/compute/drivers/cloudstack.py", line 239, in create_node
> **extra_args
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 122, in _async_request
> return self.connection._async_request(command, **kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 70, in _async_request
> context=context)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 690, in async_request
> response = request(**kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 96, in _sync_request
> result = self.request(self.driver.path, params=kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 583, in request
> connection=self)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 76, in __init__
> raise Exception(self.parse_error())
> Exception: {'deployvirtualmachineresponse': {'errorcode': 431, 'uuidList': [], 'errortext': "Can't specify network Ids in Basic zone"}}
> {noformat}
> But when doing the following modification, I can get it working:
> {noformat}
> diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
> index e8a0012..f80ab56 100644
> --- a/libcloud/compute/drivers/cloudstack.py
> +++ b/libcloud/compute/drivers/cloudstack.py
> @@ -222,12 +222,7 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
> location = self.list_locations()[0]
>
> network_id = kwargs.pop('network_id', None)
> - if network_id is None:
> - networks = self._sync_request('listNetworks')
> -
> - if networks:
> - extra_args['networkids'] = networks['network'][0]['id']
> - else:
> + if network_id is not None:
> extra_args['networkids'] = network_id
>
> result = self._async_request('deployVirtualMachine',
> {noformat}
> I am not familiar enough with cloudstack to tell when the network_id should or should not be passed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[dev] [jira] [Resolved] (LIBCLOUD-219) Libcloud should not always set up
a network id when creating a node
Posted by "Tomaz Muraus (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LIBCLOUD-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomaz Muraus resolved LIBCLOUD-219.
-----------------------------------
Resolution: Fixed
Which version of CloudStack API are you using?
> Libcloud should not always set up a network id when creating a node
> -------------------------------------------------------------------
>
> Key: LIBCLOUD-219
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-219
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Reporter: Bruno Mahé
>
> I am using libcloud from trunk and here is what I get when I try to create a node:
> {noformat}
> Creating node Bigtop-4-test-13
> Traceback (most recent call last):
> File "/home/bruno/cloudstack.py", line 35, in <module>
> main()
> File "/home/bruno/cloudstack.py", line 32, in main
> node = cs.create_node( 'Bigtop-4-test-' + str(num), sizes[image_size], images[image_name])
> File "/home/bruno/freesoftware/libcloud/libcloud/compute/drivers/cloudstack.py", line 239, in create_node
> **extra_args
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 122, in _async_request
> return self.connection._async_request(command, **kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 70, in _async_request
> context=context)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 690, in async_request
> response = request(**kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 96, in _sync_request
> result = self.request(self.driver.path, params=kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 583, in request
> connection=self)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 76, in __init__
> raise Exception(self.parse_error())
> Exception: {'deployvirtualmachineresponse': {'errorcode': 431, 'uuidList': [], 'errortext': "Can't specify network Ids in Basic zone"}}
> {noformat}
> But when doing the following modification, I can get it working:
> {noformat}
> diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
> index e8a0012..f80ab56 100644
> --- a/libcloud/compute/drivers/cloudstack.py
> +++ b/libcloud/compute/drivers/cloudstack.py
> @@ -222,12 +222,7 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
> location = self.list_locations()[0]
>
> network_id = kwargs.pop('network_id', None)
> - if network_id is None:
> - networks = self._sync_request('listNetworks')
> -
> - if networks:
> - extra_args['networkids'] = networks['network'][0]['id']
> - else:
> + if network_id is not None:
> extra_args['networkids'] = network_id
>
> result = self._async_request('deployVirtualMachine',
> {noformat}
> I am not familiar enough with cloudstack to tell when the network_id should or should not be passed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[dev] [jira] [Closed] (LIBCLOUD-219) Libcloud should not always set up a
network id when creating a node
Posted by "Tomaz Muraus (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LIBCLOUD-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomaz Muraus closed LIBCLOUD-219.
---------------------------------
> Libcloud should not always set up a network id when creating a node
> -------------------------------------------------------------------
>
> Key: LIBCLOUD-219
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-219
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Reporter: Bruno Mahé
> Assignee: Tomaz Muraus
> Fix For: 0.11.0
>
>
> I am using libcloud from trunk and here is what I get when I try to create a node:
> {noformat}
> Creating node Bigtop-4-test-13
> Traceback (most recent call last):
> File "/home/bruno/cloudstack.py", line 35, in <module>
> main()
> File "/home/bruno/cloudstack.py", line 32, in main
> node = cs.create_node( 'Bigtop-4-test-' + str(num), sizes[image_size], images[image_name])
> File "/home/bruno/freesoftware/libcloud/libcloud/compute/drivers/cloudstack.py", line 239, in create_node
> **extra_args
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 122, in _async_request
> return self.connection._async_request(command, **kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 70, in _async_request
> context=context)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 690, in async_request
> response = request(**kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 96, in _sync_request
> result = self.request(self.driver.path, params=kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 583, in request
> connection=self)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 76, in __init__
> raise Exception(self.parse_error())
> Exception: {'deployvirtualmachineresponse': {'errorcode': 431, 'uuidList': [], 'errortext': "Can't specify network Ids in Basic zone"}}
> {noformat}
> But when doing the following modification, I can get it working:
> {noformat}
> diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
> index e8a0012..f80ab56 100644
> --- a/libcloud/compute/drivers/cloudstack.py
> +++ b/libcloud/compute/drivers/cloudstack.py
> @@ -222,12 +222,7 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
> location = self.list_locations()[0]
>
> network_id = kwargs.pop('network_id', None)
> - if network_id is None:
> - networks = self._sync_request('listNetworks')
> -
> - if networks:
> - extra_args['networkids'] = networks['network'][0]['id']
> - else:
> + if network_id is not None:
> extra_args['networkids'] = network_id
>
> result = self._async_request('deployVirtualMachine',
> {noformat}
> I am not familiar enough with cloudstack to tell when the network_id should or should not be passed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[dev] [jira] [Updated] (LIBCLOUD-219) Libcloud should not always set up a
network id when creating a node
Posted by "Tomaz Muraus (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LIBCLOUD-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomaz Muraus updated LIBCLOUD-219:
----------------------------------
Fix Version/s: 0.11.0
> Libcloud should not always set up a network id when creating a node
> -------------------------------------------------------------------
>
> Key: LIBCLOUD-219
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-219
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Reporter: Bruno Mahé
> Assignee: Tomaz Muraus
> Fix For: 0.11.0
>
>
> I am using libcloud from trunk and here is what I get when I try to create a node:
> {noformat}
> Creating node Bigtop-4-test-13
> Traceback (most recent call last):
> File "/home/bruno/cloudstack.py", line 35, in <module>
> main()
> File "/home/bruno/cloudstack.py", line 32, in main
> node = cs.create_node( 'Bigtop-4-test-' + str(num), sizes[image_size], images[image_name])
> File "/home/bruno/freesoftware/libcloud/libcloud/compute/drivers/cloudstack.py", line 239, in create_node
> **extra_args
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 122, in _async_request
> return self.connection._async_request(command, **kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 70, in _async_request
> context=context)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 690, in async_request
> response = request(**kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/cloudstack.py", line 96, in _sync_request
> result = self.request(self.driver.path, params=kwargs)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 583, in request
> connection=self)
> File "/home/bruno/freesoftware/libcloud/libcloud/common/base.py", line 76, in __init__
> raise Exception(self.parse_error())
> Exception: {'deployvirtualmachineresponse': {'errorcode': 431, 'uuidList': [], 'errortext': "Can't specify network Ids in Basic zone"}}
> {noformat}
> But when doing the following modification, I can get it working:
> {noformat}
> diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
> index e8a0012..f80ab56 100644
> --- a/libcloud/compute/drivers/cloudstack.py
> +++ b/libcloud/compute/drivers/cloudstack.py
> @@ -222,12 +222,7 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
> location = self.list_locations()[0]
>
> network_id = kwargs.pop('network_id', None)
> - if network_id is None:
> - networks = self._sync_request('listNetworks')
> -
> - if networks:
> - extra_args['networkids'] = networks['network'][0]['id']
> - else:
> + if network_id is not None:
> extra_args['networkids'] = network_id
>
> result = self._async_request('deployVirtualMachine',
> {noformat}
> I am not familiar enough with cloudstack to tell when the network_id should or should not be passed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira