0

I get this exception:

===> salt-ssh remote-host cmd.run 'id'
remote-host:
    ----------
    retcode:
        0
    stderr:
        Traceback (most recent call last):
          File "/var/tmp/.root_483e1e_salt/salt-call", line 15, in <module>
            salt_call()
          File "/var/tmp/.root_483e1e_salt/py2/salt/scripts.py", line 395, in salt_call
            import salt.cli.call
          File "/var/tmp/.root_483e1e_salt/py2/salt/cli/call.py", line 8, in <module>
            import salt.cli.caller
          File "/var/tmp/.root_483e1e_salt/py2/salt/cli/caller.py", line 18, in <module>
            import salt.loader
          File "/var/tmp/.root_483e1e_salt/py2/salt/loader.py", line 27, in <module>
            import salt.utils.event
          File "/var/tmp/.root_483e1e_salt/py2/salt/utils/event.py", line 70, in <module>
            import tornado.iostream
          File "/var/tmp/.root_483e1e_salt/py2/tornado/iostream.py", line 40, in <module>
            from tornado.netutil import ssl_wrap_socket, ssl_match_hostname, SSLCertificateError, _client_ssl_defaults, _server_ssl_defaults
          File "/var/tmp/.root_483e1e_salt/py2/tornado/netutil.py", line 56, in <module>
            import backports.ssl_match_hostname
        ImportError: No module named backports.ssl_match_hostname
    stdout:

What can I do?

Version: 2018.3.0

-1

I modified /usr/lib64/python2.7/site-packages/tornado/netutil.py and set ssl=None.

I added the line between the "start/end hotfix:"

try:
    import ssl
except ImportError:
    # ssl is not available on Google App Engine
    ssl = None

# start hotfix 
# https://serverfault.com/questions/911446/saltstack-importerror-no-module-named-backports-ssl-match-hostname/911447#911447
ssl=None
# end hotfix

You need to use salt-ssh -t -w once on the next time to recreate the python-files on the remote-host.

Same happens on salt version 2019.2.0.

Related issue: https://github.com/saltstack/salt/issues/52453

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.