Open benfiedler opened 3 years ago
same issue here, but works fine if I downgrade salt proxy, and leave master at 3002. from: py37-salt-3002.2_1 to: py37-salt-2019-2019.2.5_1
no sproxy here, just straight salt.
master is at 3002 saltminionhost-01:$ pkg info -x salt py37-salt-2019-2019.2.5_1
saltmaster-01:# salt junos_srx napalm.netmiko_multi_call "{'name': 'send_command', 'kwargs': {'command_string': 'show version'}}" junos_srx:
upgrade minionhost to latest salt:
saltminionhost-01:# pkg info -x salt py37-salt-3002.2_1
saltmaster-01:# salt junos_srx napalm.netmiko_multi_call "{'name': 'send_command', 'kwargs': {'command_string': 'show version'}}" junos_srx: The minion function caused an exception: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/salt/metaproxy/proxy.py", line 477, in thread_return opts, data, func, args, kwargs File "/usr/local/lib/python3.7/site-packages/salt/executors/direct_call.py", line 12, in execute return func(*args, kwargs) File "/usr/local/lib/python3.7/site-packages/salt/utils/napalm.py", line 508, in func_wrapper ret = func(*args, *kwargs) File "/usr/local/lib/python3.7/site-packages/salt/modules/napalm_mod.py", line 576, in netmiko_multi_call return salt["netmiko.multi_call"](methods, kwargs) File "/usr/local/lib/python3.7/site-packages/salt/loader.py", line 1283, in getitem func = super().getitem(item) File "/usr/local/lib/python3.7/site-packages/salt/utils/lazy.py", line 110, in getitem return self._dict[key] KeyError: 'netmiko.multi_call' ERROR: Minions returned with non-zero exit code saltmaster-01:#
pillar data does not change, proxy is started with: /usr/local/bin/python3.7 /usr/local/bin/salt-proxy --proxyid junos_srx -c /usr/local/etc/salt -d
I'm not using sproxy, regular salt which is broken [which in turn breaks sproxy also?].
I'm not using sproxy, regular salt which is broken [which in turn breaks sproxy also?].
That seems plausible; I only very recently started using proxies and salt-sproxy seems to relieve a lot of headache regarding proxy+port management so I jumped straight into using it.
Napalm is another module that seems to implement the netmiko multicall function in very different manner than netmiko module
¯\_( ͡° ͜ʖ ͡°)\/¯
I think we need someone more familiar with salt modules to take a look.
Description Invoking netmiko.multi_call and providing a dictionary with keys 'name', 'args' and/or 'kwargs' results in a python error
Setup Pillar: somehost1.sls
Steps to Reproduce the behavior
salt-sproxy 'somehost1' netmiko.multi_call "{'name': 'send_command', 'kwargs': {'command_string': 'echo part one'}}" "{'name': 'send_command', 'kwargs': {'command_string':'echo part two'}}"
You get
And alternatively if you use args and kwargs is not specified within the dictionary:
Expected behavior Should receive a list of output of each command similar to we get if running
salt-sproxy 'somehost1' netmiko.call method="send_command" command_string="echo part one"
Versions Report
I have tested a very simple patch successfully in the same environment as above. The patch does:
__proxy__
method if available (in the same fashion that netmiko.call operates)I could use some help in writing a test procedure however, my dev experience is minimal..