Fix for ANYCAST_RP_IP_RANGE on ND 3.1 for eBGP fabrics#672
Fix for ANYCAST_RP_IP_RANGE on ND 3.1 for eBGP fabrics#672skaszlik wants to merge 9 commits intonetascode:developfrom
Conversation
[ND3.1.x] [eBGP fabric] ANYCAST_RP_IP_RANGE is not deploying on NDFC https://wwwin-github.cisco.com/netascode/nac-vxlan/issues/393
juburnet
left a comment
There was a problem hiding this comment.
🔍 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
- Correct Fix: Moves
ANYCAST_RP_IP_RANGEto align with the same pattern used indc_vxlan_fabric_resources.j2 - Proper Conditional Logic: Now correctly checks for:
NOT manual_underlay_allocationNOT enable_ipv6_underlayreplication_mode == 'Multicast'
- Consistency: Matches the established pattern in the OSP/ISIS fabric templates
🟡 Areas for Improvement
- Missing Test Coverage: No automated tests to validate this template rendering scenario
- Documentation: The PR description lacks detail about the root cause and testing performed
- 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_allocationblock - Inside the
NOT enable_ipv6_underlayblock - 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
- Remove trailing whitespace on lines 21 and 23
- Add test case to prevent regression (e.g., validate template rendering with multicast mode + auto allocation)
- 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
|
@mtarking - I tested this before and after the fix for eBGP on ND 3.1. The conditions and placement in the jinja template function correctly. Before it was failing to set the value and failing robot tests. |
roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/evpn/ebgp_vxlan_fabric_evpn.j2
Outdated
Show resolved
Hide resolved
roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/evpn/ebgp_vxlan_fabric_evpn.j2
Outdated
Show resolved
Hide resolved
|
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+. |


[ND3.1.x] [eBGP fabric] ANYCAST_RP_IP_RANGE is not deploying on NDFC
Related Issue(s)
Fixes #688
Related Collection Role
Related Data Model Element
Proposed Changes
Test Notes
Cisco Nexus Dashboard Version
Checklist