Closed twomassz closed 3 months ago
Summary:
Fixed by interfaces, vlans - Fix exception when gathering facts
Details: This problem was caused by a combination of the following factors:
The bug in the enterprise_sonic handling of fetched interface configuration described above was fixed by the following PR:
interfaces, vlans - Fix exception when gathering facts
This PR was merged into the enterprise_sonic Ansible resource module collection on May 6, 2024, and will be included in the upcoming 2.5.0 release. The submitter verified that, with the fix in place (via installation of the latest pre-release version as described in "https://github.com/ansible-collections/dellemc.enterprise_sonic/wiki/Installation-of-the-latest-pre-release-version"). the problem does not occur.
Bug Description
when running the following playbook:
The following errors are returned:
TASK [Create Interfaces] **** task path: /etc/ansible/test.yaml:8 redirecting (type: connection) ansible.builtin.httpapi to ansible.netcommon.httpapi redirecting (type: action) dellemc.enterprise_sonic.sonic_interfaces to dellemc.enterprise_sonic.sonic redirecting (type: action) dellemc.enterprise_sonic.sonic_interfaces to dellemc.enterprise_sonic.sonic The full traceback is: File "/home/ansible/.ansible/collections/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/facts/facts.py", line 128, in get_network_resources_facts inst.populate_facts(self._connection, self.ansible_facts, data) File "/home/ansible/.ansible/collections/ansible_collections/dellemc/enterprise_sonic/plugins/module_utils/network/sonic/facts/interfaces/interfaces.py", line 87, in populate_facts obj = self.transform_config(obj) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ansible/.ansible/collections/ansible_collections/dellemc/enterprise_sonic/plugins/module_utils/network/sonic/facts/interfaces/interfaces.py", line 117, in transform_config exist_cfg = conf['config']