Skip to content

issue NewValidation: CSCwq28721#358

Open
jeestr4d wants to merge 1 commit into
v4.2.0-devfrom
issue316
Open

issue NewValidation: CSCwq28721#358
jeestr4d wants to merge 1 commit into
v4.2.0-devfrom
issue316

Conversation

@jeestr4d

Copy link
Copy Markdown
Collaborator

Fixes #316 fixed

Lab output:

[Check 84/90] NTP Server BD SVI Check...                                                                          FAIL - UPGRADE FAILURE!!
  Fabric Time Pol   NTP Pol Name
  ---------------   ------------
  PodPolicy-Fabric  fabric_ntp

  Recommended Action: Use the in-band or out-of-band management IP address of the leaf switch as the NTP server IP address.
  Reference Document: https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#ntp-server-bd-svi

Pytest output:

((ACI-PRE) ) jeestrad@JEESTRAD-M-L6VV ACI-Pre-Upgrade-Validation-Script % python3.12 -m pytest tests/checks/ntp_server_bd_svi_check
=============================================================================================================================================================================================================== test session starts ================================================================================================================================================================================================================
platform darwin -- Python 3.12.12, pytest-7.4.0, pluggy-1.2.0
rootdir: /Users/jeestrad/Documents/Python/pre-upgrade/ACI-Pre-Upgrade-Validation-Script
configfile: pytest.ini
collected 7 items                                                                                                                                                                                                                                                                                                                                                                                                                                  

tests/checks/ntp_server_bd_svi_check/test_ntp_server_bd_svi_check.py::test_logic[icurl_outputs0-6.1(1f)-None-MANUAL CHECK REQUIRED] 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ live log setup ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[17:34:07.500 INFO     init_system:6087(MainThread)] Cleaning up previous run files in preupgrade_validator_logs/
[17:34:07.500 INFO     init_system:6089(MainThread)] Creating directories preupgrade_validator_logs/ and preupgrade_validator_logs/json_results/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ live log call -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[17:34:07.501 INFO     init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
[17:34:07.502 INFO     _start_thread:1105(MainThread)] (ntp_server_bd_svi_check) Starting thread.
[17:34:07.502 INFO     wrapper:1349(ntp_server_bd_svi_check)] Start ntp_server_bd_svi_check
[17:34:07.502 INFO     update_result:1191(ntp_server_bd_svi_check)] Finalized result in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json

PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                       [ 14%]
tests/checks/ntp_server_bd_svi_check/test_ntp_server_bd_svi_check.py::test_logic[icurl_outputs1-6.0(1g)-6.0(9f)-N/A] 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ live log call -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[17:34:07.516 INFO     init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
[17:34:07.516 INFO     _start_thread:1105(MainThread)] (ntp_server_bd_svi_check) Starting thread.
[17:34:07.516 INFO     wrapper:1349(ntp_server_bd_svi_check)] Start ntp_server_bd_svi_check--------------------| 0/1 checks completed
[17:34:07.517 INFO     update_result:1191(ntp_server_bd_svi_check)] Finalized result in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                       [ 28%]
tests/checks/ntp_server_bd_svi_check/test_ntp_server_bd_svi_check.py::test_logic[icurl_outputs2-6.1(5g)-6.0(9f)-N/A] 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ live log call -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[17:34:07.530 INFO     init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
[17:34:07.531 INFO     _start_thread:1105(MainThread)] (ntp_server_bd_svi_check) Starting thread.
[17:34:07.531 INFO     wrapper:1349(ntp_server_bd_svi_check)] Start ntp_server_bd_svi_check
[17:34:07.531 INFO     update_result:1191(ntp_server_bd_svi_check)] Finalized result in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                       [ 42%]
tests/checks/ntp_server_bd_svi_check/test_ntp_server_bd_svi_check.py::test_logic[icurl_outputs3-6.1(4g)-6.0(9f)-N/A] 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ live log call -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[17:34:07.545 INFO     init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
[17:34:07.545 INFO     _start_thread:1105(MainThread)] (ntp_server_bd_svi_check) Starting thread.--------------| 0/1 checks completed
[17:34:07.545 INFO     wrapper:1349(ntp_server_bd_svi_check)] Start ntp_server_bd_svi_check
[17:34:07.545 INFO     update_result:1191(ntp_server_bd_svi_check)] Finalized result in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                       [ 57%]
tests/checks/ntp_server_bd_svi_check/test_ntp_server_bd_svi_check.py::test_logic[icurl_outputs4-6.1(3g)-6.1(9f)-N/A] 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ live log call -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[17:34:07.557 INFO     init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
[17:34:07.557 INFO     _start_thread:1105(MainThread)] (ntp_server_bd_svi_check) Starting thread.--------------| 0/1 checks completed
[17:34:07.557 INFO     wrapper:1349(ntp_server_bd_svi_check)] Start ntp_server_bd_svi_check
[17:34:07.558 INFO     update_result:1191(ntp_server_bd_svi_check)] Finalized result in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                       [ 71%]
tests/checks/ntp_server_bd_svi_check/test_ntp_server_bd_svi_check.py::test_logic[icurl_outputs5-6.1(2g)-6.1(5d)-PASS] 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ live log call -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[17:34:07.571 INFO     init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
[17:34:07.572 INFO     _start_thread:1105(MainThread)] (ntp_server_bd_svi_check) Starting thread.--------------| 0/1 checks completed
[17:34:07.572 INFO     wrapper:1349(ntp_server_bd_svi_check)] Start ntp_server_bd_svi_check
[17:34:07.572 INFO     update_result:1191(ntp_server_bd_svi_check)] Finalized result in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                       [ 85%]
tests/checks/ntp_server_bd_svi_check/test_ntp_server_bd_svi_check.py::test_logic[icurl_outputs6-6.1(2g)-6.1(5d)-FAIL - UPGRADE FAILURE!!] 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ live log call -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[17:34:07.584 INFO     init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
[17:34:07.584 INFO     _start_thread:1105(MainThread)] (ntp_server_bd_svi_check) Starting thread.--------------| 0/1 checks completed
[17:34:07.584 INFO     wrapper:1349(ntp_server_bd_svi_check)] Start ntp_server_bd_svi_check
[17:34:07.584 INFO     update_result:1191(ntp_server_bd_svi_check)] Finalized result in preupgrade_validator_logs/json_results/ntp_server_bd_svi_check.json
PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                       [100%]

================================================================================================================================================================================================================ 7 passed in 0.10s =================================================================================================================================================================================================================

@monrog2 monrog2 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested changes focus on validation correctness for CSCwp92030 (the canonical defect for duplicate CSCwq28721), Result semantics, and documentation wiring.

if not tversion:
return Result(result=MANUAL, msg=TVER_MISSING)

if cversion.older_than("6.1(1f)") or cversion.newer_than("6.1(5e)"):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Blocking] Vulnerable target upgrades are skipped. Requiring the current version to already be within 6.1(1f)-6.1(5e) makes an upgrade such as 6.0(9f) -> 6.1(1f) return N/A, even though the destination is affected. Gate applicability on the authoritative target-version range (and any actual upgrade-path constraints), and add a crossing-boundary test.


@check_wrapper(check_title="NTP Server BD SVI Check")
def ntp_server_bd_svi_check(cversion, tversion, **kargs):
result = FAIL_UF

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Blocking] Use outage severity. CSCwp92030 causes loss of NTP service after the upgrade; it does not prevent the upgrade itself. Please use FAIL_O rather than FAIL_UF so result summaries and customer guidance represent the risk correctly, and update the positive test expectation.

fp = re.search(fabric_time_pol_regex, fabric_time_pol['fabricRsTimePol']['attributes']['dn'])
data.append([fp.group("podgroup"), datetime_pol['datetimePol']['attributes']['name']])

if not data:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[High] Do not turn missing required inventory into PASS. If the datetimePol query unexpectedly returns no objects, data remains empty and this reports success even though APIC should at least have the default policy. Validate the required inventory separately and return ERROR for an incomplete response; retain PASS for a valid inventory with no enabled matching policy. Add an empty-datetimePol test.

fabric_time_pol_regex = r'uni/fabric/funcprof/podpgrp-(?P<podgroup>[^/]+)/rsTimePol'
for datetime_pol in datetime_pols:
for fabric_time_pol in fabric_time_pols:
if (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[High] Validate the complete defect trigger. The CSCwp92030 conditions require multiple BDs/IPs in the relevant VRF, but this logic flags every enabled leaf NTP-server policy without examining BD/VRF topology. That produces outage failures where the documented trigger is absent. Please detect the complete condition, or reconcile the intended scope and documentation with the canonical defect before failing the check.

Comment thread docs/docs/validations.md
[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: |
[NTP Server BD SVI][d25] | CSCwp92030 | :white_check_mark: | :no_entry_sign:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] This row links to the wrong validation. [d25] resolves to #observer-database-size; the NTP anchor added below is [d29]. Please change this reference to [d29].

@monrog2
monrog2 changed the base branch from master to v4.2.0-dev July 23, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NewValidation: CSCwq28721

2 participants