Fix no swact for failure of critical services
This fix is to ensure keeping service failure counting over successful
audit.
When service enabled audit successfully completes, SM reset the service
failure state. However it should not reset the service fail-count.
The fail-count should only be reset after the grace period.
Closes-Bug: 1893669
Change-Id: I6996fe3f1c08c38da6f26243aee2b95b083069f0
Signed-off-by: Bin Qian <bin.qian@windriver.com>
(cherry picked from commit 9f70df63fd
)
This commit is contained in:
parent
136759b26b
commit
12f7ea91ef
@ -40,7 +40,6 @@ bool sm_service_clear_failure_state(SmServiceT* service)
|
|||||||
bool prev_failure_condition;
|
bool prev_failure_condition;
|
||||||
prev_failure_condition =
|
prev_failure_condition =
|
||||||
service->recover ||
|
service->recover ||
|
||||||
service->fail_count > 0 ||
|
|
||||||
service->action_fail_count > 0 ||
|
service->action_fail_count > 0 ||
|
||||||
service->transition_fail_count > 0 ||
|
service->transition_fail_count > 0 ||
|
||||||
service->status == SM_SERVICE_STATUS_FAILED ||
|
service->status == SM_SERVICE_STATUS_FAILED ||
|
||||||
@ -50,7 +49,6 @@ bool sm_service_clear_failure_state(SmServiceT* service)
|
|||||||
if( prev_failure_condition )
|
if( prev_failure_condition )
|
||||||
{
|
{
|
||||||
service->recover = false;
|
service->recover = false;
|
||||||
service->fail_count = 0;
|
|
||||||
service->action_fail_count = 0;
|
service->action_fail_count = 0;
|
||||||
service->transition_fail_count = 0;
|
service->transition_fail_count = 0;
|
||||||
service->status = SM_SERVICE_STATUS_NONE;
|
service->status = SM_SERVICE_STATUS_NONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user