Skip to content

Commit 827d36e

Browse files
Addressed PR comments
1 parent a0e132a commit 827d36e

3 files changed

Lines changed: 15 additions & 41 deletions

File tree

aci-preupgrade-validation-script.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5882,16 +5882,10 @@ def n9300_switch_memory_check(tversion, fabric_nodes, **kwargs):
58825882
result = PASS
58835883
headers = ["NodeId", "Name", "Model", "Memory Detected (GB)"]
58845884
data = []
5885-
recommended_action = 'Increase the switch memory to at least 24GB before proceeding with the Cisco ACI software upgrade.'
5885+
recommended_action = 'Increase the switch memory to at least 24GB on affected N9300-series switches.'
58865886
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#n9300-switch-memory'
58875887
min_memory_kb = 24 * 1024 * 1024
58885888

5889-
if not tversion:
5890-
return Result(result=MANUAL, msg=TVER_MISSING)
5891-
5892-
if tversion.major_version != '6.1':
5893-
return Result(result=NA, msg=VER_NOT_AFFECTED)
5894-
58955889
proc_mem_query = 'procMemUsage.json'
58965890
affected_nodes = [
58975891
node for node in fabric_nodes

docs/docs/validations.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2650,12 +2650,6 @@ Due to [CSCwp95515][59], upgrading to an affected version while having any `conf
26502650

26512651
If any instances of `configpushShardCont` are flagged by this script, Cisco TAC must be contacted to identify and resolve the underlying issue before performing the upgrade.
26522652

2653-
### N9300 Switch Memory
2654-
2655-
This check applies only when the target upgrade version is 6.1. It reviews `procMemUsage` for N9300-series switches and flags nodes with less than 24GB memory installed.
2656-
2657-
If any N9300-series switch is flagged by this check, increase the switch memory to at least 24GB before the upgrade.
2658-
26592653
### Auto Firmware Update on Switch Discovery
26602654

26612655
[Auto Firmware Update on Switch Discovery][63] automatically upgrades a new switch to the target firmware version before registering it to the ACI fabric. This feature activates in three scenarios:
@@ -2675,6 +2669,14 @@ To avoid this risk, consider disabling Auto Firmware Update before upgrading to
26752669
!!! note
26762670
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.
26772671

2672+
### N9300 Switch Memory
2673+
2674+
This check applies to N9300-series switches only. It reviews `procMemUsage` and flags nodes with less than 24GB memory installed.
2675+
2676+
Impact: Running an N9300-series switch with less than 24GB memory can lead to memory pressure and increase the risk of service instability.
2677+
2678+
If any N9300-series switch is flagged by this check, increase the switch memory to at least 24GB.
2679+
26782680

26792681
[0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script
26802682
[1]: https://www.cisco.com/c/dam/en/us/td/docs/Website/datacenter/apicmatrix/index.html

tests/checks/n9300_switch_memory_24g_check/test_n9300_switch_memory_24g_check.py

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,11 @@
1818
@pytest.mark.parametrize(
1919
"fabric_nodes, icurl_outputs, tversion, expected_result, expected_msg, expected_data",
2020
[
21-
# Target version missing
22-
(
23-
read_data(dir, "fabricNode_one.json"),
24-
{
25-
proc_mem_query: read_data(dir, "procMemUsage_gt24gb.json"),
26-
},
27-
None,
28-
script.MANUAL,
29-
script.TVER_MISSING,
30-
[],
31-
),
32-
# Target version not affected
33-
(
34-
read_data(dir, "fabricNode_one.json"),
35-
{
36-
proc_mem_query: read_data(dir, "procMemUsage_gt24gb.json"),
37-
},
38-
"6.0(3c)",
39-
script.NA,
40-
script.VER_NOT_AFFECTED,
41-
[],
42-
),
4321
# No nodes returned
4422
(
4523
[],
4624
{},
47-
"6.1(2f)",
25+
"6.0(3c)",
4826
script.NA,
4927
'No N9300 switches found. Skipping.',
5028
[],
@@ -55,7 +33,7 @@
5533
{
5634
proc_mem_query: read_data(dir, "procMemUsage_node201_gt24gb.json"),
5735
},
58-
"6.1(2f)",
36+
"6.0(3c)",
5937
script.NA,
6038
'No N9300 switches found. Skipping.',
6139
[],
@@ -66,7 +44,7 @@
6644
{
6745
proc_mem_query: read_data(dir, "procMemUsage_gt24gb.json"),
6846
},
69-
"6.1(2f)",
47+
"6.0(3c)",
7048
script.PASS,
7149
'',
7250
[],
@@ -77,7 +55,7 @@
7755
{
7856
proc_mem_query: read_data(dir, "procMemUsage_all_gt24gb.json"),
7957
},
80-
"6.1(2f)",
58+
"6.0(3c)",
8159
script.PASS,
8260
'',
8361
[],
@@ -88,7 +66,7 @@
8866
{
8967
proc_mem_query: read_data(dir, "procMemUsage_mixed.json"),
9068
},
91-
"6.1(2f)",
69+
"6.0(3c)",
9270
script.FAIL_O,
9371
'',
9472
[["102", "leaf102", "N9K-C9364C", 21.49]],
@@ -97,7 +75,7 @@
9775
)
9876
def test_logic(run_check, mock_icurl, fabric_nodes, tversion, expected_result, expected_msg, expected_data):
9977
result = run_check(
100-
tversion=script.AciVersion(tversion) if tversion else None,
78+
tversion=script.AciVersion(tversion),
10179
fabric_nodes=fabric_nodes,
10280
)
10381
assert result.result == expected_result

0 commit comments

Comments
 (0)