Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-futures: Dependency missing on Debian 9 #50260

Closed
pkramme opened this issue Oct 26, 2018 · 5 comments
Closed

python-futures: Dependency missing on Debian 9 #50260

pkramme opened this issue Oct 26, 2018 · 5 comments

Comments

@pkramme
Copy link

pkramme commented Oct 26, 2018

Description of Issue/Question

I just updated my salt-master via salt '...' pkg.upgrade from version 2018.3.2 to 2018.3.3. After the update, all Salt commands issued from the master failed with "No module named concurrent" and journalctl reporting a python stacktrace (appended below). After some research, I installed the debian package python-futures. After a salt-master service restart, the master is working again. Is this a bug? Can this be fixed by adding the dependency to the salt packages?

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)
journalctl -xe | cut -d : -f 4 after update via salt '...' pkg.upgrade and systemctl restart salt-master.service

Traceback (most recent call last)
   File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 997, in _connect_minion
     yield minion.connect_master(failed=failed)
   File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1015, in run
     value = future.result()
   File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 237, in result
     raise_exc_info(self._exc_info)
   File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1021, in run
     yielded = self.gen.throw(*exc_info)
   File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1188, in connect_master
     master, self.pub_channel = yield self.eval_master(self.opts, self.timeout, self.safe, failed)
   File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1015, in run
     value = future.result()
   File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 237, in result
     raise_exc_info(self._exc_info)
   File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 285, in wrapper
     yielded = next(result)
   File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 697, in eval_master
     pub_channel = salt.transport.client.AsyncPubChannel.factory(self.opts, **factory_kwargs)
   File "/usr/lib/python2.7/dist-packages/salt/transport/client.py", line 161, in factory
     import salt.transport.zeromq
   File "/usr/lib/python2.7/dist-packages/salt/transport/zeromq.py", line 31, in <module>
     import salt.transport.mixins.auth
   File "/usr/lib/python2.7/dist-packages/salt/transport/mixins/auth.py", line 16, in <module>
     import salt.master
   File "/usr/lib/python2.7/dist-packages/salt/master.py", line 35, in <module>
     import salt.client.ssh.client
   File "/usr/lib/python2.7/dist-packages/salt/client/ssh/__init__.py", line 47, in <module>
     import salt.utils.thin
   File "/usr/lib/python2.7/dist-packages/salt/utils/thin.py", line 16, in <module>
     import concurrent
 ImportError
 [CRITICAL] Unexpected error while connecting to [REDACTED]
 Traceback (most recent call last)

Versions Report

Salt Version:
Salt: 2018.3.3

Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.5.3
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.13 (default, Sep 26 2018, 18:42:22)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.4.3
ZMQ: 4.2.1

System Versions:
dist: debian 9.5
locale: UTF-8
machine: x86_64
release: 4.9.0-8-amd64
system: Linux
version: debian 9.5

@pkramme pkramme changed the title python-futures: Dependency missing on debian 9 python-futures: Dependency missing on Debian 9 Oct 26, 2018
@ghost
Copy link

ghost commented Oct 28, 2018

This is also affecting me on Ubuntu 18.04. salt-master has been running fine since I initially set it up using version 2018.3.2+ds-1. The salt-master failed to start up during an apt dist-upgrade to version 2018.3.3+ds-1.

apt source:

deb [arch=amd64] http://repo.saltstack.com/apt/ubuntu/18.04/amd64/2018.3 bionic main

unhandled exception in the journal during startup:

Oct 28 13:57:09 arrietty systemd[1]: Starting The Salt Master Server...
Oct 28 13:57:09 arrietty salt-master[14075]: [ERROR   ] An un-handled exception was caught by salt's global exception handler:
Oct 28 13:57:09 arrietty salt-master[14075]: ImportError: No module named concurrent
Oct 28 13:57:09 arrietty salt-master[14075]: Traceback (most recent call last):
Oct 28 13:57:09 arrietty salt-master[14075]:   File "/usr/bin/salt-master", line 22, in <module>
Oct 28 13:57:09 arrietty salt-master[14075]:     salt_master()
Oct 28 13:57:09 arrietty salt-master[14075]:   File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 97, in salt_master
Oct 28 13:57:09 arrietty salt-master[14075]:     master.start()
Oct 28 13:57:09 arrietty salt-master[14075]:   File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 211, in start
Oct 28 13:57:09 arrietty salt-master[14075]:     super(Master, self).start()
Oct 28 13:57:09 arrietty salt-master[14075]:   File "/usr/lib/python2.7/dist-packages/salt/utils/parsers.py", line 1044, in start
Oct 28 13:57:09 arrietty salt-master[14075]:     self.prepare()
Oct 28 13:57:09 arrietty salt-master[14075]:   File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 191, in prepare
Oct 28 13:57:09 arrietty salt-master[14075]:     import salt.master
Oct 28 13:57:09 arrietty salt-master[14075]:   File "/usr/lib/python2.7/dist-packages/salt/master.py", line 35, in <module>
Oct 28 13:57:09 arrietty salt-master[14075]:     import salt.client.ssh.client
Oct 28 13:57:09 arrietty salt-master[14075]:   File "/usr/lib/python2.7/dist-packages/salt/client/ssh/__init__.py", line 47, in <module>
Oct 28 13:57:09 arrietty salt-master[14075]:     import salt.utils.thin
Oct 28 13:57:09 arrietty salt-master[14075]:   File "/usr/lib/python2.7/dist-packages/salt/utils/thin.py", line 16, in <module>
Oct 28 13:57:09 arrietty salt-master[14075]:     import concurrent
Oct 28 13:57:09 arrietty salt-master[14075]: ImportError: No module named concurrent

It is worth noting that I initially installed salt-master with apt install --no-install-recommends ... because I didn't want it to pull in a bunch of javascript dependencies and found it was pulled in by some Recommends. The current version in the repo only has Recommends: python-git, so I'm not sure what was in 2018.3.2+ds-1.

This looks related because attempting to manually install python-concurrent.futures to resolve the problem shows me it's going to install javascript-common libjs-jquery libjs-sphinxdoc libjs-underscore python-concurrent.futures.

@ghost
Copy link

ghost commented Oct 28, 2018

Swallowing my prideful opinions about javascript and manually installing python-concurrent.futures resolves the problem. It's a shame that the maintainers of python-concurrent.futures have a hard dependency on libjs-sphinxdoc.

@pkramme
Copy link
Author

pkramme commented Oct 28, 2018 via email

@ghost
Copy link

ghost commented Oct 29, 2018

the v2018.3.3 tag includes an import for concurrent:

salt/utils/thin.py:16:import concurrent

that the v2018.3.2 tag does not have. This comes from commit 70c6034.

While searching for imports of concurrent, I did find that there are quite a few uses of tornado.concurrent common to both tags. Here's a selection:

salt/transport/tcp.py:44:import tornado.concurrent
salt/transport/ipc.py:20:import tornado.concurrent
salt/transport/zeromq.py:49:import tornado.concurrent
salt/utils/async.py:9:import tornado.concurrent

I'm not familiar with either library, not sure how they are or are not related in terms of usage. Just doing some spelunking.

On Ubuntu 18.04, tornado.concurrent is provided by python-tornado, which has a Recommends to python-concurrent.futures.

@gtmanfred
Copy link
Contributor

This is being handled over here.

vmware-archive/salt-pack#593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants