metal/mtce/src/pmon
Eric MacDonald e379fdfe18 Prevent pmond process recovery when system is not running
The maintenance process monitor (pmon) should only
recover failed processes when the system state is
'running' or 'degraded'.

The current implementation allowed process recovery
for other non-inservice states, including an unknown
state if systemd returns no data on the state query.

This update tighten's up the system state check by
adding retries to the state query utility and
restricting accepted states to 'running' and 'degraded'.

This change then prevents pmon from inadvertently killing
and recovering the mtcClient which indirectly kills off
the mtcClient's fail-safe sysreq reboot child thread
if pmon state query returns anything other than running
or degraded during a shut down.

Change-Id: I605ae8be06f8f8351a51afce98a4f8bae54a40fd
Closes-Bug: 1883519
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2020-06-15 11:09:47 -04:00
..
scripts De-branding in starlingx/metal: Titanium Cloud -> StarlingX 2020-04-03 07:58:25 +02: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 Prevent pmond process recovery when system is not running 2020-06-15 11:09:47 -04: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