Maintain sensor degrade over a process restart

When the Hardware Monitor starts up it reads existing alarms and sensor
state from the sysinv database. It then uses this pre-existing state to
align its internal structure accordingly moving forward.

The hardware monitor manage_startup_states utility is incorrectly 
requesting degrade clear rather than degrade set in response to finding 
a pre-existing critical sensor assertion on process startup.

This update fixes this issue by calling the set_degraded_state rather 
than clear_degraded_state against this sensor in this case.

Change-Id: Ic1ecc1f11d7a729c16da63c6d43b7d758bb9e467
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
Story: 2002882
Task: 22845
This commit is contained in:
Eric MacDonald 2018-07-12 10:05:00 -04:00 committed by David Sullivan
parent c38acc947c
commit cc53f1e689
1 changed files with 1 additions and 1 deletions

View File

@ -2462,7 +2462,7 @@ bool hwmonHostClass::manage_startup_states ( struct hwmonHostClass::hwmon_host *
else if ( critl == true )
{
clear_degraded_state ( sensor_ptr );
set_degraded_state ( sensor_ptr );
set_alarmed_severity ( sensor_ptr, FM_ALARM_SEVERITY_CRITICAL);
hwmonAlarm_critical ( host_ptr->hostname, HWMON_ALARM_ID__SENSOR, sensor_ptr->sensorname, REASON_DEGRADED );
}