If i start the proxy process with the command line "sudo salt-proxy --proxyid=r1 -l debug" everything works just fine. (test.ping and net.connect)
But, if i try to run it as a deamon with "-d" or as a service or as beacon, i go into a loop with this errors in the logs:
[2019-09-19 21:26:11,052 [salt.minion :1041][CRITICAL][32620] Unexpected error while connecting to localhost
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1018, in _connect_minion
yield minion.connect_master(failed=failed)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1216, in connect_master
yield self._post_master_init(master)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1069, in run
yielded = self.gen.send(value)
File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 3420, in _post_master_init
proxy_init_fn(self.opts)
File "/usr/lib/python2.7/dist-packages/salt/proxy/napalm.py", line 206, in init
NETWORK_DEVICE.update(salt.utils.napalm.get_device(opts))
File "/usr/lib/python2.7/dist-packages/salt/utils/napalm.py", line 340, in get_device
network_device.get('DRIVER').open()
File "/usr/local/lib/python2.7/dist-packages/napalm_ios/ios.py", line 140, in open
**self.netmiko_optional_args)
File "/usr/local/lib/python2.7/dist-packages/netmiko/ssh_dispatcher.py", line 246, in ConnectHandler
return ConnectionClass(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/netmiko/base_connection.py", line 317, in __init__
self._open()
File "/usr/local/lib/python2.7/dist-packages/netmiko/base_connection.py", line 322, in _open
self.establish_connection()
File "/usr/local/lib/python2.7/dist-packages/netmiko/base_connection.py", line 884, in establish_connection
self.remote_conn_pre.connect(**ssh_connect_params)
TypeError: connect() got an unexpected keyword argument 'passphrase'
2019-09-19 21:26:11,290 [/usr/lib/python2.7/dist-packages/salt/utils/napalm.pyc:239 ][ERROR ][32620] Cannot execute "get_facts" on [unspecified hostname] as . Reason: not connected!
2019-09-19 21:26:11,290 [/usr/lib/python2.7/dist-packages/salt/utils/napalm.pyc:240 ][ERROR ][32620] Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/utils/napalm.py", line 169, in call
raise Exception('not connected')
Exception: not connected](url)
master: localhost
multiprocessing: false
mine_enabled: true # not required, but nice to have
pki_dir: /etc/salt/pki/proxy # not required - this separates the proxy keys into a different directory
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: 1.12.3
cherrypy: Not Installed
dateutil: 2.6.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10.1
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: 3.8.2
pygit2: Not Installed
Python: 2.7.15+ (default, Jul 9 2019, 16:51:35)
python-gnupg: 0.4.1
PyYAML: 5.1.2
PyZMQ: 16.0.2
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.5
System Versions:
dist: LinuxMint 19.1 tessa
locale: UTF-8
machine: x86_64
release: 4.15.0-20-generic
system: Linux
version: LinuxMint 19.1 tessa
salt-minion --version
/usr/lib/python2.7/dist-packages/salt/scripts.py:198: DeprecationWarning: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. Salt will drop support for Python 2.7 in the Sodium release or later.
salt-minion 2019.2.0 (Fluorine)
Description of Issue
I've just installed salt and napalm, following the guidelines at: https://github.com/napalm-automation/napalm-salt https://docs.saltstack.com/en/latest/topics/network_automation/index.html https://mirceaulinic.net/2016-11-17-network-orchestration-with-salt-and-napalm/
If i start the proxy process with the command line "sudo salt-proxy --proxyid=r1 -l debug" everything works just fine. (test.ping and net.connect) But, if i try to run it as a deamon with "-d" or as a service or as beacon, i go into a loop with this errors in the logs:
Napalm seems to work fine:
Setup
top.sls
r1.sls
/etc/systemd/system/salt-proxy@.service
/etc/salt/proxy
/etc/salt/minion
master: localhost
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report
salt-proxy --version
salt-proxy 2019.2.0 (Fluorine)
salt --versions-report
salt-minion --version