COMMISSION S.M.A.R.T Tests fail unnecessarily on code 64 (past log entries)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Triaged
|
Medium
|
Unassigned | ||
3.5 |
Won't Fix
|
Medium
|
Unassigned | ||
3.6 |
Triaged
|
Medium
|
Unassigned |
Bug Description
If a disk has *old* indications of failure in its SMART log, a return code of 64 is provided.
This causes MAAS to mark the node with hardware tests failed, which this is not a valid indicator if of if the disk is actively failing now.
Based off this article https:/
We have changed you code as follows
File changed: `/usr/lib/
Lines Changed:
159 if proc.returncode != 0 and proc.returncode != 4 and proc.returncode != 64:
and
172 return 0 if proc.returncode == 4 or proc.returncode == 64 else proc.returncode
Please review and suggest if this is satisfactory for addition to MAAS or if it needs further development/review first.
Related branches
- Jan Klare (community): Approve
- MAAS Lander: Approve
- Lee Trager (community): Disapprove
- Newell Jensen (community): Approve
-
Diff: 27 lines (+8/-2)1 file modifiedsrc/metadataserver/builtin_scripts/smartctl.py (+8/-2)
Changed in maas: | |
milestone: | none → 2.5.0alpha2 |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in maas: | |
milestone: | 2.5.0alpha2 → 2.5.0beta1 |
Changed in maas: | |
milestone: | 2.5.0beta1 → 2.5.0beta2 |
Changed in maas: | |
milestone: | 2.5.0beta2 → 2.5.0rc1 |
Changed in maas: | |
milestone: | 2.5.0rc1 → 2.5.x |
Changed in maas: | |
status: | Incomplete → New |
no longer affects: | maas/2.4 |
Changed in maas: | |
milestone: | 2.5.x → none |
Changed in maas: | |
milestone: | none → 3.4.0 |
Changed in maas: | |
milestone: | 3.4.0 → 3.4.x |
Changed in maas: | |
milestone: | 3.4.x → 3.5.x |
We made a small improvement to this if you wish to incorporate it.
if (proc.returncode & 187) != 0:
and
return 0 if (proc.returncode & 187) == 0 else proc.returncode
"Those would be smarter ways to do what we were wanting based similarly to what the munin guy is doing Now *ALLL* of the return codes 4, 64, and 68 will *ALL* return 0!!!
Not sure if you can update the bug with those lines as suggestions vs what I had before :confused:
This will also now always mask those errors so that when people see the return codes they can ignore the `4` and the `64` cause it won't even show in the exit code"