ansible-collections / cisco.nxos

Ansible Network Collection for Cisco NXOS
GNU General Public License v3.0
115 stars 109 forks source link

cisco.nxos.nxos_interfaces module fabric_forwarding_anycast_gateway: true does not work #887

Open Ernestas-S opened 3 weeks ago

Ernestas-S commented 3 weeks ago
SUMMARY

cisco.nxos.nxos_interfaces module is not configuring the following cli command at all: add fabric forwarding mode anycast gateway

Tested it on 6 different devices, with NX-OS, and then instead had to write our own cli to configure this command: `

    - name: Ensure "ip arp timeout" is configured # add fabric forwarding mode anycast gateway
      cisco.nxos.nxos_config:
        lines: "ip arp timeout 300"
        parents: "interface Vlan9999"
      with_subelements:
<redacted>
      loop_control:
        label: <redacted>

    - name: Ensure "fabric forwarding mode anycast-gateway" is configured
      cisco.nxos.nxos_config:
        lines: 
                - "fabric forwarding mode anycast-gateway"
                - "no shutdown"
        parents: "interface Vlan9999"
      with_subelements:
<redacted>
      loop_control:
        label: <redacted>

`

ISSUE TYPE
COMPONENT NAME

the awx-ee uses the following collection version: cisco.nxos:9.2.0

ANSIBLE VERSION
core 2.14.0.dev0
COLLECTION VERSION
cisco.nxos:9.2.0
CONFIGURATION
OS / ENVIRONMENT

The target device output: "ansible_net_python_version": "3.8.12", "ansible_net_system": "nxos",

STEPS TO REPRODUCE

By trying to run the following task

    - name: Task that does not work correctly
      cisco.nxos.nxos_interfaces:
        config:
        - name: "Vlan999"
          enabled: true
          description: <redacted>
          mtu: "9999"
          fabric_forwarding_anycast_gateway: true
      with_subelements:
<redacted>
      loop_control:
        label: <redacted>
EXPECTED RESULTS

I expect that the commands that were send to be executed are executed, as said they are true, however, when checking the nx-os device 'show running config' they are missing: changed: true commands:

ACTUAL RESULTS

The actual configuration is like this in the nx-os device 'show running config':

Ernestas-S commented 3 weeks ago

Update on this issue, I tested the task "Task that does not work correctly" based on quay.io/ansible/awx-ee:24.6.1 execution environment (Full code of EE I created is available here: https://github.com/Ernestas-S/create-custom-ee-for-awx). And was running this task on the same device and after each run, I would do rollback to backup config on the NX-OS device, using the cli command 'rollback running-config file backup'. and what I noticed, is it that 3 times in a row it applies 'fabric forwarding mode anycast-gateway' and then 3 launches after it would not apply it 'fabric forwarding mode anycast-gateway', example output from cli command 'show running-config': interface Vlan9999 description no shutdown mtu 9999 fabric forwarding mode anycast-gateway

and other 3 times: interface Vlan9999 description no shutdown mtu 9999