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

Missing interfaces with dellos6_facts #28

Open
chucks0 opened this issue Mar 18, 2021 · 1 comment
Open

Missing interfaces with dellos6_facts #28

chucks0 opened this issue Mar 18, 2021 · 1 comment

Comments

@chucks0
Copy link

chucks0 commented Mar 18, 2021

SUMMARY

When using dellos6_facts to populate ansible_net_interfaces for a Dell N3048 switch stack, the results are inconsistent.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

dellos6_facts

ANSIBLE VERSION
ansible 2.10.7
  config file = /home/user/.ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/.local/lib/python3.8/site-packages/ansible
  executable location = /home/user/.local/bin/ansible
  python version = 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]
CONFIGURATION
DEFAULT_FORKS(/home/user/.ansible.cfg) = 10
DEFAULT_HOST_LIST(/home/user/.ansible.cfg) = ['/home/user/ansible/inventories']
HOST_KEY_CHECKING(/home/user/.ansible.cfg) = False
OS / ENVIRONMENT

Machine Description............... Dell EMC Networking Switch
System Model ID................... N3048EP-ON
Machine Type...................... Dell EMC Networking N3048EP-ON
Image File........................ N3000Advv6.6.3.33

STEPS TO REPRODUCE

Execute a playlist that gathers interface information using dellos6_facts module

---
- hosts: sw1
  connection: network_cli
  gather_facts: no
  become: yes
  become_method: enable

  tasks:
  - name: Gather Dell OS6 Device Facts
    dellos6_facts:
      gather_subset: interfaces

  - debug: var=ansible_net_interfaces

  - debug: var="{{ ansible_net_interfaces|length }}"
EXPECTED RESULTS

ansible_net_intefaces should be populated with the complete list of interfaces on the switch stack. The output should include all interfaces as well as the proper count of interfaces on the switch stack.

ACTUAL RESULTS

The results are inconsistent. With small switch stacks (1 or 2 switches), sometimes all interfaces are returned correctly but usually only vlan 1 is returned. With larger switch stacks, the full list is never returned and only vlan 1 is listed.

ok: [sw1] => {
    "ansible_net_interfaces": {
        "Vl1": [
            {
                "address": "10.1.1.1",
                "masklen": "255.0.0.0"
            }
        ]
    }
}
ok: [sw1] => {
    "1": "1"
}
@chucks0
Copy link
Author

chucks0 commented Mar 19, 2021

I did a little testing and it appears that self.responses[0] is an empty string in the populate function of the Interfaces class of os6_facts.py whenever things aren't working correctly. The issue appears to be with the output that is being returned from the 'show interfaces' command being large. If I modify 'show interfaces' to be 'show interfaces | include Interface' instead, the complete list is returned every time. Of course that breaks other things since the rest of the information can't be parsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant