Skip to content

Commit 68f3673

Browse files
authored
Flag faults with life cycle raised or soaking for APIC Disk Space check F1527/F1528/F1529 (#325)
Add pytest for `apic_disk_space_faults_check()` as well. It was completely missing.
1 parent 39dd487 commit 68f3673

6 files changed

Lines changed: 399 additions & 4 deletions

File tree

aci-preupgrade-validation-script.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2991,25 +2991,29 @@ def apic_disk_space_faults_check(cversion, **kwargs):
29912991
doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#apic-disk-space-usage"
29922992
recommended_action = {
29932993
'/firmware': 'Remove unneeded images',
2994-
'/techsupport': 'Remove unneeded techsupports/cores'
2994+
'/techsupport': 'Remove unneeded techsupports/cores',
2995+
'/data/log': 'Remove unneeded logs in var/log/dme/log'
29952996
}
29962997
default_action = 'Contact Cisco TAC.'
29972998
if cversion.same_as('4.0(1h)') or cversion.older_than('3.2(6i)'):
29982999
default_action += ' A typical issue is CSCvn13119.'
29993000

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

30033004
faultInsts = icurl('class',
30043005
'faultInst.json?query-target-filter=or(eq(faultInst.code,"F1527"),eq(faultInst.code,"F1528"),eq(faultInst.code,"F1529"))')
30053006
for faultInst in faultInsts:
3007+
lc = faultInst['faultInst']['attributes']['lc']
3008+
if lc not in ["raised", "soaking"]:
3009+
continue
30063010
fc = faultInst['faultInst']['attributes']['code']
30073011
dn = re.search(dn_regex, faultInst['faultInst']['attributes']['dn'])
30083012
desc = re.search(desc_regex, faultInst['faultInst']['attributes']['descr'])
30093013
if dn and desc:
30103014
data.append([fc, dn.group('pod'), dn.group('node'), dn.group('mountpoint'),
3011-
desc.group('usage'),
3012-
recommended_action.get(dn.group('mountpoint'), default_action)])
3015+
desc.group('usage'),
3016+
recommended_action.get(dn.group('mountpoint'), default_action)])
30133017
else:
30143018
unformatted_data.append([fc, faultInst['faultInst']['attributes']['dn'], default_action])
30153019
if not data and not unformatted_data:
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+
]
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": "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+
"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": "raised",
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",
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+
]
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[
2+
{
3+
"faultInst": {
4+
"attributes": {
5+
"ack": "no",
6+
"alert": "no",
7+
"cause": "equipment-full",
8+
"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)",
9+
"childAction": "",
10+
"code": "F1528",
11+
"created": "2026-01-12T06:44:26.382+00:00",
12+
"delegated": "no",
13+
"dn": "topology/pod-1/node-1/sys/ch/p-[/unknown]-f",
14+
"descr": "Partition /unknown is 88% full",
15+
"domain": "infra",
16+
"highestSeverity": "major",
17+
"lastTransition": "2026-01-12T06:49:47.550+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+
]

0 commit comments

Comments
 (0)