ansible / ansible

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.
https://www.ansible.com/
GNU General Public License v3.0
62.72k stars 23.87k forks source link

onyx_linkagg module failed when using onyx version 3.6.6000 #38167

Closed samerd closed 6 years ago

samerd commented 6 years ago
ISSUE TYPE
COMPONENT NAME

onyx_linkagg.py

ANSIBLE VERSION
ansible 2.6.0 (devel 93fc99c576) last updated 2018/04/02 04:34:32 (GMT +000)
  config file = None
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
CONFIGURATION
OS / ENVIRONMENT

N/A

SUMMARY

An exception is thrown when creating an MLAG port using ansible module onyx_linkagg on Mellanox Switch running ONYX 3.6.6000.

STEPS TO REPRODUCE
- name: configure MLag port channel with server 1
  onyx_linkagg:
    name: Mpo1
    members:
      - Eth1/7
    mode: active
EXPECTED RESULTS

mlag will be configured

ACTUAL RESULTS

an exception was thrown

TASK [leaf1 : configure MLag port channel with server 1] *************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'list' object has no attribute 'get'
fatal: [leaf1]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_C2lxdf/ansible_module_onyx_linkagg.py\", line 338, in <module>\n main()\n File \"/tmp/ansible_C2lxdf/ansible_module_onyx_linkagg.py\", line 334, in main\n OnyxLinkAggModule.main()\n File \"/tmp/ansible_C2lxdf/ansible_modlib.zip/ansible/module_utils/network/onyx/onyx.py\", line 240, in main\n File \"/tmp/ansible_C2lxdf/ansible_modlib.zip/ansible/module_utils/network/onyx/onyx.py\", line 218, in run\n File \"/tmp/ansible_C2lxdf/ansible_module_onyx_linkagg.py\", line 248, in load_current_config\n self._parse_port_channels_summary(lag_type, lag_summary)\n File \"/tmp/ansible_C2lxdf/ansible_module_onyx_linkagg.py\", line 228, in _parse_port_channels_summary\n lag_summary = lag_summary.get('MLAG Port-Channel Summary', {})\nAttributeError: 'list' object has no attribute 'get'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
to retry, use: --limit @/etc/ansible/site.retry
ansibot commented 6 years ago

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help