salt-cloud salt master on GCE unable to import cloud gce

106 views
Skip to first unread message

Bramh Gupta

unread,
Dec 15, 2014, 11:00:04 PM12/15/14
to salt-...@googlegroups.com
Hello,

I am facing this issue while using a instance on GCE as the salt master. I have followed the instructions on the saltstack web site and have ensured all the prerequisites.

[root@saltmaster1 bramhg]# salt-cloud --list-locations gce
[INFO    ] salt-cloud starting
[WARNING ] Failed to import cloud openstack, this is due most likely to a syntax error. Traceback raised:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/loader.py", line 903, in load_modules
    ), fn_, path, desc
  File "/usr/lib/python2.6/site-packages/salt/cloud/clouds/openstack.py", line 152, in <module>
    import salt.utils.pycrypto as sup
  File "/usr/lib/python2.6/site-packages/salt/utils/pycrypto.py", line 9, in <module>
    import Crypto.Random  # pylint: disable=E0611
  File "/usr/lib64/python2.6/site-packages/Crypto/Random/__init__.py", line 29, in <module>
    from Crypto.Random import _UserFriendlyRNG
  File "/usr/lib64/python2.6/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 38, in <module>
    from Crypto.Random.Fortuna import FortunaAccumulator
  File "/usr/lib64/python2.6/site-packages/Crypto/Random/Fortuna/FortunaAccumulator.py", line 39, in <module>
    import FortunaGenerator
  File "/usr/lib64/python2.6/site-packages/Crypto/Random/Fortuna/FortunaGenerator.py", line 34, in <module>
    from Crypto.Util.number import ceil_shift, exact_log2, exact_div
  File "/usr/lib64/python2.6/site-packages/Crypto/Util/number.py", line 56, in <module>
    if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:
AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'
[WARNING ] Failed to import cloud gce, this is due most likely to a syntax error. Traceback raised:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/loader.py", line 903, in load_modules
    ), fn_, path, desc
  File "/usr/lib/python2.6/site-packages/salt/cloud/clouds/gce.py", line 130, in <module>
    from libcloud.common.google import (
  File "/usr/lib/python2.6/site-packages/libcloud/common/google.py", line 90, in <module>
    from Crypto.PublicKey import RSA
  File "/usr/lib64/python2.6/site-packages/Crypto/PublicKey/RSA.py", line 75, in <module>
    from Crypto.Util.number import getRandomRange, bytes_to_long, long_to_bytes
  File "/usr/lib64/python2.6/site-packages/Crypto/Util/number.py", line 56, in <module>
    if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:
AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'
[WARNING ] The cloud driver, 'gce', configured under the 'gce-config' cloud provider alias was not loaded since 'gce.get_configured_provider()' could not be found. Removing it from the available providers list
Error: There was an error listing locations: No cloud providers matched 'gce'. Available selections:

Thanks in advance for help.

Bramh Gupta
President, SRB Technologies | 571.338.2443 | www.srbtech.com | Cloud. Middleware. Big Data. Consulting 




Alex Leonhardt

unread,
Dec 16, 2014, 2:38:38 AM12/16/14
to salt-...@googlegroups.com
Hi,

The trace goes back to the Crypto package it seems - if that's installed (check with pip), check your public / private keys are correct and with correct permissions...

I could try this later myself and see what's happening.. What version are you running? Maybe paste the /etc/salt/cloud* files (without passwords etc please) ?

Ta
Alex

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Leonhardt

unread,
Dec 16, 2014, 2:45:10 AM12/16/14
to salt-...@googlegroups.com
Also just found this - hope it helps!
http://stackoverflow.com/questions/20881768/fastmath-error-in-python-have-decl-mpz-powm-sec

Alex

To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.

Bramh Gupta

unread,
Dec 16, 2014, 4:30:21 PM12/16/14
to salt-...@googlegroups.com
Alex,

Thanks for both the notes. It works now. I basically made sure that I am using the latest version of the PyCrypto per your instructions.

Thanks
Bramh
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.

Alex Leonhardt

unread,
Dec 16, 2014, 5:26:00 PM12/16/14
to salt-...@googlegroups.com
Great! Glad I was of help! :)
Alex
Reply all
Reply to author
Forward
0 new messages