saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.09k stars 5.47k forks source link

Azure ARM dependency issues #39636

Closed sumeetisp closed 7 years ago

sumeetisp commented 7 years ago

Description of Issue/Question

I have installed all the dependencies for azure arm cloud as specified in the following link, [https://docs.saltstack.com/en/latest/topics/cloud/azurearm.html]

Following packages were installed,

azure==2.0.0rc5 azure-batch==0.30.0rc5 azure-common==1.1.4 azure-graphrbac==0.30.0rc5 azure-mgmt==0.30.0rc5 azure-mgmt-authorization==0.30.0rc5 azure-mgmt-batch==0.30.0rc5 azure-mgmt-cdn==0.30.0rc5 azure-mgmt-cognitiveservices==0.30.0rc5 azure-mgmt-commerce==0.30.0rc5 azure-mgmt-compute==0.30.0rc5 azure-mgmt-keyvault==0.30.0rc5 azure-mgmt-logic==0.30.0rc5 azure-mgmt-network==0.30.0rc5 azure-mgmt-notificationhubs==0.30.0rc5 azure-mgmt-nspkg==1.0.0 azure-mgmt-powerbiembedded==0.30.0rc5 azure-mgmt-redis==0.30.0rc5 azure-mgmt-resource==0.30.0rc5 azure-mgmt-scheduler==0.30.0rc5 azure-mgmt-storage==0.30.0rc5 azure-mgmt-web==0.30.0rc5 azure-nspkg==1.0.0 azure-servicebus==0.20.2 azure-servicemanagement-legacy==0.20.3 azure-storage==0.32.0

While executing the command salt-cloud --list-images azure the following error is the error i see,

[WARNING ] Missing dependency: 'azurearm'. The azurearm driver requires 'azurearm' to be installed. [WARNING ] The cloud driver, 'azurearm', configured under the 'azure' cloud provider alias, could not be loaded. Please check your provider configuration files and ensure all required dependencies are installed for the 'azurearm' driver. In rare cases, this could indicate the 'azurearm.get_configured_provider()' function could not be found. Removing 'azurearm' from the available providers list

Am i missing something here?

Salt Versions Report Salt Version: Salt: 2016.11.2

Dependency Versions: cffi: Not Installed cherrypy: 3.2.2 dateutil: 2.6.0 gitdb: 0.5.4 gitpython: 0.3.2 RC1 ioflo: Not Installed Jinja2: 2.8 libgit2: Not Installed libnacl: Not Installed M2Crypto: 0.21.1 Mako: 0.9.1 msgpack-pure: Not Installed msgpack-python: 0.4.6 mysql-python: 1.2.3 pycparser: Not Installed pycrypto: 2.6.1 pygit2: Not Installed Python: 2.7.6 (default, Oct 26 2016, 20:30:19) python-gnupg: Not Installed PyYAML: 3.10 PyZMQ: 14.0.1 RAET: Not Installed smmap: 0.8.2 timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.0.4

System Versions: dist: Ubuntu 14.04 trusty machine: x86_64 release: 3.16.0-30-generic system: Linux version: Ubuntu 14.04 trusty

Ch3LL commented 7 years ago

@sumeetisp can you open a python interpreter and try these imports: https://github.com/saltstack/salt/blob/v2016.11.2/salt/cloud/clouds/azurearm.py#L57-L89

When you get an import error you will know you are missing that dependency. If you can pinpoint which dependency there is we can add it to the docs.

sumeetisp commented 7 years ago

python -c 'import azure.storage' Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/azure/storage/init.py", line 21, in from .models import ( File "/usr/local/lib/python2.7/dist-packages/azure/storage/models.py", line 27, in from cryptography.hazmat.primitives.keywrap import( ImportError: No module named cryptography.hazmat.primitives.keywrap

I will try to find out if there any other import errors

sumeetisp commented 7 years ago

Any suggestions?

Ch3LL commented 7 years ago

Maybe you are running into this? https://github.com/Azure/azure-storage-python/issues/218

There is a workaround in that issue

sumeetisp commented 7 years ago

Tx @Ch3LL . Its working