From 874251901e790e98d77589a6a072c8c76852b568 Mon Sep 17 00:00:00 2001 From: takishida <38262981+takishida@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:38:18 -0800 Subject: [PATCH] Remove vnid_mismatch_check (#182) * Remove vnid_mismatch_check `vnid_mismatch_check` was added to complement `overlapping_vlan_pools_check`. Given the recent update (#155, #162), `vnid_mismatch_check` became redundant, and it was decided to remove this check. * doc: Update doc with deprecation warning --- aci-preupgrade-validation-script.py | 63 ------------------- docs/docs/validations.md | 11 +++- docs/mkdocs.yml | 2 +- .../test_overlapping_vlan_pools_check.py | 2 +- 4 files changed, 10 insertions(+), 68 deletions(-) diff --git a/aci-preupgrade-validation-script.py b/aci-preupgrade-validation-script.py index 096130e..8024223 100644 --- a/aci-preupgrade-validation-script.py +++ b/aci-preupgrade-validation-script.py @@ -2176,68 +2176,6 @@ def overlapping_vlan_pools_check(index, total_checks, **kwargs): return result -def vnid_mismatch_check(index, total_checks, **kwargs): - title = 'VNID Mismatch' - result = FAIL_O - msg = '' - headers = ["EPG", "Access Encap", "Node ID", "Fabric Encap"] - data = [] - mismatch_hits = [] - recommended_action = 'Remove any domains with overlapping VLAN Pools from above EPGs, then redeploy VLAN' - doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#vnid-mismatch' - print_title(title, index, total_checks) - - vlanCktEps = icurl('class', 'vlanCktEp.json?query-target-filter=ne(vlanCktEp.name,"")') - if not vlanCktEps: - result = ERROR - msg = 'Deployed VLANs (vlanCktEp) not found' - - epg_encap_dict = {} - for vlanCktEp in vlanCktEps: - dn = re.search(node_regex, vlanCktEp['vlanCktEp']['attributes']['dn']) - node = dn.group("node") - access_encap = vlanCktEp['vlanCktEp']['attributes']['encap'] - epg_dn = vlanCktEp['vlanCktEp']['attributes']['epgDn'] - fab_encap = vlanCktEp['vlanCktEp']['attributes']['fabEncap'] - - if epg_dn not in epg_encap_dict: - epg_encap_dict[epg_dn] = {} - - if access_encap not in epg_encap_dict[epg_dn]: - epg_encap_dict[epg_dn][access_encap] = [] - - epg_encap_dict[epg_dn][access_encap].append({'node': node, 'fabEncap': fab_encap}) - - # Iterate through, check for overlaps, and print - for key, epg in iteritems(epg_encap_dict): - for vlanKey, vlan in iteritems(epg): - fab_encap_to_check = "" - for deployment in vlan: - if fab_encap_to_check == "" or deployment["fabEncap"] == fab_encap_to_check: - fab_encap_to_check = deployment["fabEncap"] - else: # something is wrong - tmp_hit = {} - tmp_hit["epgDn"] = key - tmp_hit["epgDeployment"] = epg - if tmp_hit not in mismatch_hits: # some epg has more than one access encap. - mismatch_hits.append(tmp_hit) - break - - if not mismatch_hits: - result = PASS - - mismatch_hits.sort(key=lambda d: d.get("epgDn", "")) - for epg in mismatch_hits: - for access_encap, nodeFabEncaps in iteritems(epg["epgDeployment"]): - for nodeFabEncap in nodeFabEncaps: - node_id = nodeFabEncap['node'] - fabric_encap = nodeFabEncap['fabEncap'] - data.append([epg["epgDn"], access_encap, node_id, fabric_encap]) - - print_result(title, result, msg, headers, data, recommended_action=recommended_action, doc_url=doc_url) - return result - - def scalability_faults_check(index, total_checks, **kwargs): title = 'Scalability (faults related to Capacity Dashboard)' result = FAIL_O @@ -4308,7 +4246,6 @@ def validate_32_64_bit_image_check(index, total_checks, tversion, **kwargs): # Configurations vpc_paired_switches_check, overlapping_vlan_pools_check, - vnid_mismatch_check, l3out_mtu_check, bgp_peer_loopback_check, l3out_route_map_direction_check, diff --git a/docs/docs/validations.md b/docs/docs/validations.md index b5266a9..337e75c 100644 --- a/docs/docs/validations.md +++ b/docs/docs/validations.md @@ -104,7 +104,7 @@ Items | Faults | This Script ------------------------------------------------------|--------------------|---------------------------|------------------------------- [VPC-paired Leaf switches][c1] | :white_check_mark: | :white_check_mark: 4.2(4) | :white_check_mark: [Overlapping VLAN Pool][c2] | :white_check_mark: | :no_entry_sign: | :white_check_mark: -[VNID Mismatch][c3] | :white_check_mark: | :no_entry_sign: | :no_entry_sign: +[VNID Mismatch][c3] (deprecated) | :warning: | :no_entry_sign: | :no_entry_sign: [L3Out MTU][c4] | :white_check_mark: | :no_entry_sign: | :white_check_mark: [BGP Peer Profile at node level without Loopback][c5] | :white_check_mark: | :no_entry_sign: | :white_check_mark: [L3Out Route Map import/export direction][c6] | :white_check_mark: | :no_entry_sign: | :white_check_mark: @@ -1618,9 +1618,14 @@ Refer to the following documents to understand how overlapping VLAN pools become * [VLAN Pool - ACI Best Practice Quick Summary][13] -### VNID Mismatch +### VNID Mismatch -A VNID mismatch can arise due to an [Overlapping VLAN Pool][c2] situation. This verification is closely tied to the [Overlapping VLAN Pool][c2] scenario, which often leads to problems post-upgrade. Nonetheless, if your fabric is currently experiencing any VNID mismatches, you might encounter the challenges outlined in [Overlapping VLAN Pool][c2] even without undergoing an upgrade. This situation also implies the presence of an overlapping VLAN pool configuration, potentially resulting in a VNID mismatch at a distinct EPG following an upgrade, causing different impact to your traffic. +!!! warning "Deprecated" + This check was deprecated and removed as it had not only become redundant after the updates in the [Overlapping VLAN Pool][c2] check but also contained a risk of rainsing a false alarm. See [PR #182](https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script/pull/182) for details. + + +A VNID mismatch can arise due to an [Overlapping VLAN Pool][c2] situation. This verification is closely tied to the [Overlapping VLAN Pool][c2] scenario, which often leads to problems post-upgrade. Nonetheless, if your fabric is currently experiencing any VNID mismatches, you might encounter the challenges outlined in [Overlapping VLAN Pool][c2] even without undergoing an upgrade. This situation also implies the presence of an overlapping VLAN pool configuration, potentially resulting in a VNID mismatch at a distinct EPG following an upgrade, causing different impact to your traffic. + ### L3Out MTU diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index a8c9e16..01b6346 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -30,7 +30,7 @@ markdown_extensions: class: mermaid format: !!python/name:pymdownx.superfences.fence_code_format - # emoji + # emoji - pymdownx.emoji: emoji_index: !!python/name:pymdownx.emoji.gemoji emoji_generator: !!python/name:pymdownx.emoji.to_svg diff --git a/tests/overlapping_vlan_pools_check/test_overlapping_vlan_pools_check.py b/tests/overlapping_vlan_pools_check/test_overlapping_vlan_pools_check.py index 25ec456..cf6f6ee 100644 --- a/tests/overlapping_vlan_pools_check/test_overlapping_vlan_pools_check.py +++ b/tests/overlapping_vlan_pools_check/test_overlapping_vlan_pools_check.py @@ -2020,7 +2020,7 @@ "ifpg_name": "IFPG_VPC1", }, { - "ifp": "L101", + "ifp": "L103", "card": "1", "port": "2", "ifpg_class": "infraAccPortGrp",