Open shellhacks opened 9 years ago
Intersting one. That's in libcloud not this module.
What versions of libcloud and lxml do you have?
I think I last tested this with libcloud 0.14.... 1? Might be worth trying to downgrade to that version to see if it at least gets you up and running.
Here are the current versions:
# rpm -qa | grep libcloud
python-libcloud-0.17.0-1.el6.noarch
# pip freeze | grep lxml
lxml==3.4.4
Will try to downgrade libcloud and come back after.
Removing current libcloud:
# rpm -e python-libcloud-0.17.0-1.el6.noarch
error: Failed dependencies:
python-libcloud is needed by (installed) salt-cloud-2015.5.0-1.el6.noarch
# rpm -e --nodeps python-libcloud-0.17.0-1.el6.noarch
Installing the older libcloud:
# wget http://archive.apache.org/dist/libcloud/apache-libcloud-0.14.1.tar.gz -O - | tar -xz
# cd apache-libcloud-0.14.1
# python setup.py install
Checking version
# python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libcloud
>>> libcloud.__version__
'0.14.1'
And it works!!!
Is spite of new errors i see on vCloud that test VM has been created.
Here is the DEBUG:
# salt-cloud -m /etc/salt/cloud.maps.d/vcloud.conf -l debug
[DEBUG ] Reading configuration from /etc/salt/cloud
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Missing configuration file: /etc/salt/cloud.providers
[DEBUG ] Including configuration from '/etc/salt/cloud.providers.d/vcloud.conf'
[DEBUG ] Reading configuration from /etc/salt/cloud.providers.d/vcloud.conf
[DEBUG ] Missing configuration file: /etc/salt/cloud.profiles
[DEBUG ] Including configuration from '/etc/salt/cloud.profiles.d/vcloud.conf'
[DEBUG ] Reading configuration from /etc/salt/cloud.profiles.d/vcloud.conf
[DEBUG ] Configuration file path: /etc/salt/cloud
[INFO ] salt-cloud starting
[DEBUG ] Loading vCloud cloud module
[DEBUG ] Failed to import clouds joyent:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/salt/loader.py", line 951, in _load_module
), fn_, fpath, desc)
File "/usr/lib/python2.6/site-packages/salt/cloud/clouds/joyent.py", line 68, in <module>
from Crypto.Signature import PKCS1_v1_5
ImportError: No module named Signature
[DEBUG ] Could not LazyLoad parallels.avail_sizes
[DEBUG ] LazyLoaded parallels.avail_locations
[DEBUG ] LazyLoaded proxmox.avail_sizes
[DEBUG ] Could not LazyLoad saltify.destroy
[DEBUG ] Could not LazyLoad saltify.avail_sizes
[DEBUG ] Could not LazyLoad saltify.avail_images
[DEBUG ] Could not LazyLoad saltify.avail_locations
[DEBUG ] LazyLoaded rackspace.reboot
[DEBUG ] LazyLoaded openstack.list_locations
[DEBUG ] LazyLoaded rackspace.list_locations
[DEBUG ] LazyLoaded jinja.render
[DEBUG ] LazyLoaded yaml.render
[DEBUG ] Jinja search path: ['/var/cache/salt/master/files/base']
[DEBUG ] Rendered data from file: /etc/salt/cloud.maps.d/vcloud.conf:
vcd_tiny_vdc_a:
- test:
network: Internet
[DEBUG ] Results of YAML rendering:
OrderedDict([('vcd_tiny_vdc_a', [OrderedDict([('test', OrderedDict([('network', 'Internet')]))])])])
[INFO ] Applying map from '/etc/salt/cloud.maps.d/vcloud.conf'.
[DEBUG ] Could not LazyLoad vcloud.optimize_providers
[DEBUG ] The 'vcloud' cloud driver is unable to be optimized.
[DEBUG ] Loading vCloud cloud module
[DEBUG ] Failed to import clouds joyent:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/salt/loader.py", line 951, in _load_module
), fn_, fpath, desc)
File "/usr/lib/python2.6/site-packages/salt/cloud/clouds/joyent.py", line 68, in <module>
from Crypto.Signature import PKCS1_v1_5
ImportError: No module named Signature
[DEBUG ] Could not LazyLoad parallels.avail_sizes
[DEBUG ] LazyLoaded parallels.avail_locations
[DEBUG ] LazyLoaded proxmox.avail_sizes
[DEBUG ] Could not LazyLoad saltify.destroy
[DEBUG ] Could not LazyLoad saltify.avail_sizes
[DEBUG ] Could not LazyLoad saltify.avail_images
[DEBUG ] Could not LazyLoad saltify.avail_locations
[DEBUG ] LazyLoaded rackspace.reboot
[DEBUG ] LazyLoaded openstack.list_locations
[DEBUG ] LazyLoaded rackspace.list_locations
The following virtual machines are set to be created:
test
Proceed? [N/y] y
... proceeding
[INFO ] Calculating dependencies for test
[DEBUG ] Got execution order 0 for test
[DEBUG ] No make_master found in map
[DEBUG ] Generating minion keys for 'test'
[]
.....................[ERROR ] There was a query error: <ns0:Error majorErrorCode="400" message="[ fe7cd11d-2c9e-49ce-b80e-fccc089fcbc3 ] Impossible de changer la carte réseau primaire lorsque la machine virtuelle n'est pas désactivée." minorErrorCode="BAD_REQUEST" ns1:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://192.168.0.100/api/v1.5/schema/master.xsd" xmlns:ns0="http://www.vmware.com/vcloud/v1.5" xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance" />
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/salt/cloud/cli.py", line 316, in run
ret = mapper.run_map(dmap)
File "/usr/lib/python2.6/site-packages/salt/cloud/__init__.py", line 2091, in run_map
profile, local_master=local_master
File "/usr/lib/python2.6/site-packages/salt/cloud/__init__.py", line 1241, in create
output = self.clouds[func](vm_)
File "/usr/lib/python2.6/site-packages/salt/cloud/clouds/vcloud.py", line 92, in create
dnat_list=dnat_list
File "/usr/lib/python2.6/site-packages/salt/cloud/clouds/vcloud_support/libcloud_vcloud.py", line 513, in create_vm
ex_vm_ipmode=('POOL', network_name),
File "/usr/lib/python2.6/site-packages/apache_libcloud-0.14.1-py2.6.egg/libcloud/compute/drivers/vcloud.py", line 1452, in create_node
self._change_vm_ipmode(vapp_href, ex_vm_ipmode)
File "/usr/lib/python2.6/site-packages/salt/cloud/clouds/vcloud_support/libcloud_vcloud.py", line 212, in _change_vm_ipmode
headers=headers
File "/usr/lib/python2.6/site-packages/apache_libcloud-0.14.1-py2.6.egg/libcloud/compute/drivers/vcloud.py", line 317, in request
return super(VCloudConnection, self).request(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/apache_libcloud-0.14.1-py2.6.egg/libcloud/common/base.py", line 675, in request
response = responseCls(**kwargs)
File "/usr/lib/python2.6/site-packages/apache_libcloud-0.14.1-py2.6.egg/libcloud/common/base.py", line 112, in __init__
raise Exception(self.parse_error())
Exception: <ns0:Error majorErrorCode="400" message="[ fe7cd11d-2c9e-49ce-b80e-fccc089fcbc3 ] Impossible de changer la carte réseau primaire lorsque la machine virtuelle n'est pas désactivée." minorErrorCode="BAD_REQUEST" ns1:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://192.168.0.100/api/v1.5/schema/master.xsd" xmlns:ns0="http://www.vmware.com/vcloud/v1.5" xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance" />
The following error appears while trying to create a new VM:
Debug:
Current settings:
I think that the code that cause the issue is located in "/usr/lib/python2.6/site-packages/libcloud/compute/drivers/vcloud.py". Here it is:
Thanks in advance for help.