Skip to content

Fix for Ingress replication is not allowed for border_gateway_spine #406

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

skaszlik
Copy link

@skaszlik skaszlik commented Jun 4, 2025

Checks if the combination of:
- border_gateway_spine role present,
- IPv6 underlay enabled,
- replication_mode set to 'ingress'
is present in the settings. If so, appends a descriptive error message to the results list

Related Issue(s)

Fixed #405
#405

Related Collection Role

  • cisco.nac_dc_vxlan.validate
  • cisco.nac_dc_vxlan.dtc.create
  • cisco.nac_dc_vxlan.dtc.deploy
  • cisco.nac_dc_vxlan.dtc.remove
  • other

Related Data Model Element

  • vxlan.fabric
  • vxlan.global
  • vxlan.topology
  • vxlan.underlay
  • vxlan.overlay
  • vxlan.overlay_extensions
  • vxlan.policy
  • vxlan.multisite
  • defaults.vxlan
  • other

Proposed Changes

The new rule '207_global_replication.py' verifies whether the following combination is present in the settings:

  • border_gateway_spine role is present,
  • IPv6 underlay is enabled,
  • replication_mode is set to 'ingress'.

If this combination is found, it appends an error message to the results list.

Test Notes

Cisco NDFC Version

12.2.2.241

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly
  • Assigned the proper reviewers

          - border_gateway_spine role present,
          - IPv6 underlay enabled,
          - replication_mode set to 'ingress'
        is present in the inventory.
        If so, appends a descriptive error message to the results list
@skaszlik skaszlik requested a review from a team as a code owner June 4, 2025 20:56
@juburnet juburnet requested review from mtarking and ccoueffe June 5, 2025 01:40
@juburnet juburnet added the bug Something isn't working label Jun 5, 2025
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix #406

switches = topology.get("switches")
if not switches:
return False
return any(switch.get("role") == "border_gateway_spine" for switch in switches)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the role list. The issue is also present with border_gateway.

The rule works as expected:

ERROR - Semantic error, rule 207: Verify fabric replication and spine roles. (['For vxlan.underlay.general.replication_mode to be set to ingress, vxlan.topology.switches.role must not be set to border_gateway_spine and vxlan.underlay.general.enable_ipv6_underlay must not be set to true.'])

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ccoueffe ,

I updated the check_role method to validate if a switch in the fabric is one of 'border_gateway_spine' or 'border_gateway' role.

Tested, works as expeted:

`
TASK [cisco.nac_dc_vxlan.validate : Perform Required Syntax and Semantic Model Validation] **************************************************************************************************************************************************************************************************************
Semantic error, rule 207: Verify fabric replication and spine roles. (['For vxlan.underlay.general.replication_mode to be set to ingress, vxlan.topology.switches.role must not be set to border_gateway_spine or border_gateway and vxlan.underlay.general.enable_ipv6_underlay must not be set to true.'])

fatal: [skaszlik-nac-fabric1 -> localhost]: FAILED! => {"changed": false, "data": {"vxlan": {"fabric": {"name": "skaszlik-nac-fabric1", "type": "VXLAN_EVPN"}, "global": {"anycast_gateway_mac": "12:34:56:78:91:00", "bgp_asn": "65013", "dns_servers": [{"ip_address": "10.0.0.2", "vrf": "management"}], "ntp_servers": [{"ip_address": "10.55.0.2", "vrf": "management"}], "route_reflectors": 4}, "topology": {"switches": [{"management": {"default_gateway_v4": "198.18.133.1", "management_ipv4_address": "198.18.133.21"}, "name": "netascode-spine1", "role": "border_gateway", "routing_loopback_id": 0, "serial_number": "99FYP2OV1NS", "vtep_loopback_id": 1}]}, "underlay": {"general": {"enable_ipv6_underlay": true, "replication_mode": "ingress", "routing_protocol": "ospf"}, "ipv6": {"enable_ipv6_link_local_address": false, "underlay_routing_loopback_ip_range": "fd00::2110:0/112", "underlay_rp_loopback_ip_range": "fd00::2254:0/112", "underlay_subnet_ip_range": "fd00::2000:0/112", "underlay_subnet_mask": 126, "underlay_vtep_loopback_ip_range": "fd00::2111:0/112"}}}}, "msg": "Semantic error, rule 207: Verify fabric replication and spine roles. (['For vxlan.underlay.general.replication_mode to be set to ingress, vxlan.topology.switches.role must not be set to border_gateway_spine or border_gateway and vxlan.underlay.general.enable_ipv6_underlay must not be set to true.'])\n"}`

@juburnet juburnet requested a review from mikewiebe June 24, 2025 12:26
@juburnet
Copy link
Collaborator

@mikewiebe another commit was done by @skaszlik and I approved the checks to run, and all checks passed.

@juburnet juburnet requested a review from ccoueffe June 27, 2025 14:42
@juburnet juburnet added the 0.4.3 Release 0.4.3 label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.4.3 Release 0.4.3 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ingress replication is not allowed for border_gateway_spine
3 participants