Skip to content

Commit 21252c6

Browse files
authored
Merge branch 'v4.1.0-dev' into dhaselva/N2k_fex
2 parents fbf3a73 + 69d6a4b commit 21252c6

12 files changed

Lines changed: 391 additions & 1 deletion

aci-preupgrade-validation-script.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6348,6 +6348,53 @@ def multipod_modular_spine_bootscript_check(tversion, fabric_nodes, username, pa
63486348

63496349
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
63506350

6351+
6352+
@check_wrapper(check_title="Inband Management Policy Misconfiguration")
6353+
def inband_management_policy_misconfig_check(cversion, tversion, **kwargs):
6354+
result = PASS
6355+
headers = ["Node_ID", "Address", "Gateway"]
6356+
data = []
6357+
recommended_action = "Contact Cisco TAC to remove any identified misconfigured 'mgmtRsInBStNode' objects"
6358+
doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#inband-management-policy-misconfiguration"
6359+
6360+
if (cversion.older_than("5.2(8d)")) and (tversion.newer_than("6.0(4c)") or tversion.same_as("6.0(4c)")):
6361+
mgmtRsInBStNodes = icurl('class', 'mgmtRsInBStNode.json?query-target-filter=or(eq(mgmtRsInBStNode.addr,"0.0.0.0"),eq(mgmtRsInBStNode.gw,"0.0.0.0"))')
6362+
for mgmtRsInBStNode in mgmtRsInBStNodes:
6363+
attrs = mgmtRsInBStNode["mgmtRsInBStNode"]["attributes"]
6364+
addr = attrs['addr']
6365+
gw = attrs['gw']
6366+
node_match = re.search(node_regex, attrs['dn'])
6367+
node_id = node_match.group("node")
6368+
data.append([node_id, addr, gw])
6369+
else:
6370+
return Result(result=NA, msg=VER_NOT_AFFECTED)
6371+
if data:
6372+
result = FAIL_O
6373+
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
6374+
6375+
6376+
@check_wrapper(check_title="svccore excessive data check")
6377+
def svccore_excessive_data_check(**kwargs):
6378+
result = PASS
6379+
headers = ['Class Name','Count']
6380+
data = []
6381+
recommended_action = "Delete the core files before proceeding with upgrade. Please refer to the document linked below and contact Cisco TAC for assistance if needed."
6382+
doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#svccore-excessive-data-check"
6383+
try:
6384+
svccoreCtrlr_classes_count = icurl('class', 'svccoreCtrlr.json?query-target=self&rsp-subtree-include=count')
6385+
svccoreNode_classes_count = icurl('class', 'svccoreNode.json?query-target=self&rsp-subtree-include=count')
6386+
6387+
if int(svccoreCtrlr_classes_count[0]['moCount']['attributes']['count']) > 240:
6388+
data.append(['svccoreCtrlr', svccoreCtrlr_classes_count[0]['moCount']['attributes']['count']])
6389+
if int(svccoreNode_classes_count[0]['moCount']['attributes']['count']) > 240:
6390+
data.append(['svccoreNode', svccoreNode_classes_count[0]['moCount']['attributes']['count']])
6391+
if data:
6392+
result = MANUAL
6393+
6394+
return Result(result=result,headers=headers,data=data,recommended_action=recommended_action,doc_url=doc_url)
6395+
except Exception as e:
6396+
return Result(result=ERROR, msg="Error occurred while fetching svccore object counts: {}".format(str(e)), doc_url=doc_url)
6397+
63516398

63526399
# ---- Script Execution ----
63536400

@@ -6440,6 +6487,7 @@ class CheckManager:
64406487
validate_32_64_bit_image_check,
64416488
fabric_link_redundancy_check,
64426489
apic_downgrade_compat_warning_check,
6490+
svccore_excessive_data_check,
64436491

64446492
# Faults
64456493
apic_disk_space_faults_check,
@@ -6518,6 +6566,7 @@ class CheckManager:
65186566
auto_firmware_update_on_switch_check,
65196567
rogue_ep_coop_exception_mac_check,
65206568
n9k_c9408_model_lem_count_check,
6569+
inband_management_policy_misconfig_check,
65216570
]
65226571
ssh_checks = [
65236572
# General

docs/docs/validations.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Items | This Script
3737
[Fabric Link Redundancy][g17] | :white_check_mark: | :no_entry_sign:
3838
[APIC Database Size][g18] | :white_check_mark: | :no_entry_sign:
3939
[APIC downgrade compatibility when crossing 6.2 release][g19]| :white_check_mark: | :no_entry_sign:
40-
[Supported hardware compatibility][g20] | :white_check_mark: | :no_entry_sign:
40+
[Supported Hardware Compatibility][g20] | :white_check_mark: | :no_entry_sign:
41+
[Svccore Excessive Data Check][g21] | :white_check_mark: | :no_entry_sign:
4142

4243
[g1]: #compatibility-target-aci-version
4344
[g2]: #compatibility-cimc-version
@@ -59,6 +60,7 @@ Items | This Script
5960
[g18]: #apic-database-size
6061
[g19]: #apic-downgrade-compatibility-when-crossing-62-release
6162
[g20]: #supported-hardware-compatibility
63+
[g21]: #svccore-excessive-data-check
6264

6365
### Fault Checks
6466
Items | Faults | This Script | APIC built-in
@@ -200,6 +202,7 @@ Items | Defect | This Script
200202
[Rogue EP Exception List missing on switches][d30] | CSCwp64296 | :white_check_mark: | :no_entry_sign:
201203
[N9K-C9408 with more than 5 N9K-X9400-16W LEMs][d31] | CSCws82819 | :white_check_mark: | :no_entry_sign:
202204
[Multi-Pod Modular Spine Bootscript File][d32] | CSCwr66848 | :white_check_mark: | :no_entry_sign:
205+
[Inband Management Policy Misconfiguration][d33]| CSCwd40071 | :white_check_mark: | :no_entry_sign:
203206

204207
[d1]: #ep-announce-compatibility
205208
[d2]: #eventmgr-db-size-defect-susceptibility
@@ -233,6 +236,7 @@ Items | Defect | This Script
233236
[d30]: #rogue-ep-exception-list-missing-on-switches
234237
[d31]: #n9k-c9408-with-more-than-5-n9k-x9400-16w-lems
235238
[d32]: #multi-pod-modular-spine-bootscript-file
239+
[d33]: #inband-management-policy-misconfiguration
236240

237241
## General Check Details
238242

@@ -2766,6 +2770,34 @@ This issue happens only when the target version is specifically 6.1(4h).
27662770
To avoid this issue, change the target version to another version. Or verify that the `bootscript` file exists in the bootflash of each modular spine switch prior to upgrading to 6.1(4h). If the file is missing, you have to do clean reboot on the impacted spine to ensure that `/bootflash/bootscript` gets created again. In case you already upgraded your spine and you are experiencing the traffic impact due to this issue, clean reboot of the spine will restore the traffic.
27672771

27682772

2773+
### Inband Management Policy Misconfiguration
2774+
2775+
Due to the defect [CSCwh80837][67], starting from version 6.0(4c), mgmtRsInBStNode policy get modified in leaf/spine during Apic upgrade.
2776+
2777+
Impact:
2778+
2779+
When upgrading Apic from versions prior to 6.0(4c) to versions 6.0(4c) or later, if there is a misconfiguration in the inband management policies (mgmtRsInBStNode) with invalid values, the re-processing triggered by [CSCwh80837][67] will expose the underlying [CSCwd40071][68] defect. This results in continuous policyelem core dumps and switch reboot if Switch are running impacted version of [CSCwd40071][68].
2780+
2781+
The invalid configuration occurs when mgmtRsInBStNode has "0.0.0.0" values ( with or without mask) for either the "addr" or "gw" fields.
2782+
2783+
Suggestion:
2784+
2785+
Contact Cisco TAC to remove any identified misconfigured objects before performing the upgrade to prevent policyelem crashes.
2786+
The [CSCwd40071][68] defect affects versions 5.2(5c) and later with a fix available in 6.0(1g). However, the issue will only be triggered during Apic upgrades crossing 6.0(4c) due to [CSCwh80837][67].
2787+
2788+
2789+
### Svccore Excessive Data Check
2790+
2791+
Due to excessive `svccoreCtrlr` or `svccoreNode` managed objects, Apic gui stuck in loading multiple queries.
2792+
2793+
The svccoreCtrlr and svccoreNode objects represent core files related to Apic and Leaf/Spines process respectively.
2794+
2795+
Due to [CSCws84232][67], the APIC GUI may become unresponsive after login, with dashboards stuck in a continuous “Loading…”state.
2796+
Administrators may be unable to access or operate the APIC GUI, potentially impacting day-to-day management or upgrade.
2797+
2798+
This check will verify the count of the `svccoreCtrlr` Managed Object and raise and alarm with the bug if object count found more than 240. Remove the content or objects of `svccoreCtrlr` or `svccoreNode`. Contact Cisco TAC or upgrade to a release containing the fix for CSCws84232 before proceeding with an upgrade.
2799+
2800+
27692801
[0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script
27702802
[1]: https://www.cisco.com/c/dam/en/us/td/docs/Website/datacenter/apicmatrix/index.html
27712803
[2]: https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-release-notes-list.html
@@ -2833,3 +2865,6 @@ To avoid this issue, change the target version to another version. Or verify tha
28332865
[64]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp64296
28342866
[65]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCws82819
28352867
[66]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwr66848
2868+
[67]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwh80837
2869+
[68]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwd40071
2870+
[69]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCws84232
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"mgmtRsInBStNode": {
4+
"attributes": {
5+
"tDn": "topology/pod-1/node-103",
6+
"addr": "0.0.0.0",
7+
"configurationMode": "static",
8+
"dn": "uni/tn-mgmt/mgmtp-default/inb-inb/rsinBStNode-[topology/pod-1/node-103]",
9+
"gw": "0.0.0.0",
10+
"modTs": "2024-12-20T07:45:21.454+00:00",
11+
"rType": "mo",
12+
"rn": "rsinBStNode-[topology/pod-1/node-103]",
13+
"stateQual": "none",
14+
"tType": "mo"
15+
}
16+
}
17+
}
18+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"mgmtRsInBStNode": {
4+
"attributes": {
5+
"tDn": "topology/pod-1/node-103",
6+
"addr": "0.0.0.0",
7+
"configurationMode": "static",
8+
"dn": "uni/tn-mgmt/mgmtp-default/inb-inb/rsinBStNode-[topology/pod-1/node-103]",
9+
"gw": "191.1.1.1",
10+
"modTs": "2024-12-20T07:45:21.454+00:00",
11+
"rType": "mo",
12+
"rn": "rsinBStNode-[topology/pod-1/node-103]",
13+
"stateQual": "none",
14+
"tType": "mo"
15+
}
16+
}
17+
}
18+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"mgmtRsInBStNode": {
4+
"attributes": {
5+
"tDn": "topology/pod-1/node-103",
6+
"addr": "191.1.1.153/24",
7+
"configurationMode": "static",
8+
"dn": "uni/tn-mgmt/mgmtp-default/inb-inb/rsinBStNode-[topology/pod-1/node-103]",
9+
"gw": "0.0.0.0",
10+
"modTs": "2024-12-20T07:45:21.454+00:00",
11+
"rType": "mo",
12+
"rn": "rsinBStNode-[topology/pod-1/node-103]",
13+
"stateQual": "none",
14+
"tType": "mo"
15+
}
16+
}
17+
}
18+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
import os
2+
import pytest
3+
import logging
4+
import importlib
5+
from helpers.utils import read_data
6+
7+
script = importlib.import_module("aci-preupgrade-validation-script")
8+
log = logging.getLogger(__name__)
9+
dir = os.path.dirname(os.path.abspath(__file__))
10+
test_function = "inband_management_policy_misconfig_check"
11+
mgmtRsInBStNode = 'mgmtRsInBStNode.json?query-target-filter=or(eq(mgmtRsInBStNode.addr,"0.0.0.0"),eq(mgmtRsInBStNode.gw,"0.0.0.0"))'
12+
13+
@pytest.mark.parametrize(
14+
"icurl_outputs, cversion, tversion, expected_result, expected_data",
15+
[
16+
# Current version is affected, Target version = 6.0(4c), valid data
17+
(
18+
{
19+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_valid_config.json")
20+
},
21+
"5.2(7g)",
22+
"6.0(4c)",
23+
script.PASS,
24+
[]
25+
),
26+
# Current version is affected, Target version = 6.0(4c), invalid address
27+
(
28+
{
29+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_address_config.json"),
30+
},
31+
"5.2(7f)",
32+
"6.0(4c)",
33+
script.FAIL_O,
34+
[
35+
["103", "0.0.0.0", "191.1.1.1"]
36+
]
37+
),
38+
# Current version is affected, Target version = 6.0(4c), invalid gateway
39+
(
40+
{
41+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_gateway_config.json"),
42+
},
43+
"5.2(7f)",
44+
"6.0(4c)",
45+
script.FAIL_O,
46+
[
47+
["103", "191.1.1.153/24", "0.0.0.0"],
48+
]
49+
),
50+
# Current version is affected, Target version = 6.0(4c), invalid both data
51+
(
52+
{
53+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_addr_and_gw_config.json"),
54+
},
55+
"5.2(7f)",
56+
"6.0(4c)",
57+
script.FAIL_O,
58+
[
59+
["103", "0.0.0.0", "0.0.0.0"],
60+
]
61+
),
62+
# Current version is affected, Target version > 6.0(4c), valid data
63+
(
64+
{
65+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_valid_config.json"),
66+
},
67+
"5.2(7f)",
68+
"6.0(8f)",
69+
script.PASS,
70+
[]
71+
),
72+
# Current version is affected, Target version > 6.0(4c), invalid address
73+
(
74+
{
75+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_address_config.json"),
76+
},
77+
"5.2(7f)",
78+
"6.0(5h)",
79+
script.FAIL_O,
80+
[
81+
["103", "0.0.0.0", "191.1.1.1"],
82+
]
83+
),
84+
# Current version is affected, Target version > 6.0(4c), invalid gateway
85+
(
86+
{
87+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_gateway_config.json"),
88+
},
89+
"5.2(7f)",
90+
"6.0(5j)",
91+
script.FAIL_O,
92+
[
93+
["103", "191.1.1.153/24", "0.0.0.0"],
94+
]
95+
),
96+
# Current version is affected, Target version > 6.0(4c), invalid both data
97+
(
98+
{
99+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_addr_and_gw_config.json"),
100+
},
101+
"5.2(7f)",
102+
"6.0(6c)",
103+
script.FAIL_O,
104+
[
105+
["103", "0.0.0.0", "0.0.0.0"],
106+
]
107+
),
108+
# Current version is affected, Target version < 6.0(4c), invalid both data
109+
(
110+
{
111+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_addr_and_gw_config.json"),
112+
},
113+
"5.2(7f)",
114+
"6.0(3g)",
115+
script.NA,
116+
[]
117+
),
118+
# Current version is affected, Target version < 6.0(4c), valid both data
119+
(
120+
{
121+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_valid_config.json"),
122+
},
123+
"5.2(7f)",
124+
"6.0(3g)",
125+
script.NA,
126+
[]
127+
),
128+
# Current version is not affected, Target version = 6.0(4c), invalid both data
129+
(
130+
{
131+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_addr_and_gw_config.json"),
132+
},
133+
"5.3(2f)",
134+
"6.0(4c)",
135+
script.NA,
136+
[]
137+
),
138+
# Current version is not affected, Target version > 6.0(4c), invalid both data
139+
(
140+
{
141+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_addr_and_gw_config.json"),
142+
},
143+
"5.3(2f)",
144+
"6.0(6c)",
145+
script.NA,
146+
[]
147+
),
148+
# Current version is not affected, Target version < 6.0(4c), invalid both data
149+
(
150+
{
151+
mgmtRsInBStNode: read_data(dir, "mgmtRsInBStNode_invalid_addr_and_gw_config.json"),
152+
},
153+
"5.3(2f)",
154+
"6.0(3g)",
155+
script.NA,
156+
[]
157+
),
158+
],
159+
)
160+
def test_logic(run_check, mock_icurl, cversion, tversion, expected_result, expected_data):
161+
result = run_check(cversion=script.AciVersion(cversion), tversion=script.AciVersion(tversion))
162+
assert result.result == expected_result
163+
assert result.data == expected_data
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"moCount": {
4+
"attributes": {
5+
"childAction": "",
6+
"count": "3",
7+
"dn": "",
8+
"status": ""
9+
}
10+
}
11+
}
12+
]

0 commit comments

Comments
 (0)