nxos_interface issues #36751
Labels
affects_2.6
This issue/PR affects Ansible v2.6
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
Milestone
ISSUE TYPE
COMPONENT NAME
nxos_interface
ANSIBLE VERSION
OS / ENVIRONMENT
Ansible Server : Ubuntu 14.04
Device: N9K running 7.0(3)I5(2)
SUMMARY
There are few issues with nxos_interface. These are affecting 2.5 stable branch as well.
The offending line seems to be:
ansible/lib/ansible/modules/network/nxos/nxos_interface.py
Line 758 in f8a89f1
Since we do not need, name or aggregate for interface_type, this line should be modified to include interface_type as well
Setting mtu is failing. The reason is mtu is an l3 parameter and 'no switchport' command needs to be run first. Currently the code is adding 'no switchport' command after the 'mtu' command and this is causing the issue. The mode (switchport or no switchport) commands must be in the beginning before any other commands need to be run to resolve this.
speed is not idempotent. After setting the speed, the code is checking 'show interface ' command to get the existing parameters. This is not a very reliable command for configurations (it is used mainly for run time information). It is better to use 'show run int ' command to resolve this.
tx_rate, rx_rate, and neighbors are mainly for checking intent purposes, it looks like. But the documentation only gives this info for neighbors and for tx_rate and rx_rate, it is not clear if they are for checking intent or actually setting parameters. Please clarify.
Some parameters current state like speed, mtu, duplex etc. are checked on ethernet interfaces only. If they are only for certain type of interfaces, please enhance the doc to reflect this.
fabric_forwarding_anycast_gateway is not idempotent. The problem is coming from:
ansible/lib/ansible/modules/network/nxos/nxos_interface.py
Line 473 in f8a89f1
and
ansible/lib/ansible/modules/network/nxos/nxos_interface.py
Line 477 in f8a89f1
Basically the conditions check seems wrong, it should be that, if have is true and want is false and vice versa. Currently it is checking both as true vs true and false vs false which is incorrect.
The text was updated successfully, but these errors were encountered: