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

[BUG] netmiko proxy exception depending on version installed #62405

Closed
garethgreenaway opened this issue Aug 1, 2022 · 1 comment · Fixed by #62404
Closed

[BUG] netmiko proxy exception depending on version installed #62405

garethgreenaway opened this issue Aug 1, 2022 · 1 comment · Fixed by #62404
Assignees
Labels
Bug broken, incorrect, or confusing behavior Phosphorus v3005.0 Release code name and version Proxy-Minion

Comments

@garethgreenaway
Copy link
Contributor

Description
If a user attempts to use the Netmiko proxy minion with the version of Netmiko Python library higher than 3.4.0 then an exception is caused and the proxy minion is unable to load.

[DEBUG   ] Failed to import proxy netmiko_px:
Traceback (most recent call last):
  File "salt/loader/lazy.py", line 768, in _load_module
    mod = self.run(spec.loader.load_module)
  File "salt/loader/lazy.py", line 1228, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "salt/loader/lazy.py", line 1243, in _run_as
    return _func_or_method(*args, **kwargs)
  File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1029, in load_module
  File "<frozen importlib._bootstrap_external>", line 854, in load_module
  File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/saltstack/salt/run/salt/proxy/netmiko_px.py", line 195, in <module>
    from netmiko.ssh_exception import NetMikoTimeoutException
ModuleNotFoundError: No module named 'netmiko.ssh_exception'

Setup
1/ Install Netmiko version higher than 3.4.0
2. Setup the pillar files for a simple Netmiko proxy minion:

proxy:
  proxytype: netmiko
  device_type: linux
  host: 127.0.0.1
  username: saltdev
  password: 'saltdev'
  always_alive: False
  1. Start the Salt proxy minion using the above mentioned minion id.
@garethgreenaway garethgreenaway added Bug broken, incorrect, or confusing behavior needs-triage labels Aug 1, 2022
@garethgreenaway garethgreenaway self-assigned this Aug 1, 2022
@garethgreenaway garethgreenaway added this to the Phosphorus v3005.0 milestone Aug 1, 2022
@garethgreenaway garethgreenaway added the Phosphorus v3005.0 Release code name and version label Aug 1, 2022
@Ch3LL
Copy link
Contributor

Ch3LL commented Aug 4, 2022

Closed with #62412

@Ch3LL Ch3LL closed this as completed Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Phosphorus v3005.0 Release code name and version Proxy-Minion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants