Skip to content

Commit a6d65c2

Browse files
authored
Merge branch 'v4.1.0-dev' into dhaselva/F0467
2 parents 6f07e2c + 69d6a4b commit a6d65c2

12 files changed

Lines changed: 396 additions & 5 deletions

aci-preupgrade-validation-script.py

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6292,6 +6292,53 @@ def multipod_modular_spine_bootscript_check(tversion, fabric_nodes, username, pa
62926292

62936293
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
62946294

6295+
6296+
@check_wrapper(check_title="Inband Management Policy Misconfiguration")
6297+
def inband_management_policy_misconfig_check(cversion, tversion, **kwargs):
6298+
result = PASS
6299+
headers = ["Node_ID", "Address", "Gateway"]
6300+
data = []
6301+
recommended_action = "Contact Cisco TAC to remove any identified misconfigured 'mgmtRsInBStNode' objects"
6302+
doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#inband-management-policy-misconfiguration"
6303+
6304+
if (cversion.older_than("5.2(8d)")) and (tversion.newer_than("6.0(4c)") or tversion.same_as("6.0(4c)")):
6305+
mgmtRsInBStNodes = icurl('class', 'mgmtRsInBStNode.json?query-target-filter=or(eq(mgmtRsInBStNode.addr,"0.0.0.0"),eq(mgmtRsInBStNode.gw,"0.0.0.0"))')
6306+
for mgmtRsInBStNode in mgmtRsInBStNodes:
6307+
attrs = mgmtRsInBStNode["mgmtRsInBStNode"]["attributes"]
6308+
addr = attrs['addr']
6309+
gw = attrs['gw']
6310+
node_match = re.search(node_regex, attrs['dn'])
6311+
node_id = node_match.group("node")
6312+
data.append([node_id, addr, gw])
6313+
else:
6314+
return Result(result=NA, msg=VER_NOT_AFFECTED)
6315+
if data:
6316+
result = FAIL_O
6317+
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
6318+
6319+
6320+
@check_wrapper(check_title="svccore excessive data check")
6321+
def svccore_excessive_data_check(**kwargs):
6322+
result = PASS
6323+
headers = ['Class Name','Count']
6324+
data = []
6325+
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."
6326+
doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#svccore-excessive-data-check"
6327+
try:
6328+
svccoreCtrlr_classes_count = icurl('class', 'svccoreCtrlr.json?query-target=self&rsp-subtree-include=count')
6329+
svccoreNode_classes_count = icurl('class', 'svccoreNode.json?query-target=self&rsp-subtree-include=count')
6330+
6331+
if int(svccoreCtrlr_classes_count[0]['moCount']['attributes']['count']) > 240:
6332+
data.append(['svccoreCtrlr', svccoreCtrlr_classes_count[0]['moCount']['attributes']['count']])
6333+
if int(svccoreNode_classes_count[0]['moCount']['attributes']['count']) > 240:
6334+
data.append(['svccoreNode', svccoreNode_classes_count[0]['moCount']['attributes']['count']])
6335+
if data:
6336+
result = MANUAL
6337+
6338+
return Result(result=result,headers=headers,data=data,recommended_action=recommended_action,doc_url=doc_url)
6339+
except Exception as e:
6340+
return Result(result=ERROR, msg="Error occurred while fetching svccore object counts: {}".format(str(e)), doc_url=doc_url)
6341+
62956342

62966343
@check_wrapper(check_title='BGP Timer Policy Already Existing (F0467 bgpProt-policy-already-existing)')
62976344
def bgpProto_timer_policy_already_existing_check(tversion, **kwargs):
@@ -6419,6 +6466,7 @@ class CheckManager:
64196466
validate_32_64_bit_image_check,
64206467
fabric_link_redundancy_check,
64216468
apic_downgrade_compat_warning_check,
6469+
svccore_excessive_data_check,
64226470

64236471
# Faults
64246472
apic_disk_space_faults_check,
@@ -6496,7 +6544,9 @@ class CheckManager:
64966544
configpush_shard_check,
64976545
auto_firmware_update_on_switch_check,
64986546
rogue_ep_coop_exception_mac_check,
6499-
n9k_c9408_model_lem_count_check,
6547+
n9k_c9408_model_lem_count_check,
6548+
n9k_c9408_model_lem_count_check,
6549+
inband_management_policy_misconfig_check,
65006550
bgpProto_timer_policy_already_existing_check,
65016551
]
65026552
ssh_checks = [

docs/docs/validations.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ 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+
[Svccore Excessive Data Check][g20] | :white_check_mark: | :no_entry_sign:
4041

4142
[g1]: #compatibility-target-aci-version
4243
[g2]: #compatibility-cimc-version
@@ -57,6 +58,7 @@ Items | This Script
5758
[g17]: #fabric-link-redundancy
5859
[g18]: #apic-database-size
5960
[g19]: #apic-downgrade-compatibility-when-crossing-62-release
61+
[g20]: #svccore-excessive-data-check
6062

6163
### Fault Checks
6264
Items | Faults | This Script | APIC built-in
@@ -199,7 +201,8 @@ Items | Defect | This Script
199201
[Rogue EP Exception List missing on switches][d30] | CSCwp64296 | :white_check_mark: | :no_entry_sign:
200202
[N9K-C9408 with more than 5 N9K-X9400-16W LEMs][d31] | CSCws82819 | :white_check_mark: | :no_entry_sign:
201203
[Multi-Pod Modular Spine Bootscript File][d32] | CSCwr66848 | :white_check_mark: | :no_entry_sign:
202-
[BgpProto timer policy already existing][d33] | CSCwt78235 | :white_check_mark: | :no_entry_sign:
204+
[Inband Management Policy Misconfiguration][d33]| CSCwd40071 | :white_check_mark: | :no_entry_sign:
205+
[BgpProto timer policy already existing][d34] | CSCwt78235 | :white_check_mark: | :no_entry_sign:
203206

204207
[d1]: #ep-announce-compatibility
205208
[d2]: #eventmgr-db-size-defect-susceptibility
@@ -233,7 +236,8 @@ 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
236-
[d33]: #bgpProto-timer-policy-already-existing
239+
[d33]: #inband-management-policy-misconfiguration
240+
[d34]: #bgpProto-timer-policy-already-existing
237241

238242
## General Check Details
239243

@@ -2756,9 +2760,37 @@ This issue happens only when the target version is specifically 6.1(4h).
27562760
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.
27572761

27582762

2763+
### Inband Management Policy Misconfiguration
2764+
2765+
Due to the defect [CSCwh80837][67], starting from version 6.0(4c), mgmtRsInBStNode policy get modified in leaf/spine during Apic upgrade.
2766+
2767+
Impact:
2768+
2769+
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].
2770+
2771+
The invalid configuration occurs when mgmtRsInBStNode has "0.0.0.0" values ( with or without mask) for either the "addr" or "gw" fields.
2772+
2773+
Suggestion:
2774+
2775+
Contact Cisco TAC to remove any identified misconfigured objects before performing the upgrade to prevent policyelem crashes.
2776+
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].
2777+
2778+
2779+
### Svccore Excessive Data Check
2780+
2781+
Due to excessive `svccoreCtrlr` or `svccoreNode` managed objects, Apic gui stuck in loading multiple queries.
2782+
2783+
The svccoreCtrlr and svccoreNode objects represent core files related to Apic and Leaf/Spines process respectively.
2784+
2785+
Due to [CSCws84232][69], the APIC GUI may become unresponsive after login, with dashboards stuck in a continuous “Loading…”state.
2786+
Administrators may be unable to access or operate the APIC GUI, potentially impacting day-to-day management or upgrade.
2787+
2788+
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.
2789+
2790+
27592791
### BgpProto Timer Policy Already Existing
27602792

2761-
This bug [CSCwt78235][67] validates `F0467` faults where `changeSet` contains 'bgpProt-policy-already-existing'. The fault indicates conflicting BGP protocol timer policy under an L3Outs deployed in same vrf under same node. If this fault is not resolved, l3out will not be programmed properly in the leaf after the upgrade.
2793+
This bug [CSCwt78235][70] validates `F0467` faults where `changeSet` contains 'bgpProt-policy-already-existing'. The fault indicates conflicting BGP protocol timer policy under an L3Outs deployed in same vrf under same node. If this fault is not resolved, l3out will not be programmed properly in the leaf after the upgrade.
27622794

27632795

27642796
[0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script
@@ -2828,4 +2860,7 @@ This bug [CSCwt78235][67] validates `F0467` faults where `changeSet` contains 'b
28282860
[64]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp64296
28292861
[65]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCws82819
28302862
[66]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwr66848
2831-
[67]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwt78235
2863+
[67]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwh80837
2864+
[68]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwd40071
2865+
[69]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCws84232
2866+
[70]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwt78235
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)