Hi,
I've tried to setup the salt-api like desribed in the docs as a smart-proxy
to foreman.
Sofar, the SmartProxy is running and registered in foreman.
Now I try to import the salt states but I get an error 500
I've no clue what should be wrong or missing after hours of spending time
to the different setup doc of salt, salt-api and foreman-proxy
==> /var/log/salt/salt-api.log
Failed to setup thread-interrupt handler. This is usually not critical
[DEBUG ] Error while processing request for: /run
Traceback (most recent call last):
File
"/usr/local/lib/python2.7/dist-packages/saltapi/netapi/rest_cherrypy/app.py",
line 292, in hypermedia_handler
ret = cherrypy.serving.request._hypermedia_inner_handler(*args,
**kwargs)
File
"/usr/local/lib/python2.7/dist-packages/CherryPy-5.0.1-py2.7.egg/cherrypy/_cpdispatch.py",
line 60, in call
return self.callable(*self.args, **self.kwargs)
File
"/usr/local/lib/python2.7/dist-packages/saltapi/netapi/rest_cherrypy/app.py",
line 1106, in POST
'return': list(self.exec_lowstate()),
File
"/usr/local/lib/python2.7/dist-packages/saltapi/netapi/rest_cherrypy/app.py",
line 534, in exec_lowstate
ret = self.api.run(chunk)
File "/usr/local/lib/python2.7/dist-packages/saltapi/init.py", line
42, in run
ret = l_fun(*f_call.get('args', ()), **f_call.get('kwargs', {}))
File "/usr/local/lib/python2.7/dist-packages/saltapi/init.py", line
90, in runner
return runner.low(fun, kwargs)
File "/usr/lib/python2.7/dist-packages/salt/runner.py", line 135, in low
self._verify_fun(fun)
File "/usr/lib/python2.7/dist-packages/salt/runner.py", line 79, in
_verify_fun
raise salt.exceptions.CommandExecutionError(err)
CommandExecutionError: Function u'fileserver.envs' is unavailable
[INFO ] 192.168.77.90 - - [18/Feb/2016:16:25:59] "POST /run HTTP/1.1"
500 57 "" "Ruby"
==> /var/log/foreman-proxy/proxy.log <==
E, [2016-02-18T16:25:59.496302 #25977] ERROR – : Failed to list
environments: Failed to query Salt API (500): {"status": 500, "return": "An
unexpected error occurred"}
==> /etc/salt/master
external_auth:
pam:
saltuser:
- '@runner'
rest_cherrypy:
port: 9191
host: 0.0.0.0
ssl_key: /var/lib/puppet/ssl/private_keys/vmg-utf-foreman-000.pem
ssl_crt: /var/lib/puppet/ssl/certs/vmg-utf-foreman-000.pem
SSL_ Files exists
User saltuser exists (do it need a special linux group?)
==> /etc/foreman-proxy/settings.d/salt.yml
:enabled: https
:autosign_file: /etc/salt/autosign.conf
:salt_command_user: root
Some features require using the Salt API - such as listing environments
and retrieving state info
:use_api: true
:api_url: https://vmg-utf-salt-master.to3.zone.loc:9191
:api_auth: pam
:api_username: saltuser
:api_password: saltpasswd
Would be nice if anyone can give me a hint or a kick to the right path
– Tom