Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make handling of invalid devices configurable #266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hayajiro
Copy link

Currently, whenever there are devices that are invalid, smartctl_exporter will log an error stating that the device can not be opened, refering to potential issues with missing IDENTIFY_DEVICE structures or low-power-mode-devices.

There are, however, also situations where (virtual) devices disappear from the host and are not properly cleaned up. Here, open()ing the device in smartctl fails with ENXIO, resulting in the error message "No such device or address" being returned. In this case, the error just clutters the log output for no reason, as there is no reasonable action that can be taken.

This MR makes the experienced behavior for such cases configurable. One can either specify the newly added flag --smartctl.exclude-enxio to ensure that devices with such problems are simply silently ignored, or decide to ignore the flag and continue experiencing the current behavior.

Currently, whenever there are devices that are invalid, smartctl_exporter will
log an error stating that the device can not be opened, refering to potential
issues with missing IDENTIFY_DEVICE structures or low-power-mode-devices.

There are, however, also situations where (virtual) devices disappear
from the host and are not properly cleaned up. Here, `open()`ing the
device in smartctl fails with ENXIO, resulting in the error message
"No such device or address" being returned. In this case, the error
just clutters the log output for no reason, as there is no reasonable
action that can be taken.

This MR makes the experienced behavior for such cases configurable.
One can either specify the newly added flag `--smartctl.exclude-enxio`
to ensure that devices with such problems are simply silently ignored,
or decide to ignore the flag and continue experiencing the current
behavior.

Signed-off-by: Markus Kostrzewski <[email protected]>
@Hayajiro Hayajiro force-pushed the make_enxio_device_handling_configurable branch from 35746fc to c9b41df Compare January 29, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant