Skip to content

Fix for ANYCAST_RP_IP_RANGE on ND 3.1 for eBGP fabrics#672

Open
skaszlik wants to merge 9 commits intonetascode:developfrom
skaszlik:Fix_for_#393
Open

Fix for ANYCAST_RP_IP_RANGE on ND 3.1 for eBGP fabrics#672
skaszlik wants to merge 9 commits intonetascode:developfrom
skaszlik:Fix_for_#393

Conversation

@skaszlik
Copy link
Copy Markdown
Collaborator

@skaszlik skaszlik commented Nov 14, 2025

[ND3.1.x] [eBGP fabric] ANYCAST_RP_IP_RANGE is not deploying on NDFC

Related Issue(s)

Fixes #688

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

Test Notes

Cisco Nexus Dashboard Version

Checklist

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

[ND3.1.x] [eBGP fabric] ANYCAST_RP_IP_RANGE is not deploying on NDFC

https://wwwin-github.cisco.com/netascode/nac-vxlan/issues/393
@skaszlik skaszlik requested a review from mtarking November 14, 2025 13:59
@skaszlik skaszlik requested a review from a team as a code owner November 14, 2025 13:59
@skaszlik skaszlik marked this pull request as draft November 17, 2025 15:09
@juburnet juburnet changed the title Fix for #393 Fix for ANYCAST_RP_IP_RANGE on ND 3.1 for eBGP fabrics Nov 21, 2025
@skaszlik skaszlik marked this pull request as ready for review November 28, 2025 11:40
@skaszlik skaszlik added the ready for review PR Ready for Review label Dec 5, 2025
@juburnet juburnet added the bug Something isn't working label Jan 22, 2026
@juburnet juburnet requested a review from mkilar123 January 22, 2026 23:05
Copy link
Copy Markdown
Collaborator

@mkilar123 mkilar123 left a comment

Choose a reason for hiding this comment

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

seems fine

@juburnet juburnet requested a review from mikewiebe February 2, 2026 18:40
Copy link
Copy Markdown
Collaborator

@juburnet juburnet left a comment

Choose a reason for hiding this comment

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

🔍 Code Review Summary

Overall Assessment

This PR correctly fixes a critical bug where ANYCAST_RP_IP_RANGE was not being deployed on NDFC 3.1.x for eBGP fabrics with multicast replication mode. The fix relocates the conditional block to the proper location in the template hierarchy.

🟢 Positive Changes

  1. Correct Fix: Moves ANYCAST_RP_IP_RANGE to align with the same pattern used in dc_vxlan_fabric_resources.j2
  2. Proper Conditional Logic: Now correctly checks for:
    • NOT manual_underlay_allocation
    • NOT enable_ipv6_underlay
    • replication_mode == 'Multicast'
  3. Consistency: Matches the established pattern in the OSP/ISIS fabric templates

🟡 Areas for Improvement

  1. Missing Test Coverage: No automated tests to validate this template rendering scenario
  2. Documentation: The PR description lacks detail about the root cause and testing performed
  3. Trailing Whitespace: Lines 21 and 23 have trailing spaces that should be removed

🐛 Root Cause Analysis

Previous Bug: The ANYCAST_RP_IP_RANGE was nested inside a multicast-specific conditional block (lines 38-40 in old code) that was itself nested inside another IPv6 check. This caused it to be skipped when:

  • enable_ipv6_underlay = false (IPv4 underlay)
  • manual_underlay_allocation = false (auto allocation)
  • replication_mode = Multicast

Fix: Moves the setting to lines 21-23, which is:

  • Inside the NOT manual_underlay_allocation block
  • Inside the NOT enable_ipv6_underlay block
  • Directly after LOOPBACK1_IP_RANGE
  • Only conditionally rendered when replication_mode == 'Multicast'

This matches the exact pattern used in dc_vxlan_fabric_resources.j2 (lines 8-10).

📊 Review Status

  • Decision: APPROVE with minor suggestions
  • Critical Issues: 0
  • Warnings: 0
  • Suggestions: 2 (trailing whitespace, test coverage)
  • Code Quality: ✅ Good

🎯 Recommendations

  1. Remove trailing whitespace on lines 21 and 23
  2. Add test case to prevent regression (e.g., validate template rendering with multicast mode + auto allocation)
  3. Update PR description with root cause analysis and test evidence

✅ Verification

The change is minimal (3 lines moved), logic is sound, and aligns with established patterns. Safe to merge after addressing trailing whitespace.


Reviewed by: Claude Code (Sisyphus)
Review Date: 2026-02-02
Commit SHA: 93aa925

@juburnet
Copy link
Copy Markdown
Collaborator

juburnet commented Feb 2, 2026

@mtarking - I tested this before and after the fix for eBGP on ND 3.1.
The fix successfully sets the ANYCAST_RP_IP_RANGE condition with our fabric that meets the conditions:
enable_ipv6_underlay = false (IPv4 underlay)
manual_underlay_allocation = false (auto allocation)
replication_mode = Multicast

The conditions and placement in the jinja template function correctly.

Before it was failing to set the value and failing robot tests.
Before:
image

After:
image

@skaszlik
Copy link
Copy Markdown
Collaborator Author

Hi @mtarking ,

The current template (develop branch) include ENABLE_TRMv6 unconditionally under multicast. The fix wraps it with a version check (>= 12.2.2), since TRMv6 is only supported on NDFC 12.2.2+.

@juburnet juburnet self-requested a review February 12, 2026 16:17
Copy link
Copy Markdown
Collaborator

@juburnet juburnet left a comment

Choose a reason for hiding this comment

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

Approved. ANYCAST_RP_IP_RANGE wasn't being set for ND 3.1 in the previous location because it was under a version requirement "if" statement. Tested working

@mkilar123 mkilar123 self-requested a review March 10, 2026 15:09
Copy link
Copy Markdown
Collaborator

@mkilar123 mkilar123 left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready for review PR Ready for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ND3.1.x] [eBGP fabric] ANYCAST_RP_IP_RANGE is not deploying on NDFC

3 participants