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

Fix(eos_designs): Better error message when missing 'evpn_multicast' for PIM l3 interfaces #4391

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ tenants:

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'
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 @@ -93,6 +93,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 @@ -134,10 +134,17 @@ def ethernet_interfaces(self: AvdStructuredConfigNetworkServices) -> list | None

if get(l3_interface, "pim.enabled"):
if not vrf.get("_evpn_l3_multicast_enabled"):
msg = (
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,
)
Expand Down
Loading