Skip to content

Commit 19a2a49

Browse files
committed
issue NewValidation: CSCwq28721
Fixes #316 fixed
1 parent 128ab55 commit 19a2a49

6 files changed

Lines changed: 383 additions & 0 deletions

File tree

aci-preupgrade-validation-script.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6025,6 +6025,41 @@ def apic_downgrade_compat_warning_check(cversion, tversion, **kwargs):
60256025

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

6028+
@check_wrapper(check_title="NTP Server BD SVI Check")
6029+
def ntp_server_bd_svi_check(cversion, tversion, **kargs):
6030+
result = FAIL_UF
6031+
headers = ["Fabric Time Pol", "NTP Pol Name"]
6032+
data = []
6033+
recommended_action = 'Use the in-band or out-of-band management IP address of the leaf switch as the NTP server IP address.'
6034+
doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#ntp-server-bd-svi"
6035+
6036+
if not tversion:
6037+
return Result(result=MANUAL, msg=TVER_MISSING)
6038+
6039+
if cversion.older_than("6.1(1f)") or cversion.newer_than("6.1(5e)"):
6040+
return Result(result=NA, msg='Version not affected')
6041+
6042+
if tversion.older_than("6.1(1f)") or tversion.newer_than("6.1(5e)"):
6043+
return Result(result=NA, msg='Version not affected')
6044+
6045+
fabric_time_pols = icurl('class', 'fabricRsTimePol.json')
6046+
datetime_pols = icurl('class', 'datetimePol.json')
6047+
6048+
fabric_time_pol_regex = r'uni/fabric/funcprof/podpgrp-(?P<podgroup>[^/]+)/rsTimePol'
6049+
for datetime_pol in datetime_pols:
6050+
for fabric_time_pol in fabric_time_pols:
6051+
if (
6052+
datetime_pol['datetimePol']['attributes']['dn'] == fabric_time_pol['fabricRsTimePol']['attributes']['tDn']
6053+
) and(
6054+
datetime_pol['datetimePol']['attributes']['serverState'] == 'enabled'
6055+
):
6056+
fp = re.search(fabric_time_pol_regex, fabric_time_pol['fabricRsTimePol']['attributes']['dn'])
6057+
data.append([fp.group("podgroup"), datetime_pol['datetimePol']['attributes']['name']])
6058+
6059+
if not data:
6060+
result = PASS
6061+
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
6062+
60286063

60296064
# ---- Script Execution ----
60306065

@@ -6188,6 +6223,7 @@ class CheckManager:
61886223
standby_sup_sync_check,
61896224
isis_database_byte_check,
61906225
configpush_shard_check,
6226+
ntp_server_bd_svi_check,
61916227

61926228
]
61936229
ssh_checks = [

docs/docs/validations.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ Items | Defect | This Script
193193
[Stale pconsRA Object][d26] | CSCwp22212 | :warning:{title="Deprecated"} | :no_entry_sign:
194194
[ISIS DTEPs Byte Size][d27] | CSCwp15375 | :white_check_mark: | :no_entry_sign:
195195
[Policydist configpushShardCont Crash][d28] | CSCwp95515 | :white_check_mark: |
196+
[NTP Server BD SVI][d25] | CSCwp92030 | :white_check_mark: | :no_entry_sign:
197+
196198

197199
[d1]: #ep-announce-compatibility
198200
[d2]: #eventmgr-db-size-defect-susceptibility
@@ -222,6 +224,7 @@ Items | Defect | This Script
222224
[d26]: #stale-pconsra-object
223225
[d27]: #isis-dteps-byte-size
224226
[d28]: #policydist-configpushshardcont-crash
227+
[d29]: #ntp-server-bd-svi
225228

226229

227230
## General Check Details
@@ -2648,6 +2651,15 @@ Due to [CSCwp95515][59], upgrading to an affected version while having any `conf
26482651
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.
26492652

26502653

2654+
#### NTP Server BD SVI
2655+
2656+
In ACI, Leaf Switches can be configured as NTP servers, allowing Endpoints in ACI to act as NTP clients and sync their datetime with the Fabric. The Leaf switch uses it's BD SVI IP address to send NTP traffic.
2657+
2658+
Due to [CSCwp92030][62], after a policy upgrade NTP can stop working between Endpoint clients and NTP Server (ACI Leaf), Client reach the NTP server by it's BD SVI IP address, but the server replies on a Loopback address.
2659+
2660+
If you see the check alerting about Datetime Policies, apply the workaround to prevent NTP issues post-upgrade.
2661+
2662+
26512663
[0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script
26522664
[1]: https://www.cisco.com/c/dam/en/us/td/docs/Website/datacenter/apicmatrix/index.html
26532665
[2]: https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-release-notes-list.html
@@ -2710,3 +2722,4 @@ If any instances of `configpushShardCont` are flagged by this script, Cisco TAC
27102722
[59]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp95515
27112723
[60]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#Inter
27122724
[61]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#EnablePolicyCompression
2725+
[62]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp92030
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
[
2+
{
3+
"datetimePol": {
4+
"attributes": {
5+
"StratumValue": "8",
6+
"adminSt": "disabled",
7+
"annotation": "",
8+
"authSt": "disabled",
9+
"childAction": "",
10+
"configIssues": "",
11+
"descr": "",
12+
"dn": "uni/fabric/time-default",
13+
"extMngdBy": "",
14+
"lcOwn": "local",
15+
"masterMode": "disabled",
16+
"modTs": "2026-02-03T15:12:35.361-06:00",
17+
"monPolDn": "uni/fabric/monfab-default",
18+
"name": "default",
19+
"nameAlias": "",
20+
"ownerKey": "",
21+
"ownerTag": "",
22+
"rn": "time-default",
23+
"serverState": "disabled",
24+
"status": "",
25+
"uid": "0",
26+
"userdom": ""
27+
}
28+
}
29+
},
30+
{
31+
"datetimePol": {
32+
"attributes": {
33+
"StratumValue": "8",
34+
"adminSt": "enabled",
35+
"annotation": "",
36+
"authSt": "disabled",
37+
"childAction": "",
38+
"configIssues": "",
39+
"descr": "NTP for fabric in Vercruz",
40+
"dn": "uni/fabric/time-fabric_ntp",
41+
"extMngdBy": "",
42+
"lcOwn": "local",
43+
"masterMode": "disabled",
44+
"modTs": "2026-02-03T15:12:35.361-06:00",
45+
"monPolDn": "uni/fabric/monfab-default",
46+
"name": "fabric_ntp",
47+
"nameAlias": "",
48+
"ownerKey": "",
49+
"ownerTag": "",
50+
"rn": "time-fabric_ntp",
51+
"serverState": "disabled",
52+
"status": "",
53+
"uid": "23653",
54+
"userdom": ""
55+
}
56+
}
57+
},
58+
{
59+
"datetimePol": {
60+
"attributes": {
61+
"StratumValue": "8",
62+
"adminSt": "enabled",
63+
"annotation": "",
64+
"authSt": "disabled",
65+
"childAction": "",
66+
"configIssues": "",
67+
"descr": "",
68+
"dn": "uni/fabric/time-calo-NTP",
69+
"extMngdBy": "",
70+
"lcOwn": "local",
71+
"masterMode": "disabled",
72+
"modTs": "2023-01-02T10:36:19.837-06:00",
73+
"monPolDn": "uni/fabric/monfab-default",
74+
"name": "calo-NTP",
75+
"nameAlias": "",
76+
"ownerKey": "",
77+
"ownerTag": "",
78+
"rn": "time-calo-NTP",
79+
"serverState": "disabled",
80+
"status": "",
81+
"uid": "15374",
82+
"userdom": ":all:"
83+
}
84+
}
85+
}
86+
]
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
[
2+
{
3+
"datetimePol": {
4+
"attributes": {
5+
"StratumValue": "8",
6+
"adminSt": "disabled",
7+
"annotation": "",
8+
"authSt": "disabled",
9+
"childAction": "",
10+
"configIssues": "",
11+
"descr": "",
12+
"dn": "uni/fabric/time-default",
13+
"extMngdBy": "",
14+
"lcOwn": "local",
15+
"masterMode": "disabled",
16+
"modTs": "2026-02-03T15:12:35.361-06:00",
17+
"monPolDn": "uni/fabric/monfab-default",
18+
"name": "default",
19+
"nameAlias": "",
20+
"ownerKey": "",
21+
"ownerTag": "",
22+
"rn": "time-default",
23+
"serverState": "disabled",
24+
"status": "",
25+
"uid": "0",
26+
"userdom": ""
27+
}
28+
}
29+
},
30+
{
31+
"datetimePol": {
32+
"attributes": {
33+
"StratumValue": "8",
34+
"adminSt": "enabled",
35+
"annotation": "",
36+
"authSt": "disabled",
37+
"childAction": "",
38+
"configIssues": "",
39+
"descr": "NTP for fabric in Vercruz",
40+
"dn": "uni/fabric/time-fabric_ntp",
41+
"extMngdBy": "",
42+
"lcOwn": "local",
43+
"masterMode": "disabled",
44+
"modTs": "2026-02-03T15:12:35.361-06:00",
45+
"monPolDn": "uni/fabric/monfab-default",
46+
"name": "fabric_ntp",
47+
"nameAlias": "",
48+
"ownerKey": "",
49+
"ownerTag": "",
50+
"rn": "time-fabric_ntp",
51+
"serverState": "enabled",
52+
"status": "",
53+
"uid": "23653",
54+
"userdom": ""
55+
}
56+
}
57+
},
58+
{
59+
"datetimePol": {
60+
"attributes": {
61+
"StratumValue": "8",
62+
"adminSt": "enabled",
63+
"annotation": "",
64+
"authSt": "disabled",
65+
"childAction": "",
66+
"configIssues": "",
67+
"descr": "",
68+
"dn": "uni/fabric/time-calo-NTP",
69+
"extMngdBy": "",
70+
"lcOwn": "local",
71+
"masterMode": "disabled",
72+
"modTs": "2023-01-02T10:36:19.837-06:00",
73+
"monPolDn": "uni/fabric/monfab-default",
74+
"name": "calo-NTP",
75+
"nameAlias": "",
76+
"ownerKey": "",
77+
"ownerTag": "",
78+
"rn": "time-calo-NTP",
79+
"serverState": "disabled",
80+
"status": "",
81+
"uid": "15374",
82+
"userdom": ":all:"
83+
}
84+
}
85+
}
86+
]
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[
2+
{
3+
"fabricRsTimePol": {
4+
"attributes": {
5+
"annotation": "",
6+
"childAction": "",
7+
"dn": "uni/fabric/funcprof/podpgrp-calo-d-polGrp/rsTimePol",
8+
"extMngdBy": "",
9+
"forceResolve": "yes",
10+
"lcOwn": "local",
11+
"modTs": "2023-01-02T10:36:41.882-06:00",
12+
"monPolDn": "uni/fabric/monfab-default",
13+
"rType": "mo",
14+
"rn": "rsTimePol",
15+
"state": "formed",
16+
"stateQual": "none",
17+
"status": "",
18+
"tCl": "datetimePol",
19+
"tContextDn": "",
20+
"tDn": "uni/fabric/time-calo-NTP",
21+
"tRn": "time-calo-NTP",
22+
"tType": "name",
23+
"tnDatetimePolName": "calo-NTP",
24+
"uid": "0",
25+
"userdom": "all"
26+
}
27+
}
28+
},
29+
{
30+
"fabricRsTimePol": {
31+
"attributes": {
32+
"annotation": "",
33+
"childAction": "",
34+
"dn": "uni/fabric/funcprof/podpgrp-PodPolicy-Fabric/rsTimePol",
35+
"extMngdBy": "",
36+
"forceResolve": "yes",
37+
"lcOwn": "local",
38+
"modTs": "2026-02-03T15:12:35.361-06:00",
39+
"monPolDn": "uni/fabric/monfab-default",
40+
"rType": "mo",
41+
"rn": "rsTimePol",
42+
"state": "formed",
43+
"stateQual": "none",
44+
"status": "",
45+
"tCl": "datetimePol",
46+
"tContextDn": "",
47+
"tDn": "uni/fabric/time-fabric_ntp",
48+
"tRn": "time-fabric_ntp",
49+
"tType": "name",
50+
"tnDatetimePolName": "fabric_ntp",
51+
"uid": "0",
52+
"userdom": ""
53+
}
54+
}
55+
}
56+
]

0 commit comments

Comments
 (0)