Skip to content

Commit 69d6a4b

Browse files
Added validation for CSCws84232 (#334)
* Feat:added svccoreCtrlr excessive entries check * updated the formated json in svccore_negative.json * Removed other PR checks * Fix: svccoreNode mo check is updated * Fix:update the threshold to 240 * refactor:moved to general check * refactor:updated recommended action * refactor:optimise the check for get the count alone * refactor:added try catch exception for error handling * update the threshold value for 240 * refactor:query-target was added * refactor: removed unwanted spaces * refactor:removed unwanted spaces in validation.md * resolve conflict while rebasing * resolve conflict while rebasing * updated pytest script file * updated validation.md * addressed review comments * updated validation.md --------- Co-authored-by: takishida <38262981+takishida@users.noreply.github.com>
1 parent 217dbcb commit 69d6a4b

7 files changed

Lines changed: 130 additions & 2 deletions

File tree

aci-preupgrade-validation-script.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6292,7 +6292,7 @@ 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-
6295+
62966296
@check_wrapper(check_title="Inband Management Policy Misconfiguration")
62976297
def inband_management_policy_misconfig_check(cversion, tversion, **kwargs):
62986298
result = PASS
@@ -6317,6 +6317,29 @@ def inband_management_policy_misconfig_check(cversion, tversion, **kwargs):
63176317
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
63186318

63196319

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+
6342+
63206343
# ---- Script Execution ----
63216344

63226345

@@ -6408,6 +6431,7 @@ class CheckManager:
64086431
validate_32_64_bit_image_check,
64096432
fabric_link_redundancy_check,
64106433
apic_downgrade_compat_warning_check,
6434+
svccore_excessive_data_check,
64116435

64126436
# Faults
64136437
apic_disk_space_faults_check,

docs/docs/validations.md

Lines changed: 17 additions & 1 deletion
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
@@ -2770,6 +2772,19 @@ Suggestion:
27702772
Contact Cisco TAC to remove any identified misconfigured objects before performing the upgrade to prevent policyelem crashes.
27712773
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].
27722774

2775+
2776+
### Svccore Excessive Data Check
2777+
2778+
Due to excessive `svccoreCtrlr` or `svccoreNode` managed objects, Apic gui stuck in loading multiple queries.
2779+
2780+
The svccoreCtrlr and svccoreNode objects represent core files related to Apic and Leaf/Spines process respectively.
2781+
2782+
Due to [CSCws84232][67], the APIC GUI may become unresponsive after login, with dashboards stuck in a continuous “Loading…”state.
2783+
Administrators may be unable to access or operate the APIC GUI, potentially impacting day-to-day management or upgrade.
2784+
2785+
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.
2786+
2787+
27732788
[0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script
27742789
[1]: https://www.cisco.com/c/dam/en/us/td/docs/Website/datacenter/apicmatrix/index.html
27752790
[2]: https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-release-notes-list.html
@@ -2838,4 +2853,5 @@ The [CSCwd40071][68] defect affects versions 5.2(5c) and later with a fix availa
28382853
[65]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCws82819
28392854
[66]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwr66848
28402855
[67]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwh80837
2841-
[68]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwd40071
2856+
[68]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwd40071
2857+
[69]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCws84232
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+
]
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": "32000",
7+
"dn": "",
8+
"status": ""
9+
}
10+
}
11+
}
12+
]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 = "svccore_excessive_data_check"
11+
svccoreClassEntry = 'svccoreCtrlr.json?query-target=self&rsp-subtree-include=count'
12+
svccoreNodeEntry = 'svccoreNode.json?query-target=self&rsp-subtree-include=count'
13+
14+
@pytest.mark.parametrize(
15+
"icurl_outputs, expected_result",
16+
[
17+
# No excessive class entries
18+
(
19+
{svccoreClassEntry: read_data(dir, "svccore_negative.json"),svccoreNodeEntry: read_data(dir, "svccoreNode_negative.json")},
20+
script.PASS,
21+
),
22+
# Excessive class entries found
23+
(
24+
{svccoreClassEntry: read_data(dir, "svccore_positive.json"),svccoreNodeEntry: read_data(dir, "svccoreNode_negative.json")},
25+
script.MANUAL,
26+
),
27+
(
28+
{svccoreClassEntry: read_data(dir, "svccore_positive.json"),svccoreNodeEntry: read_data(dir, "svccoreNode_positive.json")},
29+
script.MANUAL,
30+
),
31+
(
32+
{svccoreClassEntry: read_data(dir, "svccore_negative.json"),svccoreNodeEntry: read_data(dir, "svccoreNode_positive.json")},
33+
script.MANUAL,
34+
)
35+
],
36+
)
37+
38+
def test_logic(run_check,mock_icurl,expected_result):
39+
result = run_check()
40+
assert result.result == expected_result
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+
]
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": "500",
7+
"dn": "",
8+
"status": ""
9+
}
10+
}
11+
}
12+
]

0 commit comments

Comments
 (0)