Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -6025,6 +6025,25 @@ def apic_downgrade_compat_warning_check(cversion, tversion, **kwargs):

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


@check_wrapper(check_title="svccoreCtrlr excessive entries check")
def svccoreCtrlr_excessive_entries_check(tversion, **kwargs):
result = PASS
headers = ['svccoreCtrlr Object Count']
data = []
recommended_action = "Contact Cisco TAC for Support before upgrade"
doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#svccoreCtrlr-excessive-entries-check"
if not tversion:
return Result(result=MANUAL, msg=TVER_MISSING)
if tversion.older_than("6.2(1h)") or tversion.same_as("6.2(1h)"):
svccore_classes = icurl('class', 'svccoreCtrlr.json')
if(len(svccore_classes) > 240):
data.append([len(svccore_classes)])
if data:
result = FAIL_O
return Result(result=result,headers=headers,data=data,recommended_action=recommended_action,doc_url=doc_url)
else:
return Result(result=NA, msg=VER_NOT_AFFECTED)

# ---- Script Execution ----

Expand Down Expand Up @@ -6114,6 +6133,7 @@ class CheckManager:
validate_32_64_bit_image_check,
fabric_link_redundancy_check,
apic_downgrade_compat_warning_check,
svccoreCtrlr_excessive_entries_check,

# Faults
apic_disk_space_faults_check,
Expand Down
14 changes: 14 additions & 0 deletions docs/docs/validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ Items | Defect | This Script
[Stale pconsRA Object][d26] | CSCwp22212 | :warning:{title="Deprecated"} | :no_entry_sign:
[ISIS DTEPs Byte Size][d27] | CSCwp15375 | :white_check_mark: | :no_entry_sign:
[Policydist configpushShardCont Crash][d28] | CSCwp95515 | :white_check_mark: |
[svccoreCtrlr excessive entries check][d30] | CSCws8423 | :white_check_mark: |

[d1]: #ep-announce-compatibility
[d2]: #eventmgr-db-size-defect-susceptibility
Expand Down Expand Up @@ -222,6 +223,7 @@ Items | Defect | This Script
[d26]: #stale-pconsra-object
[d27]: #isis-dteps-byte-size
[d28]: #policydist-configpushshardcont-crash
[d30]: #svccoreCtrlr-excessive-entries-check


## General Check Details
Expand Down Expand Up @@ -2648,6 +2650,17 @@ Due to [CSCwp95515][59], upgrading to an affected version while having any `conf
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.


### svccoreCtrlr excessive entries check

Due to excessive `svccoreCtrlr` or `svccoreNode` managed objects, queries are stuck in (pending) status.

Due to [CSCws84232][62], the APIC GUI may become unresponsive after login, with dashboards stuck in a continuous “Loading…”state.
Administrators may be unable to access or operate the APIC GUI, potentially impacting day-to-day management or upgrade.

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.



[0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script
[1]: https://www.cisco.com/c/dam/en/us/td/docs/Website/datacenter/apicmatrix/index.html
[2]: https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-release-notes-list.html
Expand Down Expand Up @@ -2710,3 +2723,4 @@ If any instances of `configpushShardCont` are flagged by this script, Cisco TAC
[59]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp95515
[60]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#Inter
[61]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#EnablePolicyCompression
[63]:https://bst.cloudapps.cisco.com/bugsearch/bug/CSCws84232
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import os
import pytest
import logging
import importlib
from helpers.utils import read_data

script = importlib.import_module("aci-preupgrade-validation-script")

log = logging.getLogger(__name__)
dir = os.path.dirname(os.path.abspath(__file__))
test_function = "svccoreCtrlr_excessive_entries_check"

# icurl queries
svccoreClassEntry = 'svccoreCtrlr.json'

@pytest.mark.parametrize(
"icurl_outputs, tversion, expected_result",
[
#tverson missing
(
{svccoreClassEntry: read_data(dir, "svccore_positive.json")},
None,
script.MANUAL
),
# tversion not applicable
(
{svccoreClassEntry: read_data(dir, "svccore_positive.json")},
"6.3(2h)",
script.NA,
),
# No excessive class entries
(
{svccoreClassEntry: read_data(dir, "svccore_positive.json")},
"5.2(8e)",
script.PASS,
),
# Excessive class entries found
(
{svccoreClassEntry: read_data(dir, "svccore_negative.json")},
"5.2(8e)",
script.FAIL_O,
),
],
)

def test_logic(run_check,mock_icurl,tversion,expected_result):
result = run_check(tversion = script.AciVersion(tversion) if tversion else None)
assert result.result == expected_result

Loading