NVME check remains green if any nvme command fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hw-health-charm |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
NVME's check code does this for every NVME found under /dev:
try:
output = subprocess.
["sudo", "/usr/sbin/nvme", "smart-log", device]
)
except subprocess.
print("nvme check error: {}".format(error))
return
So, if the nvme command fails for any reason, the check just returns and does not raise any particular nagios status, hence OK is assumed and the failure goes unnoticed.
This is particularly problematic for this check as it needs special permissions to run, which are granted by the Nvme._render_
Related branches
- Robert Gildein: Needs Fixing
- BootStack Reviewers: Pending requested
-
Diff: 35 lines (+10/-1)1 file modifiedsrc/files/nvme/check_nvme.py (+10/-1)
tags: | added: bseng-1814 |
One possible workaround for this issue is to clear the hw-health.installed flag:
juju run -u hw-health/97 -- charms.reactive -p clear_flag hw-health.installed
This will cause all the tools to be re-evaluated, including the re-rendering of the sudoers rule.