Skip to content

Commit 6a2fe7f

Browse files
committed
Merge branch 'master' of github.com:datacenter/ACI-Pre-Upgrade-Validation-Script into v4.1.0-dev
2 parents e4defbf + 68f3673 commit 6a2fe7f

10 files changed

Lines changed: 632 additions & 6 deletions

aci-preupgrade-validation-script.py

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3015,25 +3015,29 @@ def apic_disk_space_faults_check(cversion, **kwargs):
30153015
doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#apic-disk-space-usage"
30163016
recommended_action = {
30173017
'/firmware': 'Remove unneeded images',
3018-
'/techsupport': 'Remove unneeded techsupports/cores'
3018+
'/techsupport': 'Remove unneeded techsupports/cores',
3019+
'/data/log': 'Remove unneeded logs in var/log/dme/log'
30193020
}
30203021
default_action = 'Contact Cisco TAC.'
30213022
if cversion.same_as('4.0(1h)') or cversion.older_than('3.2(6i)'):
30223023
default_action += ' A typical issue is CSCvn13119.'
30233024

30243025
dn_regex = node_regex + r'/.+p-\[(?P<mountpoint>.+)\]-f'
3025-
desc_regex = r'is (?P<usage>\d{2}%) full'
3026+
desc_regex = r'is (?P<usage>\d{2,3}%) full'
30263027

30273028
faultInsts = icurl('class',
30283029
'faultInst.json?query-target-filter=or(eq(faultInst.code,"F1527"),eq(faultInst.code,"F1528"),eq(faultInst.code,"F1529"))')
30293030
for faultInst in faultInsts:
3031+
lc = faultInst['faultInst']['attributes']['lc']
3032+
if lc not in ["raised", "soaking"]:
3033+
continue
30303034
fc = faultInst['faultInst']['attributes']['code']
30313035
dn = re.search(dn_regex, faultInst['faultInst']['attributes']['dn'])
30323036
desc = re.search(desc_regex, faultInst['faultInst']['attributes']['descr'])
30333037
if dn and desc:
30343038
data.append([fc, dn.group('pod'), dn.group('node'), dn.group('mountpoint'),
3035-
desc.group('usage'),
3036-
recommended_action.get(dn.group('mountpoint'), default_action)])
3039+
desc.group('usage'),
3040+
recommended_action.get(dn.group('mountpoint'), default_action)])
30373041
else:
30383042
unformatted_data.append([fc, faultInst['faultInst']['attributes']['dn'], default_action])
30393043
if not data and not unformatted_data:
@@ -6056,6 +6060,29 @@ def apic_downgrade_compat_warning_check(cversion, tversion, **kwargs):
60566060
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
60576061

60586062

6063+
@check_wrapper(check_title='Auto Firmware Update on Switch Discovery')
6064+
def auto_firmware_update_on_switch_check(cversion, tversion, **kwargs):
6065+
result = PASS
6066+
headers = ["Auto Firmware Update Status", "Default Firmware Version", "Upgrade Target Version"]
6067+
data = []
6068+
recommended_action = 'Disable Auto Firmware Update before the upgrade as a precaution. See the reference doc for details.'
6069+
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#auto-firmware-update-on-switch-discovery'
6070+
6071+
if not tversion or not cversion:
6072+
return Result(result=MANUAL, msg=TVER_MISSING)
6073+
6074+
if tversion.older_than("6.0(3a)") or (
6075+
cversion.newer_than("6.0(3a)") or (cversion.major1 == "5" and cversion.newer_than("5.2(8a)"))
6076+
):
6077+
return Result(result=NA, msg=VER_NOT_AFFECTED)
6078+
6079+
fwrepop = icurl("mo", "uni/fabric/fwrepop.json")
6080+
if fwrepop and fwrepop[0]["firmwareRepoP"]["attributes"]["enforceBootscriptVersionValidation"] == "yes":
6081+
data.append(["Enabled", fwrepop[0]["firmwareRepoP"]["attributes"]["defaultSwitchVersion"], str(tversion)])
6082+
result = MANUAL
6083+
6084+
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
6085+
60596086
# ---- Script Execution ----
60606087

60616088

@@ -6219,6 +6246,7 @@ class CheckManager:
62196246
standby_sup_sync_check,
62206247
isis_database_byte_check,
62216248
configpush_shard_check,
6249+
auto_firmware_update_on_switch_check,
62226250

62236251
]
62246252
ssh_checks = [

docs/docs/validations.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ Items | Defect | This Script
192192
[Observer Database Size][d25] | CSCvw45531 | :white_check_mark: | :no_entry_sign:
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:
195-
[Policydist configpushShardCont Crash][d28] | CSCwp95515 | :white_check_mark: |
195+
[Policydist configpushShardCont Crash][d28] | CSCwp95515 | :white_check_mark: | :no_entry_sign:
196+
[Auto Firmware Update on Switch Discovery][d29] | CSCwe83941 | :white_check_mark: | :no_entry_sign:
196197

197198
[d1]: #ep-announce-compatibility
198199
[d2]: #eventmgr-db-size-defect-susceptibility
@@ -222,7 +223,7 @@ Items | Defect | This Script
222223
[d26]: #stale-pconsra-object
223224
[d27]: #isis-dteps-byte-size
224225
[d28]: #policydist-configpushshardcont-crash
225-
226+
[d29]: #auto-firmware-update-on-switch-discovery
226227

227228
## General Check Details
228229

@@ -2647,6 +2648,25 @@ Due to [CSCwp95515][59], upgrading to an affected version while having any `conf
26472648

26482649
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.
26492650

2651+
### Auto Firmware Update on Switch Discovery
2652+
2653+
[Auto Firmware Update on Switch Discovery][63] automatically upgrades a new switch to the target firmware version before registering it to the ACI fabric. This feature activates in three scenarios:
2654+
2655+
* when adding a new switch to expand the fabric
2656+
* when replacing an existing switch
2657+
* when initializing and rediscovering an existing switch
2658+
2659+
It does not activate during regular upgrades initiated through the APIC.
2660+
2661+
Due to [CSCwe83941][62], if a new switch is running 6.0(1), 6.0(2) or any version older than 5.2(8), attempting to upgrade it to 6.0(3)+ using Auto Firmware Update will fail. The switch will become unusable until a manual recovery procedure is performed directly on the device.
2662+
2663+
While this issue does not occur during standard upgrades, it is important to be aware of the risk when your target version is 6.0(3) or newer and the switch is running 6.0(1), 6.0(2), or a version older than 5.2(8). Auto Firmware Update may get triggered and hit this issue during switch replacement in an upgrade window or if you need to re-initialize a switch after a failed upgrade.
2664+
2665+
To avoid this risk, consider disabling Auto Firmware Update before upgrading to 6.0(3)+ if any switches are running the affected older versions. In the future, ensure that any new switch is running a compatible version before re-enabling Auto Firmware Update and registering it to the fabric.
2666+
2667+
!!! note
2668+
This issue occurs because older switch firmware versions are not compatible with switch images 6.0(3) or newer. The APIC version is not a factor.
2669+
26502670

26512671
[0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script
26522672
[1]: https://www.cisco.com/c/dam/en/us/td/docs/Website/datacenter/apicmatrix/index.html
@@ -2710,3 +2730,5 @@ If any instances of `configpushShardCont` are flagged by this script, Cisco TAC
27102730
[59]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp95515
27112731
[60]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#Inter
27122732
[61]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#EnablePolicyCompression
2733+
[62]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwe83941
2734+
[63]: https://www.cisco.com/c/en/us/td/docs/dcn/aci/apic/all/apic-installation-aci-upgrade-downgrade/Cisco-APIC-Installation-ACI-Upgrade-Downgrade-Guide/m-auto-firmware-update.html
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
[
2+
{
3+
"faultInst": {
4+
"attributes": {
5+
"ack": "no",
6+
"alert": "no",
7+
"cause": "equipment-full",
8+
"changeSet": "available (Old: 1501496, New: 240908), capUtilized (Old: 29, New: 89), inodesFree (Old: 12148991, New: 12148990), inodesUsed (Old: 721, New: 722), used (Old: 595656, New: 1856244)",
9+
"childAction": "",
10+
"code": "F1529",
11+
"created": "2026-01-12T06:44:26.382+00:00",
12+
"delegated": "no",
13+
"descr": "Storage unit /data/log on Node 1 with hostname fab3-apic1 mounted at /data/log is 94% full",
14+
"dn": "topology/pod-1/node-1/sys/ch/p-[/data/log]-f-[tmpfs]/fault-F1529",
15+
"domain": "infra",
16+
"highestSeverity": "major",
17+
"lastTransition": "2026-01-12T06:44:26.382+00:00",
18+
"lc": "raised",
19+
"occur": "1",
20+
"origSeverity": "major",
21+
"prevSeverity": "major",
22+
"rule": "eqpt-storage-full-major",
23+
"severity": "major",
24+
"status": "",
25+
"subject": "equipment-full",
26+
"title": "",
27+
"type": "operational"
28+
}
29+
}
30+
},
31+
32+
33+
{
34+
"faultInst": {
35+
"attributes": {
36+
"ack": "no",
37+
"alert": "no",
38+
"cause": "equipment-full",
39+
"changeSet": "available (Old: 1501496, New: 240908), capUtilized (Old: 29, New: 89), inodesFree (Old: 12148991, New: 12148990), inodesUsed (Old: 721, New: 722), used (Old: 595656, New: 1856244)",
40+
"childAction": "",
41+
"code": "F1528",
42+
"created": "2026-01-12T06:44:26.382+00:00",
43+
"delegated": "no",
44+
"descr": "Storage unit /firmware on Node 1 with hostname fab3-apic1 mounted at /firmware is 89% full",
45+
"dn": "topology/pod-1/node-1/sys/ch/p-[/firmware]-f-[/dev/mapper/vg_ifc0-firmware]/fault-F1528",
46+
"domain": "infra",
47+
"highestSeverity": "major",
48+
"lastTransition": "2026-01-12T06:44:26.382+00:00",
49+
"lc": "soaking",
50+
"occur": "1",
51+
"origSeverity": "major",
52+
"prevSeverity": "major",
53+
"rule": "eqpt-storage-full-major",
54+
"severity": "major",
55+
"status": "",
56+
"subject": "equipment-full",
57+
"title": "",
58+
"type": "operational"
59+
}
60+
}
61+
},
62+
63+
{
64+
"faultInst": {
65+
"attributes": {
66+
"ack": "no",
67+
"alert": "no",
68+
"cause": "equipment-full",
69+
"changeSet": "available (Old: 1501496, New: 240908), capUtilized (Old: 29, New: 89), inodesFree (Old: 12148991, New: 12148990), inodesUsed (Old: 721, New: 722), used (Old: 595656, New: 1856244)",
70+
"childAction": "",
71+
"code": "F1528",
72+
"created": "2026-01-12T06:44:26.382+00:00",
73+
"delegated": "no",
74+
"descr": "Storage unit /techsupport on Node 1 with hostname fab3-apic1 mounted at /techsupport is 89% full",
75+
"dn": "topology/pod-1/node-1/sys/ch/p-[/techsupport]-f-[/dev/mapper/vg_ifc0-techsupport]/fault-F1528",
76+
"domain": "infra",
77+
"highestSeverity": "major",
78+
"lastTransition": "2026-01-12T06:44:26.382+00:00",
79+
"lc": "raised-clearing",
80+
"occur": "1",
81+
"origSeverity": "major",
82+
"prevSeverity": "major",
83+
"rule": "eqpt-storage-full-major",
84+
"severity": "major",
85+
"status": "",
86+
"subject": "equipment-full",
87+
"title": "",
88+
"type": "operational"
89+
}
90+
}
91+
}
92+
]
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
[
2+
{
3+
"faultInst": {
4+
"attributes": {
5+
"ack": "no",
6+
"alert": "no",
7+
"cause": "equipment-full",
8+
"changeSet": "available (Old: 1501496, New: 240908), capUtilized (Old: 29, New: 89), inodesFree (Old: 12148991, New: 12148990), inodesUsed (Old: 721, New: 722), used (Old: 595656, New: 1856244)",
9+
"childAction": "",
10+
"code": "F1528",
11+
"created": "2026-01-12T06:44:26.382+00:00",
12+
"delegated": "no",
13+
"descr": "Storage unit /data/log on Node 1 with hostname fab3-apic1 mounted at /data/log is 89% full",
14+
"dn": "topology/pod-1/node-1/sys/ch/p-[/data/log]-f-[tmpfs]/fault-F1528",
15+
"domain": "infra",
16+
"highestSeverity": "major",
17+
"lastTransition": "2026-01-12T06:44:26.382+00:00",
18+
"lc": "retaining",
19+
"occur": "1",
20+
"origSeverity": "major",
21+
"prevSeverity": "major",
22+
"rule": "eqpt-storage-full-major",
23+
"severity": "cleared",
24+
"status": "",
25+
"subject": "equipment-full",
26+
"title": "",
27+
"type": "operational"
28+
}
29+
}
30+
},
31+
32+
{
33+
"faultInst": {
34+
"attributes": {
35+
"ack": "no",
36+
"alert": "no",
37+
"cause": "equipment-full",
38+
"changeSet": "available (Old: 1501496, New: 240908), capUtilized (Old: 29, New: 89), inodesFree (Old: 12148991, New: 12148990), inodesUsed (Old: 721, New: 722), used (Old: 595656, New: 1856244)",
39+
"childAction": "",
40+
"code": "F1528",
41+
"created": "2026-01-12T06:44:26.382+00:00",
42+
"delegated": "no",
43+
"descr": "Storage unit /firmware on Node 1 with hostname fab3-apic1 mounted at /firmware is 89% full",
44+
"dn": "topology/pod-1/node-1/sys/ch/p-[/firmware]-f-[/dev/mapper/vg_ifc0-firmware]/fault-F1528",
45+
"domain": "infra",
46+
"highestSeverity": "major",
47+
"lastTransition": "2026-01-12T06:44:26.382+00:00",
48+
"lc": "soaking-clearing",
49+
"occur": "1",
50+
"origSeverity": "major",
51+
"prevSeverity": "major",
52+
"rule": "eqpt-storage-full-major",
53+
"severity": "major",
54+
"status": "",
55+
"subject": "equipment-full",
56+
"title": "",
57+
"type": "operational"
58+
}
59+
}
60+
},
61+
62+
{
63+
"faultInst": {
64+
"attributes": {
65+
"ack": "no",
66+
"alert": "no",
67+
"cause": "equipment-full",
68+
"changeSet": "available (Old: 1501496, New: 240908), capUtilized (Old: 29, New: 89), inodesFree (Old: 12148991, New: 12148990), inodesUsed (Old: 721, New: 722), used (Old: 595656, New: 1856244)",
69+
"childAction": "",
70+
"code": "F1528",
71+
"created": "2026-01-12T06:44:26.382+00:00",
72+
"delegated": "no",
73+
"descr": "Storage unit /techsupport on Node 1 with hostname fab3-apic1 mounted at /techsupport is 89% full",
74+
"dn": "topology/pod-1/node-1/sys/ch/p-[/techsupport]-f-[/dev/mapper/vg_ifc0-techsupport]/fault-F1528",
75+
"domain": "infra",
76+
"highestSeverity": "major",
77+
"lastTransition": "2026-01-12T06:44:26.382+00:00",
78+
"lc": "raised-clearing",
79+
"occur": "1",
80+
"origSeverity": "major",
81+
"prevSeverity": "major",
82+
"rule": "eqpt-storage-full-major",
83+
"severity": "major",
84+
"status": "",
85+
"subject": "equipment-full",
86+
"title": "",
87+
"type": "operational"
88+
}
89+
}
90+
}
91+
]

0 commit comments

Comments
 (0)