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

ios_bgp - Not idempotent when using networks on classful boundaries #59083

Closed
jvanderaa opened this issue Jul 15, 2019 · 3 comments · Fixed by #63055
Closed

ios_bgp - Not idempotent when using networks on classful boundaries #59083

jvanderaa opened this issue Jul 15, 2019 · 3 comments · Fixed by #63055

Comments

@jvanderaa
Copy link
Contributor

@jvanderaa jvanderaa commented Jul 15, 2019

SUMMARY

When using a classful network boundary for a network, the router will not show "mask x.x.x.x" in the configuration. Thus the module will think a configuration change is needed, not fully idempotent.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ios_bgp

ANSIBLE VERSION
ansible 2.8.1
  config file = /Users/joshv/Github/ansible-using_ios/ansible.cfg
  configured module search path = ['/etc/ansible/library']
  ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.2 (default, Feb 10 2019, 15:44:18) [Clang 10.0.0 (clang-1000.11.45.5)]
CONFIGURATION
DEFAULT_GATHERING(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = explicit
DEFAULT_HOST_LIST(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = ['/Users/joshv/Github/ansible-using_ios/hosts']
DEFAULT_MODULE_PATH(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = ['/etc/ansible/library']
HOST_KEY_CHECKING(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = False
INTERPRETER_PYTHON(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = /usr/local/bin/python3
RETRY_FILES_ENABLED(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = False
OS / ENVIRONMENT

MacOS -> Cisco IOS

STEPS TO REPRODUCE

Advertise networks 198.51.100.0/24
networks:
- prefix: 198.51.100.0
masklen: 24

    - name: "TASK 1: Setup iBGP Peer"
      ios_bgp:
        config:
          bgp_as: 65500
          router_id: 10.0.0.3
          log_neighbor_changes: true
          neighbors:
            - neighbor: 198.51.100.2
              remote_as: 65500
              activate: true
              timers:
                keepalive: 15
                holdtime: 45
                min_neighbor_holdtime: 5
              description: R4
          networks:
            - prefix: 198.51.100.0
              masklen: 24
            - prefix: 203.0.113.0
              masklen: 24
          address_family:
            - afi: ipv4
              safi: unicast
              neighbors:
                - neighbor: 198.51.100.2
                  activate: yes
                  next_hop_self: yes
        operation: merge
      register: ibgp_peer1
EXPECTED RESULTS

I'd expect that the second run would be idempotent and not change. I'm getting a changed message instead of OK.

ACTUAL RESULTS

The module attempted to push

            "commands": [
                "router bgp 65500",
                "network 198.51.100.0 mask 255.255.255.0",
                "address-family ipv4",
                "no auto-summary",
                "exit-address-family",
                "exit"
            ],
            "failed": false

I'm thinking of how to take a stab at this in the coming weeks if it isn't already a quick easy fix. Small low priority issue...

@ansibot

This comment has been minimized.

Copy link
Contributor

@ansibot ansibot commented Jul 15, 2019

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

This comment has been minimized.

Copy link
Contributor

@ansibot ansibot commented Jul 15, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

@ansibot ansibot commented Jul 15, 2019

@jvanderaa, just so you are aware we have a dedicated Working Group for network.
You can find other people interested in this in #ansible-network on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@pabelanger pabelanger assigned justjais and NilashishC and unassigned justjais Jul 17, 2019
@Qalthos Qalthos removed the needs_triage label Sep 4, 2019
GomathiselviS pushed a commit to GomathiselviS/ansible that referenced this issue Oct 2, 2019
@ansibot ansibot added the has_pr label Oct 4, 2019
Qalthos added a commit that referenced this issue Oct 4, 2019
* Fix for the bug 59083

* Bug fix #59083 - corrected linting errors
emschu pushed a commit to emschu/ansible that referenced this issue Oct 16, 2019
* Fix for the bug 59083

* Bug fix ansible#59083 - corrected linting errors
@ansible ansible locked and limited conversation to collaborators Nov 13, 2019
anshulbehl added a commit to anshulbehl/ansible that referenced this issue Dec 10, 2019
* Fix for the bug 59083

* Bug fix ansible#59083 - corrected linting errors
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants
You can’t perform that action at this time.