metal/mtce/src/maintenance
Eric MacDonald 3c94b0e552 Avoid creating non-volatile node locked file while in simplex mode
It is possible to lock controller-0 on a DX system before controller-1
has been configured/enabled. Due to the following recent updates this
can lead to SM disabling all controller services on that now locked
controller-0 thereby preventing any subsequent controller-0 unlock
attempts.

https://review.opendev.org/c/starlingx/metal/+/907620
https://review.opendev.org/c/starlingx/ha/+/910227

This update modifies the mtce node locked flag file management so that
the non-volatile node locked file (/etc/mtc/tmp/.node_locked) is only
created on a locked host after controller-1 is installed, provisioned
and configured.

This prevents SM from shutting down if the administrator locks
controller-0 before controller-1 is configured.

Test Plan:

PASS: Verify AIO DX Install.
PASS: Verify Standard System Install.
PASS: Verify Swact back and forth.
PASS: Verify lock/unlock of controller-0 prior to controller-1 config
PASS: Verify the non-volatile node locked flag file is not created
      while the /etc/platform/simplex file exists on the active
      controller.
PASS: Verify lock and delete of controller-1 puts the system back
      into simplex mode where the non-volatile node locked flag file
      is once again not created if controller-0 is then unlocked.
PASS: Verify an existing non-volatile node locked flag file is removed
      if present on a node that is locked without new persist option.
PASS: Verify original reported issue is resolved for DX systems.

Closes-Bug: 2051578
Change-Id: I40e9dd77aa3e5b0dc03dca3b1d3d73153d8816be
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2024-03-09 12:45:54 +00:00
..
Makefile Add support for peer controller reset via mtcClient 2021-01-14 16:44:14 -05:00
mtcAlarm.cpp Failure case handling of LUKS service 2023-12-06 00:34:02 -05:00
mtcAlarm.h Failure case handling of LUKS service 2023-12-06 00:34:02 -05:00
mtcBmcUtil.cpp Improve maintenance power/reset control command retry handling 2024-01-25 22:42:26 +00:00
mtcBmcUtil.h Add redfish support detection to maintenance 2019-08-19 14:03:37 +00:00
mtcCmdHdlr.cpp Add bmc reset delay in the reset progression command handler 2023-11-02 20:58:00 +00:00
mtcCompMsg.cpp Avoid creating non-volatile node locked file while in simplex mode 2024-03-09 12:45:54 +00:00
mtcCtrlMsg.cpp Avoid creating non-volatile node locked file while in simplex mode 2024-03-09 12:45:54 +00:00
mtcHttpSvr.cpp Fix Mtce's VIM systems query handling 2019-10-09 09:44:35 -04:00
mtcHttpSvr.h Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtcHttpUtil.cpp Cleanup mtcAgent error logging during startup 2023-02-14 14:18:02 -05:00
mtcHttpUtil.h Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtcInvApi.cpp Prevent mtcClient from sending to uninitialized socket in AIO SX 2021-04-21 10:20:10 -04:00
mtcInvApi.h Fix format-overflow warning in mtcInvApi 2019-08-27 10:33:44 -05:00
mtcNodeComp.cpp Mtce: Create non-volatile backup of node locked flag file 2024-02-14 00:54:11 +00:00
mtcNodeComp.h Add support for peer controller reset via mtcClient 2021-01-14 16:44:14 -05:00
mtcNodeCtrl.cpp Add a wait time between http request retries 2024-02-07 20:33:01 +00:00
mtcNodeFsm.cpp Prevent mtcClient from sending to uninitialized socket in AIO SX 2021-04-21 10:20:10 -04:00
mtcNodeFsm.h Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtcNodeHdlrs.cpp Mtce: Create non-volatile backup of node locked flag file 2024-02-14 00:54:11 +00:00
mtcNodeHdlrs.h Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtcNodeMnfa.cpp Fix Graceful Recovery handling while in Graceful Recovery handling 2021-03-17 14:25:19 -04:00
mtcNodeMsg.h Add support for peer controller reset via mtcClient 2021-01-14 16:44:14 -05:00
mtcSmgrApi.cpp Debian: Fix mtcAgent segfault on SM host state change requests 2022-06-26 20:18:20 +00:00
mtcSmgrApi.h Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtcStubs.cpp Implement Active-Active Heartbeat as HA Improvement Fix 2018-12-10 09:57:34 -05:00
mtcSubfHdlrs.cpp Debian: Make Mtce offline handler more resilient to slow shutdowns 2022-10-24 15:57:43 +00:00
mtcThreads.cpp Improve maintenance power/reset control command retry handling 2024-01-25 22:42:26 +00:00
mtcThreads.h Add redfish power/reset/reinstall bmc support to maintenance 2019-09-26 15:59:35 -04:00
mtcVimApi.cpp Add a wait time between http request retries 2024-02-07 20:33:01 +00:00
mtcVimApi.h Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtcWorkQueue.cpp Add a wait time between http request retries 2024-02-07 20:33:01 +00:00