Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ced0e4a
Added N9300 switch memory check
Priyanka-Patil14 Mar 20, 2026
615b58e
Remove unrelated thread/prints changes from N9300 check PR
Priyanka-Patil14 Mar 20, 2026
4013a37
Addressed PR comments
Priyanka-Patil14 Mar 23, 2026
a357301
Addressed and updated n9300_switch_memory_check files
Priyanka-Patil14 Mar 24, 2026
d392bd7
Updated aci-preupgrade-validation-script.py script
Priyanka-Patil14 Mar 25, 2026
2f4c703
Add arg to define thread limit - to throttle concurrent API calls whe…
monrog2 Feb 27, 2026
c6a46d5
353 the script incorrectly detects vpc and port channel interfaces as…
monrog2 Feb 27, 2026
45bcaac
print cleanup
monrog2 Feb 27, 2026
8f49c44
Moved N9300 memory check to general checks section
Priyanka-Patil14 Apr 9, 2026
d9ee712
Updated N9300 memory check and threshold to 32GB
Priyanka-Patil14 Apr 14, 2026
26f397f
Fixed N9300 memory threshold to decimal 32GB
Priyanka-Patil14 Apr 14, 2026
5a60335
Added manual check when nodes fail and others have missing memory data
Priyanka-Patil14 Apr 15, 2026
ee2cd8d
Cleared recommended_action for ERROR results
Priyanka-Patil14 Apr 15, 2026
83db0bb
Updated memory check result to MANUAL
Priyanka-Patil14 Apr 16, 2026
20ceb84
refactored parse errors to unformatted_data
Priyanka-Patil14 May 5, 2026
61651e4
Addressed PR comments
Priyanka-Patil14 May 21, 2026
d7d4289
Remove old n9300_switch_memory_24g_check test files
Priyanka-Patil14 May 25, 2026
db4dd05
Updated check for fabricNode attributes
Priyanka-Patil14 May 25, 2026
a5ed4ce
Addressed PR comments in validations.md
Priyanka-Patil14 May 26, 2026
ea26774
Addressed PR comments
Priyanka-Patil14 May 26, 2026
2aa34bf
Addressed the PR comments
Priyanka-Patil14 May 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -6410,6 +6410,100 @@ def svccore_excessive_data_check(**kwargs):
return Result(result=ERROR, msg="Error occurred while fetching svccore object counts: {}".format(str(e)), doc_url=doc_url)


@check_wrapper(check_title='N9K-C93180YC-FX3 Switch Memory')
def n9k_c93180yc_fx3_switch_memory_check(fabric_nodes, **kwargs):
result = PASS
headers = ["NodeId", "Name", "Model", "Memory Detected (GB)"]
data = []
unformatted_headers = ['DN', 'Total']
unformatted_data = []
recommended_action = 'Increase the switch memory to at least 32GB on affected N9K-C93180YC-FX3 switches.'
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#n9k-c93180yc-fx3-switch-memory'
min_memory_kb = 32 * 1000 * 1000
msg = ''

affected_nodes = [
node for node in fabric_nodes
if node['fabricNode']['attributes']['model'] == 'N9K-C93180YC-FX3'
]

if not affected_nodes:
result = NA
msg = 'No N9K-C93180YC-FX3 switches found. Skipping.'
else:
proc_mem_mos = icurl('class', 'procMemUsage.json')
node_total_kb = {}

for memory_mo in proc_mem_mos:
attrs = memory_mo.get('procMemUsage', {}).get('attributes', {})
total = attrs.get('Total')
mem_dn = attrs.get('dn', '')
if not total or '/memusage-sup' not in mem_dn:
continue
dn_match = re.search(node_regex, mem_dn)
if not dn_match:
continue
try:
total_kb = int(total)
except (TypeError, ValueError):
unformatted_data.append([mem_dn, total])
continue

node_id = dn_match.group('node')
if node_id not in node_total_kb:
node_total_kb[node_id] = total_kb

missing_nodes = []

for node in affected_nodes:
node_id = node['fabricNode']['attributes']['id']
total_kb = node_total_kb.get(node_id)
if total_kb is None:
missing_nodes.append([
node_id,
node['fabricNode']['attributes']['name'],
node['fabricNode']['attributes']['model'],
])
continue

if total_kb < min_memory_kb:
memory_in_gb = round(total_kb / 1000000, 2)
result = MANUAL
data.append([
node_id,
node['fabricNode']['attributes']['name'],
node['fabricNode']['attributes']['model'],
memory_in_gb,
])

if missing_nodes and data:
result = MANUAL
msg = (
'Some N9K-C93180YC-FX3 nodes have insufficient memory and others are missing '
'procMemUsage data. Please manually verify the memory on all affected nodes.\n'
'Nodes with insufficient memory: {}\n'
'Nodes with missing data: {}'.format(
', '.join(str(row[0]) for row in data),
', '.join(str(row[0]) for row in missing_nodes),
)
)
headers = ['NodeId', 'Name', 'Model', 'Memory Detected (GB)']
data = data + [row + ['N/A'] for row in missing_nodes]
elif missing_nodes:
result = ERROR
msg = 'Missing procMemUsage data for one or more affected N9K-C93180YC-FX3 nodes.'
headers = ['NodeId', 'Name', 'Model']
data = missing_nodes
recommended_action = ''
elif data:
msg = (
'One or more N9K-C93180YC-FX3 switches have less than 32GB of memory. '
'An outage is not guaranteed but can occur. Please verify and upgrade the memory on affected nodes.'
)

return Result(result=result, msg=msg, headers=headers, data=data, unformatted_headers=unformatted_headers, unformatted_data=unformatted_data, recommended_action=recommended_action, doc_url=doc_url)


# ---- Script Execution ----


Expand Down Expand Up @@ -6502,6 +6596,7 @@ class CheckManager:
fabric_link_redundancy_check,
apic_downgrade_compat_warning_check,
svccore_excessive_data_check,
n9k_c93180yc_fx3_switch_memory_check,

# Faults
apic_disk_space_faults_check,
Expand Down
10 changes: 10 additions & 0 deletions docs/docs/validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Items | This Script
[APIC downgrade compatibility when crossing 6.2 release][g19]| :white_check_mark: | :no_entry_sign:
[Supported Hardware Compatibility][g20] | :white_check_mark: | :no_entry_sign:
[Svccore Excessive Data Check][g21] | :white_check_mark: | :no_entry_sign:
[N9K-C93180YC-FX3 Switch Memory][g22] | :white_check_mark: | :no_entry_sign:

[g1]: #compatibility-target-aci-version
[g2]: #compatibility-cimc-version
Expand All @@ -61,6 +62,7 @@ Items | This Script
[g19]: #apic-downgrade-compatibility-when-crossing-62-release
[g20]: #supported-hardware-compatibility
[g21]: #svccore-excessive-data-check
[g22]: #n9k-c93180yc-fx3-switch-memory

### Fault Checks
Items | Faults | This Script | APIC built-in
Expand Down Expand Up @@ -2742,6 +2744,14 @@ To avoid this risk, consider disabling Auto Firmware Update before upgrading to
!!! note
This issue occurs because older switch firmware versions are not compatible with switch images 6.0(3) or newer. The APIC version is not a factor.

### N9K-C93180YC-FX3 Switch Memory

This check applies to N9K-C93180YC-FX3 switches only. It checks whether the switch is using 16GB or 32GB of memory and flags switches running on 16GB memory. This check is not version dependent and runs for all upgrade versions.

Impact: Running an N9K-C93180YC-FX3 switch with less than 32GB memory can lead to memory pressure and increase the risk of service instability.

If any N9K-C93180YC-FX3 switch is flagged by this check, upgrade the switch memory to at least 32GB.


### Rogue EP Exception List missing on switches

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"fabricNode": {
"attributes": {
"dn": "topology/pod-1/node-201",
"id": "201",
"name": "leaf201",
"model": "N9K-C9508",
"role": "leaf"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"fabricNode": {
"attributes": {
"dn": "topology/pod-1/node-101",
"id": "101",
"name": "leaf101",
"model": "N9K-C93180YC-FX3",
"role": "leaf"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"fabricNode": {
"attributes": {
"dn": "topology/pod-1/node-101",
"id": "101",
"name": "leaf101",
"model": "N9K-C93180YC-FX3",
"role": "leaf"
}
}
},
{
"fabricNode": {
"attributes": {
"dn": "topology/pod-1/node-102",
"id": "102",
"name": "leaf102",
"model": "N9K-C9364C",
"role": "leaf"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"fabricNode": {
"attributes": {
"dn": "topology/pod-1/node-101",
"id": "101",
"name": "leaf101",
"model": "N9K-C93180YC-FX3",
"role": "leaf"
}
}
},
{
"fabricNode": {
"attributes": {
"dn": "topology/pod-1/node-102",
"id": "102",
"name": "leaf102",
"model": "N9K-C93180YC-FX3",
"role": "leaf"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-101/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "32676092"
}
}
},
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-102/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "32676092"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-101/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "16000000"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-101/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "32676092"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-101/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "unknown"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-101/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "16000000"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-201/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "32676092"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-101/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "32676092"
}
}
},
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-102/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "22535444"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"procMemUsage": {
"attributes": {
"dn": "topology/pod-1/node-201/sys/procmem/memusage-sup",
"Modname": "sup",
"Total": "32676092"
}
}
}
]
Loading