Skip to content

Commit

Permalink
61 add check for cscwb80058 reduced number of uplinks (#71)
Browse files Browse the repository at this point in the history
* uplink count check + pytests

* doc update

* re-add sup_hwrev_check

* Revert "doc update", auto-formatter strikes again

This reverts commit eff8c42.

* text without auto-formatting

* review changes
  • Loading branch information
monrog2 authored Aug 16, 2023
1 parent b716ec3 commit 39f7a4a
Show file tree
Hide file tree
Showing 5 changed files with 625 additions and 0 deletions.
39 changes: 39 additions & 0 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -2677,6 +2677,43 @@ def sup_hwrev_check(index, total_checks, cversion, tversion, **kwargs):
return result


def uplink_limit_check(index, total_checks, cversion, tversion, **kwargs):
title = 'Per-Leaf Fabric Uplink Limit Validation'
result = PASS
msg = ''
headers = ["Node", "Uplink Count"]
data = []
recommended_action = "Reduce Per-Leaf Port Profile Uplinks to supported scale; 56 or less."
doc_url = 'http://cs.co/ACI_Access_Interfaces_Config_Guide'

print_title(title, index, total_checks)

if not tversion:
print_result(title, MANUAL, 'Target version not supplied. Skipping.')
return MANUAL

if cversion.older_than("6.0(1a)") and tversion.newer_than("6.0(1a)"):
port_profiles = icurl('class', 'eqptPortP.json?query-target-filter=eq(eqptPortP.ctrl,"uplink")')
if not port_profiles or (len(port_profiles) < 57):
return result

node_count = {}
for pp in port_profiles:
dn = re.search(node_regex, pp['eqptPortP']['attributes']['dn'])
node_id = dn.group("node")
node_count.setdefault(node_id, 0)
node_count[node_id] += 1

for node, count in node_count.items():
if count > 56:
data.append([node, count])

if data:
result = FAIL_O
print_result(title, result, msg, headers, data, recommended_action=recommended_action, doc_url=doc_url)
return result


if __name__ == "__main__":
prints(' ==== %s%s, Script Version %s ====\n' % (ts, tz, SCRIPT_VERSION))
prints('!!!! Check https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script for Latest Release !!!!\n')
Expand Down Expand Up @@ -2743,6 +2780,8 @@ def sup_hwrev_check(index, total_checks, cversion, tversion, **kwargs):
isis_redis_metric_mpod_msite_check,
bgp_golf_route_target_type_check,
docker0_subnet_overlap_check,
uplink_limit_check,


# Bugs
ep_announce_check,
Expand Down
13 changes: 13 additions & 0 deletions docs/docs/validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Items | Faults | This Script
[ISIS Redistribution Metric for MPod/Msite][c7] | :white_check_mark: | :no_entry_sign: | :white_check_mark:
[BGP Route-target Type for GOLF over L2EVPN][c8] | :white_check_mark: | :no_entry_sign: | :white_check_mark:
[APIC Container Bridge IP Overlap with APIC TEP][c9] | :white_check_mark: | :no_entry_sign: | :no_entry_sign:
[Per-Leaf Fabric Uplink Scale Validation][c10] | :white_check_mark: | :no_entry_sign: | :no_entry_sign:

[c1]: #vpc-paired-leaf-switches
[c2]: #overlapping-vlan-pool
Expand All @@ -108,6 +109,7 @@ Items | Faults | This Script
[c7]: #isis-redistribution-metric-for-mpodmsite
[c8]: #bgp-route-target-type-for-golf-over-l2evpn
[c9]: #apic-container-bridge-ip-overlap-with-apic-tep
[c10]: #fabric-uplink-scale-cannot-exceed-56-uplinks-per-leaf


### Defect Condition Checks
Expand Down Expand Up @@ -1185,6 +1187,17 @@ The script checks if the APIC Container Bridge IP is overlapping withe the APIC
```


### Fabric Uplink Scale cannot exceed 56 uplinks per leaf

Prior to release 6.0, the per-leaf fabric uplink count was not enforced. However, surpassing 56 could lead to programming issues on the leaf.

After release 6.0, per-leaf fabric uplink count is enforced via enhancement CSCwb80058. If a leaf switch has surpassed 56 uplinks and is upgraded, 56 uplinks will come up and the rest will not.

To avoid this, explicitly modify the port profile uplink scale to be 56 or less per leaf.

The script counts the amount of port-profile provisioned uplinks per leaf, and fails if any leaf is found to surpass 56.


## Defect Check Details

### EP Announce Compatibility
Expand Down
26 changes: 26 additions & 0 deletions tests/uplink_limit_check/eqptPortP_NEG.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"eqptPortP": {
"attributes": {
"ctrl": "uplink",
"dn": "topology/pod-1/node-101/sys/ops/slot-lcslot-1/portpol-54"
}
}
},
{
"eqptPortP": {
"attributes": {
"ctrl": "uplink",
"dn": "topology/pod-1/node-102/sys/ops/slot-lcslot-1/portpol-54"
}
}
},
{
"eqptPortP": {
"attributes": {
"ctrl": "uplink",
"dn": "topology/pod-1/node-103/sys/ops/slot-lcslot-1/portpol-54"
}
}
}
]
Loading

0 comments on commit 39f7a4a

Please sign in to comment.