rest_tornado does not start
I have made sure the ssl certs are in the right location. python-tornado is installed and I am using salt-2014.7.2-. When I add the following lines to the /etc/salt/master config and restart. I can not see anything say it's not starting. But the port is never up. The debugging logs show it has the configuration. But I don't see any errors or really anything saying it tried. I wasn't able to get much help from IRC. So, I'm hoping someone here can help, or at least show me how to enable more verbose debugging.
rest_tornado:
port: 8000
ssl_crt: /etc/pki/tls/certs/localhost.crt
ssl_key: /etc/pki/tls/certs/localhost.key
debug: True
disable_ssl: False
websockets: True
I think you need to also start the salt-api daemon in order to use salt's api. It reads its configuration from /etc/salt/master, but handles the network stuff separately from the master daemon.
Well, that helped. I at least have an error now. I've tried pip and yum, but can not find a concurrent module. Is this something I should have pulled in with the python-tornado rpm? Or am I possibly missing something from the salt package? Thanks for looking at this by the way.
Traceback (most recent call last):
File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
self.run()
File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python2.6/site-packages/salt/netapi/rest_tornado/__init__.py", line 36, in start
from . import saltnado
File "/usr/lib/python2.6/site-packages/salt/netapi/rest_tornado/saltnado.py", line 159, in <module>
from tornado.concurrent import Future
ImportError: No module named concurrent
[INFO ] Process <function start at 0x1705410> (28598) died with exit status None, restarting...
Forgive me lack of python knowledge, I'm more ops than dev. If it helps. These are the versions I'm working with.
[root@veruca cwyse]# rpm -q python-tornado
python-tornado-2.2.1-1.3.amzn1.noarch
[root@veruca cwyse]# rpm -q salt-api
salt-api-2014.7.2-1.el6.noarch
[root@veruca cwyse]# rpm -q salt
salt-2014.7.2-1.el6.noarch
Yes, that was at the bottom of my last comment. We have 2.2.1 installed.
I've tried this:
>>> import tornado.concurrent
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tornado.concurrent
>>>
with both python-tornado-2.2.1-8.el7.noarch from yum and tornado (4.1) from pip. The last time I used salt-api, I had similar problems with tornado and used cherrypy instead. I think @jacksontj has been maintaining the tornado code and may know what to do, or you can also look at the tornado salt-api tests:
https://github.com/saltstack/salt/tree/develop/tests/integration/netapi/rest_tornado
https://github.com/saltstack/salt/tree/develop/tests/unit/netapi/rest_tornado
Ah. tornado 4.1 fixed it. Thank you.
Glad you got it working.
#21003 will check for the tornado minimum version before loading-- so you'll get a much better error message. @Vehyla thanks for reporting! Let me know if you have any other questions with rest_tornado :)