metal/mtce
Eric MacDonald fd66519339 Fix Start Host Services race condition
The following update, merged in early June, introduced a change to
the mtcClient to auto-run the Start Host Services command on process
startup like it does for the goenable tests.

https://opendev.org/starlingx/metal/
        commit/1335bc484df331771e995ae822df3af84cc5739d

This change introduced the potential for a race condition that did not
occur during the testing of that update.
Likely due to the low reproduction rate.

With that update in place it is possible for maintenbance to receive
the acknowlegement of a "Start Host Services" request followed
immediately by the "Start Host Services Result" message.

Receiving these messages back to back in a batch does not give
maintenance enough time to update its command handler with the
next expected message. The Command handler is a separate time-sliced
FSM that needs to run at least once following the start request's
message ack. Otherwise, the result message is dropped which leads
to a Start Host Services timeout.

The fix is to accept a "Start Host Services Result" response anytime
it arrives while a "Start Host Services" request is outstanding.

Test Plan:

PASS: Verify issue occurs at a rate greater than 75% and then apply
      this change and verify there are no failures in a lock/unlock
      soak of 100 iterations.

Closes-Bug: 2073802
Change-Id: I657e5fd917073f6c7a37dc13517559a9740a62e9
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2024-07-23 15:54:42 +00:00
..
debian Update crashDumpMgr to source config from envfile 2023-10-06 23:06:54 +00:00
src Fix Start Host Services race condition 2024-07-23 15:54:42 +00:00
PKG-INFO Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00