metal/mtce-common/cgts-mtce-common-1.0
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
..
alarm StarlingX open source release updates 2018-05-31 07:36:43 -07:00
common Mtce: Improve non-blocking http request dispatch 2018-09-10 19:02:42 +00:00
daemon Mtce: Improve non-blocking http request dispatch 2018-09-10 19:02:42 +00:00
fsmon StarlingX open source release updates 2018-05-31 07:36:43 -07:00
guest Fix linters issues and enable tox/zuul linters job as gate 2018-09-05 09:02:25 +08:00
heartbeat Mtce: Make Heartbeat Failure Action Configurable 2018-09-10 13:03:30 -04:00
hostw StarlingX open source release updates 2018-05-31 07:36:43 -07:00
hwmon Fix the print syntax inconsistency between python2 and python3 2018-08-29 16:09:27 +08:00
maintenance Mtce: Improve non-blocking http request dispatch 2018-09-10 19:02:42 +00:00
mtclog StarlingX open source release updates 2018-05-31 07:36:43 -07:00
pmon Fix linters issues and enable tox/zuul linters job as gate 2018-09-05 09:02:25 +08:00
public StarlingX open source release updates 2018-05-31 07:36:43 -07:00
rmon Fix linters issues and enable tox/zuul linters job as gate 2018-09-05 09:02:25 +08:00
scripts Mtce: Make Heartbeat Failure Action Configurable 2018-09-10 13:03:30 -04:00
.gitignore StarlingX open source release updates 2018-05-31 07:36:43 -07:00
LICENSE StarlingX open source release updates 2018-05-31 07:36:43 -07:00
Makefile StarlingX open source release updates 2018-05-31 07:36:43 -07:00