From 58b8c43170592aa1810cd383ab73ede17a3fc1ed Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Date: Tue, 17 Sep 2024 00:24:26 -0700 Subject: [PATCH 1/7] issue-164: uncommented if condition --- .../configs/IGMP-QUERIER-L3LEAF1A.cfg | 5 ---- .../IGMP-QUERIER-L3LEAF1A.yml | 5 ---- .../network_services/ip_igmp_snooping.py | 23 +++++++++---------- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/IGMP-QUERIER-L3LEAF1A.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/IGMP-QUERIER-L3LEAF1A.cfg index 49733b22b6f..296ca058e84 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/IGMP-QUERIER-L3LEAF1A.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/IGMP-QUERIER-L3LEAF1A.cfg @@ -17,7 +17,6 @@ ip igmp snooping vlan 2 querier ip igmp snooping vlan 2 querier address 192.168.255.1 ip igmp snooping vlan 2 querier version 3 no ip igmp snooping vlan 3 querier -ip igmp snooping vlan 3 querier address 192.168.255.1 ip igmp snooping vlan 11 querier ip igmp snooping vlan 11 querier address 1.1.1.1 ip igmp snooping vlan 11 querier version 3 @@ -38,7 +37,6 @@ ip igmp snooping vlan 102 querier ip igmp snooping vlan 102 querier address 192.168.255.1 ip igmp snooping vlan 102 querier version 3 no ip igmp snooping vlan 103 querier -ip igmp snooping vlan 103 querier address 192.168.255.1 ip igmp snooping vlan 111 querier ip igmp snooping vlan 111 querier address 1.1.1.1 ip igmp snooping vlan 111 querier version 3 @@ -46,15 +44,12 @@ ip igmp snooping vlan 112 querier ip igmp snooping vlan 112 querier address 1.1.1.1 ip igmp snooping vlan 112 querier version 2 no ip igmp snooping vlan 113 querier -ip igmp snooping vlan 113 querier address 1.1.1.1 -ip igmp snooping vlan 113 querier version 3 ip igmp snooping vlan 121 querier ip igmp snooping vlan 121 querier address 2.2.2.2 ip igmp snooping vlan 121 querier version 1 ip igmp snooping vlan 122 querier ip igmp snooping vlan 122 querier address 192.168.255.1 no ip igmp snooping vlan 123 querier -ip igmp snooping vlan 123 querier address 192.168.255.1 ! transceiver qsfp default-mode 4x10G ! diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/IGMP-QUERIER-L3LEAF1A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/IGMP-QUERIER-L3LEAF1A.yml index 758ed99fc76..9bf880d1955 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/IGMP-QUERIER-L3LEAF1A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/IGMP-QUERIER-L3LEAF1A.yml @@ -373,7 +373,6 @@ ip_igmp_snooping: - id: 3 querier: enabled: false - address: 192.168.255.1 - id: 101 querier: enabled: true @@ -386,7 +385,6 @@ ip_igmp_snooping: - id: 103 querier: enabled: false - address: 192.168.255.1 - id: 11 querier: enabled: true @@ -410,8 +408,6 @@ ip_igmp_snooping: - id: 113 querier: enabled: false - address: 1.1.1.1 - version: 3 - id: 21 querier: enabled: true @@ -438,7 +434,6 @@ ip_igmp_snooping: - id: 123 querier: enabled: false - address: 192.168.255.1 ip_virtual_router_mac_address: 00:dc:00:00:00:0a vlan_interfaces: - name: Vlan1 diff --git a/python-avd/pyavd/_eos_designs/structured_config/network_services/ip_igmp_snooping.py b/python-avd/pyavd/_eos_designs/structured_config/network_services/ip_igmp_snooping.py index adf8b8eec0d..a0aaa6c3465 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/network_services/ip_igmp_snooping.py +++ b/python-avd/pyavd/_eos_designs/structured_config/network_services/ip_igmp_snooping.py @@ -100,18 +100,17 @@ def _ip_igmp_snooping_vlan(self: AvdStructuredConfigNetworkServices, vlan: dict, if igmp_snooping_querier_enabled is not None: ip_igmp_snooping_vlan["querier"] = {"enabled": igmp_snooping_querier_enabled} - # TODO: The if below should be uncommented when we have settled the behavioral change - # if svi_igmp_snooping_querier_enabled is True: - address = default(igmp_snooping_querier.get("source_address"), tenant_igmp_snooping_querier.get("source_address"), self.shared_utils.router_id) - if address is not None: - ip_igmp_snooping_vlan["querier"]["address"] = address - - version = default( - igmp_snooping_querier.get("version"), - tenant_igmp_snooping_querier.get("version"), - ) - if version is not None: - ip_igmp_snooping_vlan["querier"]["version"] = version + if igmp_snooping_querier_enabled is True: + address = default(igmp_snooping_querier.get("source_address"), tenant_igmp_snooping_querier.get("source_address"), self.shared_utils.router_id) + if address is not None: + ip_igmp_snooping_vlan["querier"]["address"] = address + + version = default( + igmp_snooping_querier.get("version"), + tenant_igmp_snooping_querier.get("version"), + ) + if version is not None: + ip_igmp_snooping_vlan["querier"]["version"] = version # IGMP snooping fast-leave feature is enabled only when evpn_l2_multicast is enabled if evpn_l2_multicast_enabled is True: From 2bfbe970b69383aaa84190db1ce3eb902d51be7b Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Date: Tue, 17 Sep 2024 01:56:44 -0700 Subject: [PATCH 2/7] issue-164: updated negative unit tests --- .../host_vars/duplicate-vrfs-tenant-igmp-snooping-conflict.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/duplicate-vrfs-tenant-igmp-snooping-conflict.yml b/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/duplicate-vrfs-tenant-igmp-snooping-conflict.yml index 2371d2b1218..472a6c97283 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/duplicate-vrfs-tenant-igmp-snooping-conflict.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/duplicate-vrfs-tenant-igmp-snooping-conflict.yml @@ -50,4 +50,4 @@ tenants: expected_error_message: >- Found duplicate objects with conflicting data while generating configuration for IGMP snooping for SVIs in VRF 'VRF1'. {'id': 100, 'querier': {'enabled': True, 'address': '192.168.255.101'}} conflicts with {'id': 100, 'querier': - {'enabled': False, 'address': '192.168.255.101'}}. + {'enabled': False}}. From aa8e2cdece62f380898eba2a0670332ce4e7c7c4 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Date: Wed, 18 Sep 2024 03:51:09 -0700 Subject: [PATCH 3/7] updated porting guide --- .../arista/avd/docs/porting-guides/5.x.x.md | 16 ++++++++++++++++ .../arista/avd/docs/release-notes/5.x.x.md | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md index c82ba9a0a6b..2fb3e76f24e 100644 --- a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md +++ b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md @@ -442,6 +442,22 @@ To retain the previous behaviour, set the value to `false`: +shutdown_interfaces_towards_undeployed_peers: false ``` +### Render `ip igmp snooping vlan` command for version and address only when IGMP snooping querier is enabled + +In AVD 4.0.0, the `ip igmp snooping vlan` command for version and address was rendered even when the IGMP snooping querier was not enabled. +Starting from AVD 5.0.0, the `ip igmp snooping vlan` command for version and address is rendered only when the IGMP snooping querier is enabled. + +To retain the old configuration use custom structure configuration. +```diff +custom_structured_configuration_ip_igmp_snooping: + vlans: + - id: 1 + querier: + enabled: false + address: 192.168.255.1 + version: 3 +``` + ### Default MTU value changed from `9214` to `9194` for Dps1, WAN HA and WAN p2p uplink interfaces In AVD 4.0.0, the default MTU for Dps1, WAN HA and WAN p2p uplink interfaces was `9214`. diff --git a/ansible_collections/arista/avd/docs/release-notes/5.x.x.md b/ansible_collections/arista/avd/docs/release-notes/5.x.x.md index 3716166b920..6b8f95aef7c 100644 --- a/ansible_collections/arista/avd/docs/release-notes/5.x.x.md +++ b/ansible_collections/arista/avd/docs/release-notes/5.x.x.md @@ -156,6 +156,12 @@ Starting AVD 5.0.0, the default MTU for Dps1, WAN HA and WAN p2p uplink interfac See the [porting guide](../porting-guides/5.x.x.md#default-mtu-value-changed-from-9214-to-9194-for-dps1-wan-ha-and-wan-p2p-uplink-interfaces) for details. +#### Render `ip igmp snooping vlan` command for version and address only when IGMP snooping querier is enabled + +Starting from AVD 5.0.0, the `ip igmp snooping vlan` command for version and address is rendered only when the IGMP snooping querier is enabled. + +See the [porting guide](../porting-guides/5.x.x.md#render-ip-igmp-snooping-vlan-command-for-version-and-address-only-when-igmp-snooping-querier-is-enabled) for details. + #### ipv6_virtual_router_addresses are now configured if ipv6_enable is true on SVIs For SVIs with `ipv6_virtual_router_addresses` set, AVD versions below 5.0.0 only rendered the configuration if `ipv6_address` From eef200169e5fc282dee8798792af2b5115fa5aff Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:53:46 +0000 Subject: [PATCH 4/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ansible_collections/arista/avd/docs/porting-guides/5.x.x.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md index 2fb3e76f24e..4035bc74a09 100644 --- a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md +++ b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md @@ -448,6 +448,7 @@ In AVD 4.0.0, the `ip igmp snooping vlan` command for version and address was re Starting from AVD 5.0.0, the `ip igmp snooping vlan` command for version and address is rendered only when the IGMP snooping querier is enabled. To retain the old configuration use custom structure configuration. + ```diff custom_structured_configuration_ip_igmp_snooping: vlans: From 861ce4a180f916d9035defdb19147467028fad8a Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Date: Wed, 18 Sep 2024 06:01:38 -0700 Subject: [PATCH 5/7] updated porting guide --- ansible_collections/arista/avd/docs/porting-guides/5.x.x.md | 5 ++--- ansible_collections/arista/avd/docs/release-notes/5.x.x.md | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md index 4035bc74a09..d279663020a 100644 --- a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md +++ b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md @@ -442,13 +442,12 @@ To retain the previous behaviour, set the value to `false`: +shutdown_interfaces_towards_undeployed_peers: false ``` -### Render `ip igmp snooping vlan` command for version and address only when IGMP snooping querier is enabled +### Only render IGMP snooping querier version and address when enabled In AVD 4.0.0, the `ip igmp snooping vlan` command for version and address was rendered even when the IGMP snooping querier was not enabled. Starting from AVD 5.0.0, the `ip igmp snooping vlan` command for version and address is rendered only when the IGMP snooping querier is enabled. -To retain the old configuration use custom structure configuration. - +To retain the old configuration use custom structured configuration. ```diff custom_structured_configuration_ip_igmp_snooping: vlans: diff --git a/ansible_collections/arista/avd/docs/release-notes/5.x.x.md b/ansible_collections/arista/avd/docs/release-notes/5.x.x.md index 6b8f95aef7c..411d03baeeb 100644 --- a/ansible_collections/arista/avd/docs/release-notes/5.x.x.md +++ b/ansible_collections/arista/avd/docs/release-notes/5.x.x.md @@ -156,11 +156,11 @@ Starting AVD 5.0.0, the default MTU for Dps1, WAN HA and WAN p2p uplink interfac See the [porting guide](../porting-guides/5.x.x.md#default-mtu-value-changed-from-9214-to-9194-for-dps1-wan-ha-and-wan-p2p-uplink-interfaces) for details. -#### Render `ip igmp snooping vlan` command for version and address only when IGMP snooping querier is enabled +#### Only render IGMP snooping querier version and address when enabled Starting from AVD 5.0.0, the `ip igmp snooping vlan` command for version and address is rendered only when the IGMP snooping querier is enabled. -See the [porting guide](../porting-guides/5.x.x.md#render-ip-igmp-snooping-vlan-command-for-version-and-address-only-when-igmp-snooping-querier-is-enabled) for details. +See the [porting guide](../porting-guides/5.x.x.md#only-render-igmp-snooping-querier-version-and-address-when-enabled) for details. #### ipv6_virtual_router_addresses are now configured if ipv6_enable is true on SVIs From 8482561e63e071ea500c502f78c79ea44f1a6b1d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:07:40 +0000 Subject: [PATCH 6/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ansible_collections/arista/avd/docs/porting-guides/5.x.x.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md index d279663020a..08278c537ef 100644 --- a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md +++ b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md @@ -448,6 +448,7 @@ In AVD 4.0.0, the `ip igmp snooping vlan` command for version and address was re Starting from AVD 5.0.0, the `ip igmp snooping vlan` command for version and address is rendered only when the IGMP snooping querier is enabled. To retain the old configuration use custom structured configuration. + ```diff custom_structured_configuration_ip_igmp_snooping: vlans: From 2ee0a229ff194526d7e78d9396db09cfae082017 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Date: Wed, 18 Sep 2024 06:08:30 -0700 Subject: [PATCH 7/7] removed TODO --- .../structured_config/core_interfaces_and_l3_edge/utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/utils.py b/python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/utils.py index 1ebc3cd6a74..305873be631 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/utils.py +++ b/python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/utils.py @@ -310,8 +310,6 @@ def _get_port_channel_member_cfg(self: AvdStructuredConfigCoreInterfacesAndL3Edg Return partial structured_config for one p2p_link. Covers config for ethernet interfaces that are port-channel members. - - TODO: Change description for members to be the physical peer interface instead of port-channel """ peer = p2p_link["data"]["peer"] peer_interface = member["peer_interface"]