salt-ssh doesn't support python-tornado 5.0.2

Created on 5 Jul 2018  Â·  18Comments  Â·  Source: saltstack/salt

Description of Issue/Question

I am seeing this problem with Fedora 28 and python 2.7.15 locally, and Ubuntu 14.04 remotely with python 2.7.6. Both have python-certifi installed. I just started seeing this have upgrading to 2018.3.1 from 2018.3.0.

    ----------
    _error:
        Failed to return clean data
    retcode:
        0
    stderr:
        Traceback (most recent call last):
          File "/var/tmp/.ngrennan_e1f3ee_salt/salt-call", line 15, in <module>
            salt_call()
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/scripts.py", line 395, in salt_call
            import salt.cli.call
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/cli/call.py", line 8, in <module>
            import salt.cli.caller
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/cli/caller.py", line 18, in <module>
            import salt.loader
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/loader.py", line 28, in <module>
            import salt.utils.event
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/utils/event.py", line 70, in <module>
            import tornado.iostream
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/tornado/iostream.py", line 40, in <module>
            from tornado.netutil import ssl_wrap_socket, _client_ssl_defaults, _server_ssl_defaults
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/tornado/netutil.py", line 44, in <module>
            _client_ssl_defaults = ssl.create_default_context(
        AttributeError: 'module' object has no attribute 'create_default_context'

Downgrading from python2-tornado-5.0.2-2.fc28.x86_64 to python-tornado-4.2.1-4.fc28.x86_64(built from the fc24 src.rpm) fixes it.

Setup

Steps to Reproduce Issue

salt-ssh -i hostname

Versions Report

Salt Version:
           Salt: 2018.3.1

Dependency Versions:
           cffi: 1.11.5
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.6
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.15 (default, May 16 2018, 17:50:09)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 17.0.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 5.0.2
            ZMQ: 4.1.6

System Versions:
           dist: fedora 28 Twenty Eight
         locale: UTF-8
        machine: x86_64
        release: 4.17.3-200.fc28.x86_64
         system: Linux
        version: Fedora 28 Twenty Eight
Bug Salt-SSH severity-medium team-ssh

All 18 comments

can you share the versions-report for the ubuntu minion as well? im guessing this is occuring because ubuntu 14 is using a python version that does not include the attribute create_default_context

Found this report looking to resolve a pip warning i get when trying to run/test with developement branch.

tornado 5.0.2 which is incompatible

(salt) ✔ ~/git/salt [develop|…1] 
21:08 $ pip install -U azure-cli
...
...
salt 2018.3.2 has requirement tornado<5.0,>=4.2.1; python_version >= "3.4", but you'll have tornado 5.0.2 which is incompatible.

Searching in developement branch the requirement seem to be from
requirements/base.txt:6
or
salt.egg-info/requires.txt

FIX

find tornado versions available with
pip install tornado==

and pick version <5.0 e.g.

pip install tornado==4.5.3

yeah we do not want to completely move to tornado 5.0 until we know its stable. We did a bunch of work in the latest release to try to get it compatible but waiting till it stabilizes. We do recommend using <5.0 but definitely want to fix any issues that come to light.

Same issue here.

Technically we should be supporting tornado 5.0 on python2 installs, we only don't support tornado 5.0 on python3 installs.

@edgan This has been fixed with https://bodhi.fedoraproject.org/updates/FEDORA-2018-2ce9e3267a submission, recently. There was an oversight in building the packages but it applied to the Redhat family of packages. The Debian and Ubuntu packages should be fine. Can you provide a --versions-report on the Ubuntu 14.04 version of Salt in use, as the restriction used to exist with recent earlier versions of Salt, but was removed with the point release of Salt 2018.3.2

@dmurphy18 I am not using official fedora packages. I am taking the centos 7 src.rpm, adding patches, and building it myself. I will try experimenting, and see if it I can get it working.

I am still getting the same error, even with the official Fedora packages. I even made sure to clean out the local /var/tmp and the remote /var/tmp of salt cache files. Downgrading to python2-tornado-4.5.2-2.fc28.x86_64 fixed it.

    ----------
    _error:
        Failed to return clean data
    retcode:
        0
    stderr:
        Traceback (most recent call last):
          File "/var/tmp/.ngrennan_e1f3ee_salt/salt-call", line 15, in <module>
            salt_call()
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/scripts.py", line 395, in salt_call
            import salt.cli.call
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/cli/call.py", line 8, in <module>
            import salt.cli.caller
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/cli/caller.py", line 18, in <module>
            import salt.loader
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/loader.py", line 28, in <module>
            import salt.utils.event
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/salt/utils/event.py", line 70, in <module>
            import tornado.iostream
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/tornado/iostream.py", line 40, in <module>
            from tornado.netutil import ssl_wrap_socket, _client_ssl_defaults, _server_ssl_defaults
          File "/var/tmp/.ngrennan_e1f3ee_salt/py2/tornado/netutil.py", line 44, in <module>
            _client_ssl_defaults = ssl.create_default_context(
        AttributeError: 'module' object has no attribute 'create_default_context'

Local Fedora 28 x86_64:

rpm -qa | egrep -i 'salt|tornado' | sort
python2-tornado-5.0.2-2.fc28.x86_64
python3-saltpylint-2017.12.15-1.noarch
rubygem-salthiera-0.3.3-1.noarch
salt-2018.3.2-2.fc28.noarch
salt-minion-2018.3.2-2.fc28.noarch
salt-ssh-2018.3.2-2.fc28.noarch

[root@higgs tmp]$ rpm -V `rpm -qa | egrep -i 'salt|tornado' | sort`
[root@higgs tmp]$ 

Remote Ubuntu 14.04 Trusty amd64:

dpkg -l | egrep 'salt|tornado' | sort
ii  python-tornado                         4.2.1-1                                    amd64        scalable, non-blocking web server and tools
ii  salt-common                            2018.3.1+ds-1.21                           all          shared libraries that salt requires for all packages
ii  salt-minion                            2018.3.1+ds-1.21                           all          client package for salt, the distributed remote execution system

i am mostly looking for what version of python you are running on ubuntu minion?

python2.7-2.7.6-8ubuntu0.4

looks like i'm able to replicate this now :) the reason its occurring is create_default_context wasn't added until python 2.7.9, so not sure how we will tackle this in salt-ssh until able to dive into it.

This is still an issue.

Ran into this, too. Wanted to use Salt for a new infrastructure and found out that I could not use tornado 6.x that is the version which comes from my package repos. So I built 5.1.1 instead which works well with salt-ssh if Python 2.7 is used.

Tried to use Python 3.7 as 2.7 will soon be EOL, but it looks that there are still problems with 5.x (#51883). Just wanted to reference this here - and I guess I don't even have to ask for 6.x support for a while...

I just ran into this again with Fedora 30.

This has gotten worse on Fedora 31, because Fedora 31 wants to obsolete python2-tornado with the fedora-obsolete-packages package. Also their salt package would accept python2-tornado-5.0.2 that doesn't work for salt-ssh for the reasons in this issue.

Error: 
 Problem: package fedora-obsolete-packages-31-34.noarch obsoletes python2-tornado < 5.0.2-6 provided by python2-tornado-4.5.2-2.fc28.x86_64
  - package salt-2019.2.2-1.28.fc31.noarch requires python2-tornado >= 4.2.1, but none of the providers can be installed
  - package salt-2019.2.2-1.28.fc31.noarch requires python2-tornado < 6.0, but none of the providers can be installed
  - conflicting requests
  - problem with installed package salt-2019.2.2-1.28.fc31.noarch

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

Please re-open/keep open, thanks

Thank you for updating this issue. It is no longer marked as stale.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

udf2457 picture udf2457  Â·  3Comments

mooperd picture mooperd  Â·  3Comments

sfozz picture sfozz  Â·  3Comments

lhost picture lhost  Â·  3Comments

saurabhnemade picture saurabhnemade  Â·  3Comments