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_interface issues #36751

Closed
saichint opened this issue Feb 26, 2018 · 3 comments · Fixed by #36827
Closed

nxos_interface issues #36751

saichint opened this issue Feb 26, 2018 · 3 comments · Fixed by #36827
Assignees
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.
Milestone

Comments

@saichint
Copy link
Contributor

saichint commented Feb 26, 2018

ISSUE TYPE
  • Bug Report
COMPONENT NAME

nxos_interface

ANSIBLE VERSION
ansible 2.6.0 (devel fed20b825f) last updated 2018/02/15 12:51:12 (GMT -400)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /root/agents-ci/ansible/lib/ansible
  executable location = /root/agents-ci/ansible/bin/ansible
  python version = 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]
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.

  1. interface_type -- this is used to unconfigure 'loopback', 'portchannel' etc. types. So the playbook only needs the type of interface. However, it is failing because playbook has no name or aggregate.
    The offending line seems to be:
    required_one_of = [['name', 'aggregate']]

Since we do not need, name or aggregate for interface_type, this line should be modified to include interface_type as well

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. fabric_forwarding_anycast_gateway is not idempotent. The problem is coming from:

    if (fabric_forwarding_anycast_gateway is True and

    and
    elif (fabric_forwarding_anycast_gateway is False and

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.

@ansibot
Copy link
Contributor

ansibot commented Feb 26, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Feb 26, 2018

@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 bug_report module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category nxos Cisco NXOS community support:network This issue/PR relates to code supported by the Ansible Network Team. labels Feb 26, 2018
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Feb 27, 2018
@trishnaguha trishnaguha added this to the 2.5.0 milestone Feb 28, 2018
@trishnaguha
Copy link
Member

@saichint Thanks for the bug report. Please try this PR #36827 and let us know.

@trishnaguha trishnaguha moved this from In progress to In Review in zzz NOT USED: Networking Bugs Feb 28, 2018
@trishnaguha trishnaguha moved this from In Review to Done in zzz NOT USED: Networking Bugs Mar 1, 2018
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 8, 2018
@dagwieers dagwieers added the cisco Cisco technologies label Feb 23, 2019
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants