-
Notifications
You must be signed in to change notification settings - Fork 48
NewValidation for CSCwp91797 #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v4.2.0-dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5558,6 +5558,33 @@ def configpush_shard_check(tversion, **kwargs): | |
|
|
||
| return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url) | ||
|
|
||
| @check_wrapper(check_title='Port Tracking Minimal Uplink Zero') | ||
| def port_tracking_active_fabric_port_check(tversion, **kwargs): | ||
| result = NA | ||
| headers = ["Admin State", "Port Tracking Active Fabric Ports"] | ||
| data = [] | ||
| recommended_action = 'Increase Port Tracking Active Fabric Ports to 1 before upgrade' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [High] Recommended change omits its safety prerequisite The authoritative CSCwp91797 guidance makes |
||
| doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#port-tracking-active-fabric-port-zero' | ||
|
|
||
| if not tversion: | ||
| return Result(result=MANUAL, msg=TVER_MISSING) | ||
|
|
||
| if tversion.same_as("6.0(9d)"): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Blocking] Confirmed affected releases are classified N/A This exact-version gate skips |
||
| result = PASS | ||
| port_tracking_api = 'uni/infra/trackEqptFabP-default.json' | ||
| port_tracking_mo = icurl('mo', port_tracking_api) | ||
| if port_tracking_mo: | ||
| admin_st = port_tracking_mo[0]['infraPortTrackPol']['attributes']['adminSt'] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Blocking] Empty policy response produces a false PASS
|
||
| minimal_uplink = port_tracking_mo[0]['infraPortTrackPol']['attributes']['minlinks'] | ||
| if admin_st == "on" and minimal_uplink == "0": | ||
| data.append([admin_st,minimal_uplink]) | ||
| else: | ||
| return Result(result=NA, msg=VER_NOT_AFFECTED) | ||
| if data: | ||
| result = FAIL_O | ||
|
|
||
| return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url) | ||
|
|
||
| # ---- Script Execution ---- | ||
|
|
||
|
|
||
|
|
@@ -5719,6 +5746,7 @@ def get_checks(api_only, debug_function): | |
| standby_sup_sync_check, | ||
| isis_database_byte_check, | ||
| configpush_shard_check, | ||
| port_tracking_active_fabric_port_check, | ||
|
|
||
| ] | ||
| conn_checks = [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "totalCount": "1", | ||
| "imdata": [ | ||
| { | ||
| "infraPortTrackPol": { | ||
| "attributes": { | ||
| "adminSt": "off", | ||
| "annotation": "", | ||
| "childAction": "", | ||
| "delay": "120", | ||
| "descr": "", | ||
| "dn": "uni/infra/trackEqptFabP-default", | ||
| "extMngdBy": "", | ||
| "includeApicPorts": "no", | ||
| "lcOwn": "local", | ||
| "minlinks": "0", | ||
| "modTs": "2025-10-31T17:13:46.220+11:00", | ||
| "name": "default", | ||
| "nameAlias": "", | ||
| "ownerKey": "", | ||
| "ownerTag": "", | ||
| "rn": "trackEqptFabP-default", | ||
| "status": "", | ||
| "uid": "0", | ||
| "userdom": "all" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "totalCount": "1", | ||
| "imdata": [ | ||
| { | ||
| "infraPortTrackPol": { | ||
| "attributes": { | ||
| "adminSt": "on", | ||
| "annotation": "", | ||
| "childAction": "", | ||
| "delay": "120", | ||
| "descr": "", | ||
| "dn": "uni/infra/trackEqptFabP-default", | ||
| "extMngdBy": "", | ||
| "includeApicPorts": "no", | ||
| "lcOwn": "local", | ||
| "minlinks": "1", | ||
| "modTs": "2025-10-31T17:13:46.220+11:00", | ||
| "name": "default", | ||
| "nameAlias": "", | ||
| "ownerKey": "", | ||
| "ownerTag": "", | ||
| "rn": "trackEqptFabP-default", | ||
| "status": "", | ||
| "uid": "0", | ||
| "userdom": "all" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "totalCount": "1", | ||
| "imdata": [ | ||
| { | ||
| "infraPortTrackPol": { | ||
| "attributes": { | ||
| "adminSt": "on", | ||
| "annotation": "", | ||
| "childAction": "", | ||
| "delay": "120", | ||
| "descr": "", | ||
| "dn": "uni/infra/trackEqptFabP-default", | ||
| "extMngdBy": "", | ||
| "includeApicPorts": "no", | ||
| "lcOwn": "local", | ||
| "minlinks": "0", | ||
| "modTs": "2025-10-31T17:13:46.220+11:00", | ||
| "name": "default", | ||
| "nameAlias": "", | ||
| "ownerKey": "", | ||
| "ownerTag": "", | ||
| "rn": "trackEqptFabP-default", | ||
| "status": "", | ||
| "uid": "0", | ||
| "userdom": "all" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } |
| 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__)) | ||
| infra_port_track_pol_api = 'uni/infra/trackEqptFabP-default.json' | ||
| @pytest.mark.parametrize( | ||
| "icurl_outputs, tversion, expected_result", | ||
| [ | ||
| # tversion not given | ||
| ( | ||
| {infra_port_track_pol_api: []}, | ||
| None, | ||
| script.MANUAL, | ||
| ), | ||
| # tversion is not hit | ||
| ( | ||
| {infra_port_track_pol_api: []}, | ||
| "6.0(9e)", | ||
| script.NA, | ||
| ), | ||
| #adminSt is off. | ||
| ( | ||
| {infra_port_track_pol_api: read_data(dir, "infraPortTrackPol_neg.json")}, | ||
| "6.0(9d)", | ||
| script.PASS, | ||
| ), | ||
| #adminSt is on, but minlinks is not zero. | ||
| ( | ||
| {infra_port_track_pol_api: read_data(dir, "infraPortTrackPol_neg1.json")}, | ||
| "6.0(9d)", | ||
| script.PASS, | ||
| ), | ||
| #adminSt is on, and minlinks is zero. | ||
| ( | ||
| {infra_port_track_pol_api: read_data(dir, "infraPortTrackPol_pos.json")}, | ||
| "6.0(9d)", | ||
| script.FAIL_O, | ||
| ) | ||
| ], | ||
| ) | ||
|
|
||
| def test_logic(mock_icurl, tversion, expected_result): | ||
| tversion = script.AciVersion(tversion) if tversion else None | ||
| result = script.port_tracking_active_fabric_port_check(1, 1, tversion) | ||
| assert result == expected_result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Medium] No-vPC fabrics receive a false outage warning
CSCwp91797 affects vPC physical member ports, but this check does not consume the already available
vpc_node_ids. A fabric with no vPC can therefore receiveFAIL_Oand unnecessary remediation guidance. Acceptvpc_node_ids, returnN/Abefore querying when no vPC topology exists, and add tests for empty and populated vPC inventories.