intel / ledmon

Enclosure LED Utilities
GNU General Public License v2.0
72 stars 44 forks source link

ledmon: change led pattern setting #232

Closed bkucman closed 2 weeks ago

bkucman commented 1 month ago

The change is implemented due to the method of pattern determination.

When a volume RAID is in following states:

by-default active members will have LED_IBPI_PATTERN_DEGRADED pattern determined, which is not supported by most of controllers. This case will cause the LED status not to be updated. It can be overwritten during determination if we enable flags BLINK_ON_MIGR or REBUILD_BLINK_ON_ALL.

In case ledmon was restarted with conf flags (BLINK_ON_MIGR, REBUILD_BLINK_ON_ALL) changed from enabled to disabled, drive may contain incorrect LED status set by the previous lunch of ledmon.

A similar situation is with LED_IBPI_PATTERN_HOTSPARE pattern, which is not supported by part of controllers.

This change in case the controller returns STATUS_INVALID_STATE for LED_IBPI_PATTERN_DEGRADED, adds an attempt to set the LED status to Normal pattern, to make LED status neutral.

Change required unification of the returned status by functions responsible for setting the LED status in supported controllers, to make ledmon recognize in general three statuses success, fail and "status not supported".

github-actions[bot] commented 1 month ago

Hey @tasleson, a file(s) you own were modified in this PR! Could you take a look?


Caused by:

github-actions[bot] commented 1 month ago

Hey @nfont, a file(s) you own were modified in this PR! Could you take a look?


Caused by:

github-actions[bot] commented 1 month ago

Hey @prabhakar, a file(s) you own were modified in this PR! Could you take a look?


Caused by:

mku514k commented 1 month ago

Commit message:

The change is implemented due the way of pattern determination. Consider "... due to the method of pattern determination."" When a volume RAID is in below states: Consider "following". - rebuild is in progress, - change number of drives in RAID 0,

by-default active members will have a determined LED_IBPI_PATTERN_DEGRADED Consider just ".... will have set..." pattern, which is not supported by most of controllers, this case will You can make "This case will..." a new sentence. ...also, a double space prior to "will". cause the LED status to not be updated. It can be overwritten during "To be or not to be" determination if we enable flags BLINK_ON_MIGR or REBUILD_BLINK_ON_ALL.

This behavior may lead to incorrect LED status on the drive in case ledmon Consider "... lead to setting .." was restarted with the change of conf flags setting (BLINK_ON_MIGR, Consider "... was restarted with conf flags ([...]) changed from ..." REBUILD_BLINK_ON_ALL) from enabled to disabled.

A similar situation is with LED_IBPI_PATTERN_HOTSPARE pattern, which is not supported by part of controllers.

This change adds an attempt to set the LED status to Normal pattern in This sentence could use commas like "[...] Normal pattern, in [...]" ... case the controller returns STATUS_INVALID_STATE for LED_IBPI_PATTERN_DEGRADED to make LED status neutral. ... and "[...] LED_IBPI_PATTERN_DEGRADED, to make [...]".

Change required unification of the returned status by functions responsible for setting the LED status in supported controllers, to make ledmon distinguishes in general three states success, fail and Consider "recognize three general statuses: ..." "status not supported".