Skip to content

Commit ccd0f7f

Browse files
Updated fix version
1 parent 33d6e4f commit ccd0f7f

3 files changed

Lines changed: 56 additions & 10 deletions

File tree

aci-preupgrade-validation-script.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,8 +3001,9 @@ def apic_disk_space_faults_check(cversion, tversion,**kwargs):
30013001

30023002
dn_regex = node_regex + r'/.+p-\[(?P<mountpoint>.+)\]-f'
30033003
desc_regex = r'is (?P<usage>\d{2,3}%) full'
3004-
3005-
tmp_faults_skipped = False # Track if we skip /tmp faults for tversion >= 6.1(4a)
3004+
3005+
tmp_faults_skip_versions = ["6.0(9f)", "6.1(4h)", "6.2(1g)"]
3006+
tmp_faults_skipped = False # Track if we skip /tmp faults for CSCwo96334 versions
30063007
faultInsts = icurl('class',
30073008
'faultInst.json?query-target-filter=or(eq(faultInst.code,"F1527"),eq(faultInst.code,"F1528"),eq(faultInst.code,"F1529"))')
30083009
for faultInst in faultInsts:
@@ -3014,8 +3015,8 @@ def apic_disk_space_faults_check(cversion, tversion,**kwargs):
30143015
desc = re.search(desc_regex, faultInst['faultInst']['attributes']['descr'])
30153016
if dn:
30163017
mountpoint = dn.group('mountpoint')
3017-
# CSCwo96334: Skip /tmp faults if tversion >= 6.1(4a) (snapshots use /data instead)
3018-
if mountpoint == '/tmp' and tversion and not tversion.older_than("6.1(4a)"):
3018+
# CSCwo96334: Skip /tmp faults when target is >= 6.1(4h) or any unaffected versions
3019+
if mountpoint == '/tmp' and (not tversion.older_than("6.1(4h)") or any(tversion.same_as(version) for version in tmp_faults_skip_versions)):
30193020
tmp_faults_skipped = True
30203021
continue
30213022
if desc:
@@ -3025,7 +3026,7 @@ def apic_disk_space_faults_check(cversion, tversion,**kwargs):
30253026
else:
30263027
unformatted_data.append([fc, faultInst['faultInst']['attributes']['dn'], default_action])
30273028
if not data and not unformatted_data:
3028-
# If we only found /tmp faults that were skipped (tversion >= 6.1(4a)), return NA
3029+
# If we only found /tmp faults that were skipped (CSCwo96334 fixed target versions), return NA
30293030
if tmp_faults_skipped:
30303031
result = NA
30313032
else:

tests/checks/apic_disk_space_faults_check/Fault_raised.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,35 @@
147147
"type": "operational"
148148
}
149149
}
150+
},
151+
152+
{
153+
"faultInst": {
154+
"attributes": {
155+
"ack": "no",
156+
"alert": "no",
157+
"cause": "equipment-full",
158+
"changeSet": "inodesFree (Old: 12167881, New: 12167880), inodesUsed (Old: 64, New: 65)",
159+
"childAction": "",
160+
"code": "F1527",
161+
"created": "2026-03-13T11:46:02.307+00:00",
162+
"delegated": "no",
163+
"descr": "Storage unit /tmp on node 1 with hostname fab3-apic1 mounted at /tmp is 82% full",
164+
"dn": "topology/pod-1/node-1/sys/ch/p-[/tmp]-f-[tmpfs]/fault-F1527",
165+
"domain": "infra",
166+
"highestSeverity": "warning",
167+
"lastTransition": "2026-03-13T11:48:02.867+00:00",
168+
"lc": "raised",
169+
"occur": "1",
170+
"origSeverity": "warning",
171+
"prevSeverity": "warning",
172+
"rule": "eqpt-storage-full-warning",
173+
"severity": "warning",
174+
"status": "",
175+
"subject": "equipment-full",
176+
"title": "",
177+
"type": "operational"
178+
}
179+
}
150180
}
151181
]

tests/checks/apic_disk_space_faults_check/test_apic_disk_space_faults_check.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
["F1528", "1", "1", "/techsupport", "89%", "Remove unneeded techsupports/cores"],
3939
["F1529", "1", "1", "/tmp", "100%", "Remove unneeded logs in /tmp directory"],
4040
["F1528", "1", "1", "/tmp", "89%", "Remove unneeded logs in /tmp directory"],
41+
["F1527", "1", "1", "/tmp", "82%", "Remove unneeded logs in /tmp directory"],
4142
],
4243
),
4344
# PASS - Faults exist but not raised nor soaking (cleared)
@@ -62,7 +63,7 @@
6263
["F1527", "1", "1", "/data/log", "82%", "Remove unneeded logs in var/log/dme/log"],
6364
],
6465
),
65-
# FAIL - /tmp included when tversion is below 6.1(4a)
66+
# FAIL - /tmp included when tversion is below 6.1(4h)
6667
(
6768
{faultInst: read_data(dir, "Fault_combination.json")},
6869
"4.2(1h)",
@@ -76,23 +77,37 @@
7677
["F1527", "1", "1", "/data/log", "82%", "Remove unneeded logs in var/log/dme/log"],
7778
],
7879
),
79-
# FAIL - /tmp skipped when tversion is 6.1(4a) or later
80+
# FAIL - /tmp included when tversion is not one of CSCwo96334 fixed target versions
8081
(
8182
{faultInst: read_data(dir, "Fault_combination.json")},
8283
"4.2(1h)",
83-
"6.1(4a)",
84+
"6.1(2g)",
85+
script.FAIL_UF,
86+
[
87+
["F1529", "1", "1", "/data/log", "94%", "Remove unneeded logs in var/log/dme/log"],
88+
["F1528", "1", "1", "/firmware", "89%", "Remove unneeded images"],
89+
["F1529", "1", "1", "/tmp", "100%", "Remove unneeded logs in /tmp directory"],
90+
["F1528", "1", "1", "/tmp", "89%", "Remove unneeded logs in /tmp directory"],
91+
["F1527", "1", "1", "/data/log", "82%", "Remove unneeded logs in var/log/dme/log"],
92+
],
93+
),
94+
# FAIL - /tmp skipped when tversion is one of CSCwo96334 fixed target versions
95+
(
96+
{faultInst: read_data(dir, "Fault_combination.json")},
97+
"4.2(1h)",
98+
"6.0(9f)",
8499
script.FAIL_UF,
85100
[
86101
["F1529", "1", "1", "/data/log", "94%", "Remove unneeded logs in var/log/dme/log"],
87102
["F1528", "1", "1", "/firmware", "89%", "Remove unneeded images"],
88103
["F1527", "1", "1", "/data/log", "82%", "Remove unneeded logs in var/log/dme/log"],
89104
],
90105
),
91-
# NA - only /tmp faults and tversion is 6.1(4a) or later
106+
# NA - only /tmp faults and tversion is one of CSCwo96334 fixed target versions
92107
(
93108
{faultInst: read_data(dir, "Fault_combination.json")[3:5]},
94109
"4.2(1h)",
95-
"6.1(4a)",
110+
"6.1(4h)",
96111
script.NA,
97112
[],
98113
),

0 commit comments

Comments
 (0)