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

NXOS Facts error #30529

Closed
rogerscuall opened this issue Sep 18, 2017 · 4 comments · Fixed by #31286
Closed

NXOS Facts error #30529

rogerscuall opened this issue Sep 18, 2017 · 4 comments · Fixed by #31286
Assignees
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bug This issue/PR relates to a bug. cisco Cisco technologies module This issue/PR relates to a module. networking Network category nxos Cisco NXOS community support:network This issue/PR relates to code supported by the Ansible Network Team.

Comments

@rogerscuall
Copy link

ISSUE TYPE
  • Bug Report
COMPONENT NAME

nxos_facts

ANSIBLE VERSION
ansible 2.3.1.0
  config file = /home/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  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

NXOS

SUMMARY

There is a parsing problem in line 352 of ansible_module_nxos_facts.py when parsing parse_ipv6_interfaces. In my case the output of show ipv6 interface is empty.

STEPS TO REPRODUCE

just run nxos_facts to gather all subsets.

- nxos_facts:
     gather_subset: all
EXPECTED RESULTS

To gather all facts from the box.

ACTUAL RESULTS
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: string indices must be integers, not str
fatal: [N9396-Leaf1]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_Lull7D/ansible_module_nxos_facts.py\", line 530, in <module>\n    main()\n  File \"/tmp/ansible_Lull7D/ansible_module_nxos_facts.py\", line 513, in main\n    inst.populate()\n  File \"/tmp/ansible_Lull7D/ansible_module_nxos_facts.py\", line 294, in populate\n    self.parse_ipv6_interfaces(data)\n  File \"/tmp/ansible_Lull7D/ansible_module_nxos_facts.py\", line 352, in parse_ipv6_interfaces\n    data = data['TABLE_intf']\nTypeError: string indices must be integers, not str\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
	to retry, use: --limit @/home/ansible/playbook.retry

@ansibot
Copy link
Contributor

ansibot commented Sep 18, 2017

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 bug_report module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category support:network This issue/PR relates to code supported by the Ansible Network Team. labels Sep 18, 2017
@trishnaguha
Copy link
Member

trishnaguha commented Sep 19, 2017

@rogerscuall this is fixed in 2.4 and devel. Closing the issue.
https://groups.google.com/forum/#!topic/ansible-project/A946L8Jlf_0

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Sep 19, 2017
@rogerscuall
Copy link
Author

Hi @trishnaguha, I don't think is solved just tested in version 2.4 exactly the same problem. This is very particular to this module.

@trishnaguha trishnaguha reopened this Sep 20, 2017
@rogerscuall
Copy link
Author

Looks to me the problem is that there is a check missing somewhere for when there is no IPv6 address configured on the system. Once I added an IPv6 address in one interface, I got no errors.

@trishnaguha trishnaguha self-assigned this Sep 22, 2017
trishnaguha added a commit to trishnaguha/ansible that referenced this issue Oct 4, 2017
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
trishnaguha added a commit that referenced this issue Oct 16, 2017
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@dagwieers dagwieers added nxos Cisco NXOS community cisco Cisco technologies labels Feb 22, 2019
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bug This issue/PR relates to a bug. cisco Cisco technologies module This issue/PR relates to a module. networking Network category nxos Cisco NXOS community support:network This issue/PR relates to code supported by the Ansible Network Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants