arista.eos icon indicating copy to clipboard operation
arista.eos copied to clipboard

Potential Regression Preventing Arista EOS Connections

Open morgajel opened this issue 2 years ago • 1 comments

SUMMARY

Potential Regression Preventing Arista EOS Connections

ISSUE TYPE
  • Bug Report
COMPONENT NAME

on_open_shell() in TerminalModule of arista.eos

ANSIBLE VERSION
ansible [core 2.13.1]
  config file = None
  configured module search path = ['/home/jmorgan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/jmorgan/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/jmorgan/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/jmorgan/.local/bin/ansible
  python version = 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0]
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
# /home/jmorgan/.local/lib/python3.8/site-packages/ansible_collections
Collection Version
---------- -------
arista.eos 5.0.1

# /home/jmorgan/.ansible/collections/ansible_collections
Collection Version
---------- -------
arista.eos 5.0.0

CONFIGURATION
config dump command returned nothing.
OS / ENVIRONMENT

Linux 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

STEPS TO REPRODUCE

Minimal test case is fairly straightforward- inventory file is just setting ansible_user and ansible_password for a single arista switch

---
- hosts: all
  connection: network_cli
  gather_facts: no
  vars:
    ansible_network_os: eos
  tasks:
    - name: Gather info from Show Version
      arista.eos.eos_config:
        commands: 'show version'
      no_log: false

EXPECTED RESULTS

I'd expect it to successfully return the arista EOS version.

ACTUAL RESULTS

The command returns with a failure that the terminal parameters cannot be set. This appears to have originally surfaced back in 2018, but the fix doesn't appear in the main branch- not sure if it was intentionally removed or what: https://github.com/ansible/ansible/issues/45627

Full -vvvv output here: https://gist.github.com/morgajel/9eb21c3e612088eb8d22b437c8304905

ansible-playbook -i inventory.yml playbook.yml

PLAY [all] *************************************************************************************************************************************************

TASK [Gather info from Show Version] ***********************************************************************************************************************
[WARNING]: The "ansible_collections.ansible.netcommon.plugins.connection.network_cli" connection plugin has an improperly configured remote target value,
forcing "inventory_hostname" templated value instead of the string
fatal: [redacted.switch.name]: FAILED! => {"changed": false, "module_stderr": "unable to set terminal parameters", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"}

PLAY RECAP *************************************************************************************************************************************************
redacted.switch.name : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

morgajel avatar Jun 29 '22 20:06 morgajel

A colleague pointed out that this particular Arista is old enough that it does not support the width parameter- I'm not sure how crucial that is to the plugins functionality.

morgajel avatar Jun 30 '22 12:06 morgajel