metal/mtce-common/cgts-mtce-common-1.0/daemon
Eric MacDonald 316032b904 Mtce: Improve non-blocking http request dispatch
Maintenance is seen to intermittently fail Swact requests early
after initial system provisioning, without logging an error
reason, only to always succeed later on.

The issue is difficult to reproduce so this update adds extra
logging to this code path and implements a speculative fix.

The event_base_loop calls' non-zero return code is never being
logged. The libevent documentation states that this API will
return 1 while the target has not yet provided any data.

Theory is, because the call is local, that normally it returns
with data even on the first dispatch case. However, during early
system configuration, when the system is busy, that first dispatch
does not complete immediately like it normally does later on.

Speculation is, instead it returns a 1 stating retry but the
existing code path treats that as a failure.

This update modifies the code to return a PASS if the command
dispatch returns a 1 while the error case of -1 gets enhanced
logging and continues to be treated as a failure.

Test Plan:
PASS: Swact 5 times
PASS: Lock/Unlock Host
PASS: Large System DOR

Related Bug: https://bugs.launchpad.net/starlingx/+bug/1791381
Change-Id: I19b22e07d3224b2e9dd3f3569ecbe9aed7d9402f
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2018-09-10 19:02:42 +00:00
..
Makefile StarlingX open source release updates 2018-05-31 07:36:43 -07:00
daemon_common.h Mtce: Make Heartbeat Failure Action Configurable 2018-09-10 13:03:30 -04:00
daemon_config.cpp Mtce: Make Heartbeat Failure Action Configurable 2018-09-10 13:03:30 -04:00
daemon_debug.cpp StarlingX open source release updates 2018-05-31 07:36:43 -07:00
daemon_files.cpp Mtce: Improve non-blocking http request dispatch 2018-09-10 19:02:42 +00:00
daemon_ini.cpp StarlingX open source release updates 2018-05-31 07:36:43 -07:00
daemon_ini.h StarlingX open source release updates 2018-05-31 07:36:43 -07:00
daemon_main.cpp StarlingX open source release updates 2018-05-31 07:36:43 -07:00
daemon_option.h StarlingX open source release updates 2018-05-31 07:36:43 -07:00
daemon_signal.cpp StarlingX open source release updates 2018-05-31 07:36:43 -07:00