Skip to content

Commit

Permalink
Fix(eos_designs): Better error message when missing 'evpn_multicast' …
Browse files Browse the repository at this point in the history
…for PIM l3 interfaces (aristanetworks#4391)
  • Loading branch information
gmuloc committed Aug 29, 2024
1 parent 581afa9 commit b282bc9
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ tenants:
enabled: true

expected_error_message: >-
'pim: enabled' set on l3_interface 'Ethernet1' on 'failure-missing-evpn-multicast-l3-with-pim' requires evpn_l3_multicast: enabled: true under VRF 'Tenant_A_OP_Zone_MC' or Tenant 'FABRIC'
'pim: enabled' set on l3_interface 'Ethernet1' on 'failure-missing-evpn-multicast-l3-with-pim'
requires 'evpn_l3_multicast.enabled: true' under VRF 'Tenant_A_OP_Zone_MC' or Tenant 'FABRIC'
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type: l3leaf
underlay_multicast: true
# When this is set to false, the VRF won't have evpn_l3_multicast enabled
# and PIM will fail
evpn_multicast: false

l3leaf:
defaults:
# LOOPBACK AND VTEP MANAGEMENT
loopback_ipv4_pool: 10.10.0.0/24
vtep_loopback_ipv4_pool: 10.11.0.0/24
vtep_loopback: Loopback1
nodes:
- name: failure-missing-evpn-multicast-with-pim
id: 3
bgp_as: 65101
filter:
tags: ['evpn-multicast-pegs']

tenants:
- name: FABRIC
mac_vrf_vni_base: 10000
evpn_l3_multicast:
enabled: true
evpn_underlay_l3_multicast_group_ipv4_pool: 232.0.0.0/20
vrfs:
- name: Tenant_A_OP_Zone_MC
description: "Tenant_A_OP_Zone"
vrf_vni: 10
vtep_diagnostic:
loopback: 31
loopback_ip_range: 10.255.1.0/24
svis:
- id: 210
name: Tenant_A_OP_Zone_1
tags: ['evpn-multicast-l3']
l3_interfaces:
- nodes: [ failure-missing-evpn-multicast-with-pim ]
interfaces: [ Ethernet1 ]
ip_addresses: [ 10.254.248.0/31 ]
descriptions: [ "L3 Link to RPs" ]
enabled: true
pim:
enabled: true

expected_error_message: >-
'pim: enabled' set on l3_interface 'Ethernet1' on 'failure-missing-evpn-multicast-with-pim'
requires 'evpn_multicast: true' at the fabric level
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ all:
failure-missing-evpn-vlan-bundle_svi:
failure-missing-evpn-multicast-l3-with-pim:
failure-missing-evpn-multicast-peg-rps:
failure-missing-evpn-multicast-with-pim:
failure-duplicate-evpn-vlan-bundle-name:
failure-no-local-path-group-in-default-policy:
ipv4-acl-in-missing-on-wan-interface:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,18 @@ def ethernet_interfaces(self: AvdStructuredConfigNetworkServices) -> list | None

if get(l3_interface, "pim.enabled"):
if not vrf.get("_evpn_l3_multicast_enabled"):
raise AristaAvdError(
f"'pim: enabled' set on l3_interface '{interface_name}' on '{self.shared_utils.hostname}' requires evpn_l3_multicast:"
f" enabled: true under VRF '{vrf['name']}' or Tenant '{tenant['name']}'"
)
# Possibly the key was not set because `evpn_multicast` is not set to `true`.
if not self.shared_utils.evpn_multicast:
msg = (
f"'pim: enabled' set on l3_interface '{interface_name}' on '{self.shared_utils.hostname}' requires "
"'evpn_multicast: true' at the fabric level"
)
else:
msg = (
f"'pim: enabled' set on l3_interface '{interface_name}' on '{self.shared_utils.hostname}' requires "
f"'evpn_l3_multicast.enabled: true' under VRF '{vrf['name']}' or Tenant '{tenant['name']}'"
)
raise AristaAvdError(msg)

if not vrf.get("_pim_rp_addresses"):
raise AristaAvdError(
Expand Down

0 comments on commit b282bc9

Please sign in to comment.