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
27 changes: 15 additions & 12 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -2991,27 +2991,30 @@ def apic_disk_space_faults_check(cversion, **kwargs):
doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#apic-disk-space-usage"
recommended_action = {
'/firmware': 'Remove unneeded images',
'/techsupport': 'Remove unneeded techsupports/cores'
'/techsupport': 'Remove unneeded techsupports/cores',
'/data/log': 'Remove unneeded logs in var/log/dme/log'
}
default_action = 'Contact Cisco TAC.'
if cversion.same_as('4.0(1h)') or cversion.older_than('3.2(6i)'):
default_action += ' A typical issue is CSCvn13119.'

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

desc_regex = r'is (?P<usage>\d{2,3}%) full'
faultInsts = icurl('class',
'faultInst.json?query-target-filter=or(eq(faultInst.code,"F1527"),eq(faultInst.code,"F1528"),eq(faultInst.code,"F1529"))')
for faultInst in faultInsts:
fc = faultInst['faultInst']['attributes']['code']
dn = re.search(dn_regex, faultInst['faultInst']['attributes']['dn'])
desc = re.search(desc_regex, faultInst['faultInst']['attributes']['descr'])
if dn and desc:
data.append([fc, dn.group('pod'), dn.group('node'), dn.group('mountpoint'),
desc.group('usage'),
recommended_action.get(dn.group('mountpoint'), default_action)])
else:
unformatted_data.append([fc, faultInst['faultInst']['attributes']['dn'], default_action])
lc = faultInst['faultInst']['attributes']['lc']
if lc == "raised":
fc = faultInst['faultInst']['attributes']['code']
dn = re.search(dn_regex, faultInst['faultInst']['attributes']['dn'])
desc = re.search(desc_regex, faultInst['faultInst']['attributes']['descr'])
if dn and desc:
data.append([fc, dn.group('pod'), dn.group('node'), dn.group('mountpoint'),
desc.group('usage'),
recommended_action.get(dn.group('mountpoint'), default_action)])
else:
unformatted_data.append([fc, faultInst['faultInst']['attributes']['dn'], default_action])
if not data and not unformatted_data:
result = PASS
return Result(
Expand Down
92 changes: 92 additions & 0 deletions tests/checks/apic_disk_space_faults_check/Fault_combination.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[
{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"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)",
"childAction": "",
"code": "F1529",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"descr": "Storage unit /data/log on Node 1 with hostname fab3-apic1 mounted at /data/log is 94% full",
"dn": "topology/pod-1/node-1/sys/ch/p-[/data/log]-f-[tmpfs]/fault-F1529",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:44:26.382+00:00",
"lc": "raised",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "major",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
},


{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"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)",
"childAction": "",
"code": "F1528",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"descr": "Storage unit /firmware on Node 1 with hostname fab3-apic1 mounted at /firmware is 89% full",
"dn": "topology/pod-1/node-1/sys/ch/p-[/firmware]-f-[/dev/mapper/vg_ifc0-firmware]/fault-F1528",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:44:26.382+00:00",
"lc": "soaking",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "major",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
},

{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"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)",
"childAction": "",
"code": "F1528",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"descr": "Storage unit /techsupport on Node 1 with hostname fab3-apic1 mounted at /techsupport is 89% full",
"dn": "topology/pod-1/node-1/sys/ch/p-[/techsupport]-f-[/dev/mapper/vg_ifc0-techsupport]/fault-F1528",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:44:26.382+00:00",
"lc": "raised-clearing",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "major",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[
{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"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)",
"childAction": "",
"code": "F1528",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"descr": "Storage unit /data/log on Node 1 with hostname fab3-apic1 mounted at /data/log is 89% full",
"dn": "topology/pod-1/node-1/sys/ch/p-[/data/log]-f-[tmpfs]/fault-F1528",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:44:26.382+00:00",
"lc": "retaining",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "cleared",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
},

{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"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)",
"childAction": "",
"code": "F1528",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"descr": "Storage unit /firmware on Node 1 with hostname fab3-apic1 mounted at /firmware is 89% full",
"dn": "topology/pod-1/node-1/sys/ch/p-[/firmware]-f-[/dev/mapper/vg_ifc0-firmware]/fault-F1528",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:44:26.382+00:00",
"lc": "soaking",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "major",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
},

{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"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)",
"childAction": "",
"code": "F1528",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"descr": "Storage unit /techsupport on Node 1 with hostname fab3-apic1 mounted at /techsupport is 89% full",
"dn": "topology/pod-1/node-1/sys/ch/p-[/techsupport]-f-[/dev/mapper/vg_ifc0-techsupport]/fault-F1528",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:44:26.382+00:00",
"lc": "raised-clearing",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "major",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
}
]
91 changes: 91 additions & 0 deletions tests/checks/apic_disk_space_faults_check/Fault_raised.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[
{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"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)",
"childAction": "",
"code": "F1528",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"descr": "Storage unit /data/log on Node 1 with hostname fab3-apic1 mounted at /data/log is 89% full",
"dn": "topology/pod-1/node-1/sys/ch/p-[/data/log]-f-[tmpfs]/fault-F1528",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:44:26.382+00:00",
"lc": "raised",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "major",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
},

{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"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)",
"childAction": "",
"code": "F1528",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"descr": "Storage unit /firmware on Node 1 with hostname fab3-apic1 mounted at /firmware is 89% full",
"dn": "topology/pod-1/node-1/sys/ch/p-[/firmware]-f-[/dev/mapper/vg_ifc0-firmware]/fault-F1528",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:44:26.382+00:00",
"lc": "raised",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "major",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
},

{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"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)",
"childAction": "",
"code": "F1528",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"descr": "Storage unit /techsupport on Node 1 with hostname fab3-apic1 mounted at /techsupport is 89% full",
"dn": "topology/pod-1/node-1/sys/ch/p-[/techsupport]-f-[/dev/mapper/vg_ifc0-techsupport]/fault-F1528",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:44:26.382+00:00",
"lc": "raised",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "major",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[
{
"faultInst": {
"attributes": {
"ack": "no",
"alert": "no",
"cause": "equipment-full",
"changeSet": "available (Old: 237936, New: 1495556), capUtilized (Old: 89, New: 29), inodesFree (Old: 12148990, New: 12148991), inodesUsed (Old: 722, New: 721), used (Old: 1859216, New: 601596)",
"childAction": "",
"code": "F1528",
"created": "2026-01-12T06:44:26.382+00:00",
"delegated": "no",
"dn": "topology/pod-1/node-1/sys/ch/p-[/unknown]-f",
"descr": "Partition /unknown is 88% full",
"domain": "infra",
"highestSeverity": "major",
"lastTransition": "2026-01-12T06:49:47.550+00:00",
"lc": "raised",
"occur": "1",
"origSeverity": "major",
"prevSeverity": "major",
"rule": "eqpt-storage-full-major",
"severity": "major",
"status": "",
"subject": "equipment-full",
"title": "",
"type": "operational"
}
}
}
]
Loading