metal/mtce/src/pmon
Eric MacDonald a42301c19b Make successful pmon-restart clear failed restarts count
The pmon-restart service, through a call to respawn_process,
increments that process's restarts counter but does not clear
that counter after a successful restart.

So, each pmon-restart mistakenly contributes to that process's
failure count. This has the effect of pre-loading that process's
restart counter by one for every pmon-restart of that process.

The effect is best described by example.
Say a process is pmon-restart'ed 4 times during one day which
increments that process's restart counter to 4. So assuming its
conf file specifies its threshold is 3 ; its already exceeded
its threshold. Then, even days later that process experiences
a real failure pmon will immediate take the severity action
because the failure threshold had already been exceeded.

This update ensures a process's restart counter is cleared
after successful pmon-restart operation ; in the process pid
registration phase of recovery.

Test Plan:

PASS: Verify pmon-restart continues to work.
PASS: Verify proper thresholding of failed process following
      many pmon-restart operations.
PEND: Verify pmon-restart and process failure automated test script
      against this update. 5 loops, all processes.

Change-Id: Ib01446f2e053846cd30cb0ca0e06d7c987cdf581
Closes-Bug: 1853330
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2019-11-21 14:58:28 +00:00
..
scripts Merge "Scripts: pmon-test openrc file call" 2019-09-17 21:14:24 +00:00
Makefile Add EXTRALDFLAGS to linker in a number of Makefiles 2019-02-28 22:34:54 -06:00
pmon.h Remove include bits/siginfo.h from pmon.h 2019-02-28 22:34:54 -06:00
pmonAlarm.cpp Modify a memory leak bug in Pmon alarm. 2019-07-20 08:45:10 +08:00
pmonAlarm.h Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
pmonFsm.cpp Merge "Removing unused flag disable_worker_services" 2019-11-04 13:52:12 +00:00
pmonHdlr.cpp Make successful pmon-restart clear failed restarts count 2019-11-21 14:58:28 +00:00
pmonInit.cpp Output error Full_init_reqd parameter value in a debug log 2019-05-11 15:07:28 +08:00
pmonMsg.cpp Add 50 byte hostname support to maintenance 2019-07-12 12:20:08 +00:00