Skip to content

Commit

Permalink
Remove vnid_mismatch_check (#182)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
takishida authored Dec 12, 2024
1 parent 010cd6d commit 8742519
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 68 deletions.
63 changes: 0 additions & 63 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
11 changes: 8 additions & 3 deletions docs/docs/validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
### <del>VNID Mismatch</del>

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.

<span style="color:lightgray">
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.
</span>


### L3Out MTU
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@
"ifpg_name": "IFPG_VPC1",
},
{
"ifp": "L101",
"ifp": "L103",
"card": "1",
"port": "2",
"ifpg_class": "infraAccPortGrp",
Expand Down

0 comments on commit 8742519

Please sign in to comment.