Closed zejdlikt closed 3 years ago
Hey zejdlikt,
I took a look at this issue today--I tried to reproduce your problem but couldn't.
I was able to run it with serial: 5
successfully:
What I did:
I noticed that in your environment you have three devices running KB.16.07.0003 and one device running KB.16.10.0009. Only firmware version 16.08 and later is supported officially, so I would recommend updating all your devices to a later firmware, and trying again.
So, to summarize here's what I suggest:
Let me know if the issue persists!
Cheers, Derek
Hello Derek,
thanks a lot for your effort.
1) so far i wasn't able to upgrade FW on mentioned 3 switches (currently running a longer running network test there) 2) what i tested already with no difference (no outputs):
What i have observed is, the output it not always completely empty - sometime by some (random) switches, the correct output is there - like 1st run - no output, 2nd run - no output, 3rd run - output from ARU-001, 4th run - no output, 5th run - output from ARU-004 etc....
It is worthwhile to mention that all those test were running over VPN - RTT around 100ms. So i have started suspecting whether it could be something related to networks /module-setup-ansible-paramiko/ related issues. I have moved this playbook to the local network (RTT around 0.3ms) and from local network i am able to get correct results every time i run the playbook. So it seems to be related to some timeout/latency, but so far no idea what could be tuned.
By any chance, could you check similar setup - running this playbook via some higher latency link - VPN?
BR, t.
Example output - running playbook several times over higher RTT link (last run, some output came from aru2):
I met the same problem using arubaoss_command : I used this module few times without issue. Then I wanted to use it with a network connection with more latency (ssh with remote forwarding port to a remote Ansible over the Internet) I face an issue : If I run a playbook on a unique host to do a "show run", sometime I get the expected output, sometime I get an empty output.
I found a workaround which is to add a wait_for instruction : tasks:
I found a workaround which is to add a wait_for instruction : tasks:
- name: execute show run arubaoss_command: commands: 'show run' wait_for: result[0] contains interface register: output It fixes the problem which exists with both arubaoss_command (HP) and aruba_command (community) modules. It could be it comes from the paramiko ssh client.
Hello, i agree, for some reason wait_for
help also in my case. It looks like some timeout appear in case of slower response...Thank @Catchestherust for a hint.
- hosts: all
vars:
ansible_connection: network_cli
ansible_python_interpreter: ./env/bin/python
gather_facts: False
tasks:
- name: Execute show run on the switchs
arubaoss_command:
commands: ['show vlan 1102']
wait_for: result[0] contains VLAN
output_file: "{{ inventory_hostname }}.jumbo"
I made some tests since I wrote my last comment. The problem I had before applying the workaround was that I got an answer around every 10 attempts. Since I applied the workaround, I get an answer at every try, but I get 2 identical answers around every 10 attempts. You can accommodate that (when possible) by keeping only one answer from the output of the command, but that's not what one could expect from a module. Better than nothing.
Hello Guys, My playbook doesn't run. no matter what i change doesn't accept the module. following is my playbook. can someone review the playbook and advise on if I am doing something wrong.
name: Get Aruba Switch Version hosts: aruba_switches gather_facts: no
vars: ansible_user: ------ ansible_password: ---- ansible_connection: network_cli
tasks:
name: Get switch version arubaoss_command: commands:
debug: msg: "{{ version_output.stdout[0] }}"
Hello, i am running simple playbook using
arubaoss_command
for 4 hosts (switches).playbook:
and
inventory:
when i run this playbook for one switch only, i got expected results. The same (correct) results i get when i configure
serial: 1
- so running tasks sequentially (serial_1_output.txt
). When i run it forall
switches, then no results are shown - no stdout output available (serial_5_output.txt
)Any idea what could be the issue?
Thank you
serial_1_output.txt serial_5_output.txt