Skip to content

Commit 3cfed10

Browse files
committed
merge v2.6.0 master
2 parents d7098af + 4e47486 commit 3cfed10

10 files changed

Lines changed: 1077 additions & 2 deletions

aci-preupgrade-validation-script.py

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import os
3535
import re
3636

37-
SCRIPT_VERSION = "v2.5.0"
37+
SCRIPT_VERSION = "v2.6.0"
3838
DONE = 'DONE'
3939
PASS = 'PASS'
4040
FAIL_O = 'FAIL - OUTAGE WARNING!!'
@@ -5250,6 +5250,111 @@ def ave_eol_check(index, total_checks, tversion, **kwargs):
52505250
return result
52515251

52525252

5253+
def stale_pcons_ra_mo_check(index, total_checks, cversion, tversion, **kwargs):
5254+
title = 'Stale pconsRA Objects'
5255+
result = PASS
5256+
msg = ''
5257+
headers = ["Stale pconsRA DN", "Non-Existing DN"]
5258+
5259+
data = []
5260+
recommended_action = 'Contact Cisco TAC to delete stale pconsRA before upgrading'
5261+
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#stale-pconsra-object'
5262+
print_title(title, index, total_checks)
5263+
5264+
if not tversion:
5265+
print_result(title, MANUAL, "Target version not supplied. Skipping.")
5266+
return MANUAL
5267+
5268+
if cversion.older_than("6.0(3d)") and tversion.newer_than("6.0(3c)") and tversion.older_than("6.1(4a)"):
5269+
pcons_rssubtreedep_api = 'pconsRsSubtreeDep.json?query-target-filter=wcard(pconsRsSubtreeDep.tDn,"/instdn-")'
5270+
pcons_rssubtreedep_mo = icurl('class', pcons_rssubtreedep_api)
5271+
pcons_inst_dn_reg = r'registry/class-\d+/instdn-\[(?P<policy_dn>.+?)\]/ra'
5272+
pcons_ra_dn_reg = r'(?P<pcons_ra_dn>.+?)/p...-\['
5273+
5274+
pcons_ra_set = set()
5275+
policy_dn_set = set()
5276+
5277+
for mo in pcons_rssubtreedep_mo:
5278+
pcons_rssubtreedep_tdn = mo['pconsRsSubtreeDep']['attributes']['tDn']
5279+
instdn_found = re.search(pcons_inst_dn_reg, pcons_rssubtreedep_tdn)
5280+
radn_found = re.search(pcons_ra_dn_reg, pcons_rssubtreedep_tdn)
5281+
if instdn_found and radn_found:
5282+
pcons_ra_dn = radn_found.group('pcons_ra_dn')
5283+
policy_dn = instdn_found.group('policy_dn')
5284+
if pcons_ra_dn not in pcons_ra_set:
5285+
pcons_ra_set.add(pcons_ra_dn)
5286+
if policy_dn not in policy_dn_set:
5287+
policy_dn_set.add(policy_dn)
5288+
5289+
for policy_dn in policy_dn_set:
5290+
policy_dn_api = policy_dn + '.json'
5291+
policy_dn_mo = icurl('mo', policy_dn_api)
5292+
if not policy_dn_mo:
5293+
for pcons_ra_dn in pcons_ra_set:
5294+
if policy_dn in pcons_ra_dn:
5295+
pcons_ra_api = pcons_ra_dn + '.json'
5296+
pcons_ra_dn_mo = icurl('mo', pcons_ra_api)
5297+
if pcons_ra_dn_mo:
5298+
data.append([pcons_ra_dn, policy_dn])
5299+
else:
5300+
print_result(title, NA, "Target version not supplied or not applicable. Skipping.")
5301+
return NA
5302+
5303+
if data:
5304+
result = FAIL_O
5305+
print_result(title, result, msg, headers, data, recommended_action=recommended_action, doc_url=doc_url)
5306+
return result
5307+
5308+
5309+
def isis_database_byte_check(index, total_checks, tversion, **kwargs):
5310+
title = 'ISIS DTEPs Byte Size'
5311+
result = PASS
5312+
msg = ''
5313+
headers = ["ISIS DTEPs Byte Size", "ISIS DTEPs"]
5314+
data = []
5315+
recommended_action = 'Upgrade to a version with the fix for CSCwp15375. Current target version is affected.'
5316+
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#isis-dteps-byte-size'
5317+
print_title(title, index, total_checks)
5318+
5319+
if not tversion:
5320+
print_result(title, MANUAL, "Target version not supplied. Skipping.")
5321+
return MANUAL
5322+
5323+
if tversion.newer_than("6.1(1a)") and tversion.older_than("6.1(3g)"):
5324+
isisDTEp_api = 'isisDTEp.json'
5325+
isisDTEp_api += '?query-target-filter=eq(isisDTEp.role,"spine")'
5326+
5327+
isisDTEps = icurl('class', isisDTEp_api)
5328+
5329+
physical_ids = set()
5330+
proxy_acast_ids = set()
5331+
5332+
for entry in isisDTEps:
5333+
dtep_type = entry['isisDTEp']['attributes']['type']
5334+
dtep_id = entry['isisDTEp']['attributes']['id']
5335+
5336+
if dtep_type == "physical":
5337+
physical_ids.add(dtep_id)
5338+
elif "physical,proxy-acast" in dtep_type:
5339+
proxy_acast_ids.add(dtep_id)
5340+
5341+
for physical_id in physical_ids:
5342+
combined_dteps = ",".join([physical_id] + list(proxy_acast_ids))
5343+
total_bytes = len(combined_dteps)
5344+
5345+
if total_bytes > 57:
5346+
result = FAIL_O
5347+
data.append([total_bytes, combined_dteps])
5348+
break
5349+
5350+
else:
5351+
print_result(title, NA, "Target version not affected")
5352+
return NA
5353+
5354+
print_result(title, result, msg, headers, data, recommended_action=recommended_action, doc_url=doc_url)
5355+
return result
5356+
5357+
52535358
# ---- Script Execution ----
52545359

52555360
def parse_args(args):
@@ -5390,6 +5495,8 @@ def get_checks(is_puv, debug_func):
53905495
n9408_model_check,
53915496
pbr_high_scale_check,
53925497
standby_sup_sync_check,
5498+
stale_pcons_ra_mo_check,
5499+
isis_database_byte_check,
53935500

53945501
]
53955502
conn_checks = [

docs/docs/validations.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ Items | Defect | This Script
184184
[PBR High Scale][d23] | CSCwi66348 | :white_check_mark: | :no_entry_sign: |:no_entry_sign:
185185
[Standby Sup Image Sync][d24] | CSCwi66348 | :white_check_mark: | :no_entry_sign: |:no_entry_sign:
186186
[Observer Database Size][d25] | CSCvw45531 | :white_check_mark: | :no_entry_sign: |:no_entry_sign:
187+
[Stale pconsRA Object][d26] | CSCwp22212 | :white_check_mark: | :no_entry_sign: |:no_entry_sign:
188+
[ISIS DTEPs Byte Size][d27] | CSCwp15375 | :white_check_mark: | :no_entry_sign: |:no_entry_sign:
189+
187190

188191
[d1]: #ep-announce-compatibility
189192
[d2]: #eventmgr-db-size-defect-susceptibility
@@ -210,6 +213,8 @@ Items | Defect | This Script
210213
[d23]: #pbr-high-scale
211214
[d24]: #standby-sup-image-sync
212215
[d25]: #observer-database-size
216+
[d26]: #stale-pconsra-object
217+
[d27]: #isis-dteps-byte-size
213218

214219

215220
## General Check Details
@@ -2540,6 +2545,29 @@ This check logs in to each APIC, checks the contents of the `/data2/dbstats/` di
25402545
!!! tip
25412546
Certain high churn logging configurations have been found to grow this DB exceptionally large while on a non-fixed version. 'Contract Permit Logging' is one such configuration.
25422547

2548+
### Stale pconsRA Object
2549+
2550+
Due to [CSCwp22212][57], the existence of stale pconsRA objects within an ACI fabric can cause the APIC Policymanager process to crash after an upgrade to 6.0(3d) and above. This script looks for instances of stale pconsRA objects and flags them for cleanup when found.
2551+
2552+
TAC must be engaged to cleanup these objects, as they require root access.
2553+
2554+
2555+
### ISIS DTEPs Byte Size
2556+
2557+
Due to [CSCwp15375][58], running a `show` command that dumps out the ISIS Link State Database under certain conditions, such as `show isis database detail vrf all`, will result in a switch crash.
2558+
2559+
As Switch Tech Support generation includes ISIS show command output, Tech Support generation will also result in a switch crash under the same conditions.
2560+
2561+
The specific conditions leading to the crash are:
2562+
2563+
1. The ACI software version is 6.1(1f), 6.1(2f), 6.1(2g), or 6.1(3f)
2564+
2. For any spine; The `isisDTEp` address + `PROXY-ACAST-MAC` address + `PROXY-ACAST-V4` address + `PROXY-ACAST-V6` address equals 58 bytes or more
2565+
2566+
Do not upgrade to any affected ACI software release if this check fails.
2567+
2568+
!!! note
2569+
Nexus Dashboard Insights (NDI) integration can cause ACI tech support generation to happen automatically as part of the bug scan feature.
2570+
25432571

25442572
[0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script
25452573
[1]: https://www.cisco.com/c/dam/en/us/td/docs/Website/datacenter/apicmatrix/index.html
@@ -2597,4 +2625,6 @@ This check logs in to each APIC, checks the contents of the `/data2/dbstats/` di
25972625
[53]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvw45531
25982626
[54]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvt47850
25992627
[55]: https://www.cisco.com/c/en/us/products/collateral/cloud-systems-management/application-policy-infrastructure-controller-apic/eol-apic-virtual-edge-pod-pb.html
2600-
[56]: https://www.cisco.com/c/en/us/td/docs/dcn/whitepapers/cisco-aci-virtual-edge-migration.html
2628+
[56]: https://www.cisco.com/c/en/us/td/docs/dcn/whitepapers/cisco-aci-virtual-edge-migration.html
2629+
[57]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp22212
2630+
[58]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp15375

0 commit comments

Comments
 (0)