netmiko proxy with always_alive does not work properly
@xeacott is already working on this.
Since Jan 23, 2020.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
Using netmiko proxy with always_alive flag set to true has the following issue:
Once the proxy connects to the device, and device closes the connection for whatever reason (idle timeout on the device or device rebooted etc), netmiko proxy does not check if the connection is active for further communications. It assumes the connection is always alive and sends the commands to the device, which causes exception. Only workaround is to restart the proxy.
Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
Steps to Reproduce Issue
- Use netmiko proxy (with always_alive set to true) and execute a command on the device.
- Go to the device and kill the user session (clear vty line in case of cisco)
- try to execute a command on device through netmiko proxy.
Versions Report
bash-4.4$ salt --versions-report
Salt Version:
Salt: 2019.2.2
Dependency Versions:
cffi: 1.12.3
cherrypy: unknown
dateutil: 2.7.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.9.6
libgit2: 0.27.7
libnacl: Not Installed
M2Crypto: 0.33.0
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.17
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.27.4
Python: 2.7.16 (default, May 6 2019, 19:35:26)
python-gnupg: 0.4.2
PyYAML: 5.1.1
PyZMQ: 16.0.3
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.6
System Versions:
dist:
locale: UTF-8
machine: x86_64
release: 3.10.0-957.5.1.el7.x86_64
system: Linux
version: Not Installed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.