commit 23d0d8ab2f3225f10594547c5f8a67c409f815a0
Author: Eric MacDonald <email address hidden>
Date: Fri Feb 2 16:52:50 2024 +0000
Add node locked gate to SM enable
Service Management (SM) sometimes selects and activates services on a
locked controller following a dead office recovery.
This update adds a node locked check to SM's enable handler to
block enable if present much like the existing goenabled check
blocks enable if not present in the same function.
The enable gate file is /etc/mtc/tmp/.node_locked on the local host.
Maintenance manages the presence or absence of this file based on
the node's administrative state.
This update also cleans up some extra whitespace in the changed file.
Test Plan:
PASS: Verify system build.
PASS: Verify AIO DX install.
PASS: Verify Standard DX system install with worker and storage.
For Both 'AIO DX' and 'Standard DX with worker and storage':
PASS: Verify SM does not activate on a locked controller.
PASS: ... DOR case
PASS: ... Uncontrolled Swact case
PASS: Verify Standard DX behavior over DOR with one locked controller
while the only unlocked controller does not recover.
PASS: Verify behavior after above test case once the only unlocked controller does recover.
PASS: Verify lock of the standby controller and its sm logs
PASS: Verify manually creating the new Nv locked file on the active controller will cause SM to go disabled and shut down all
services on that controller.
... If there is another unlocked controller then verify it
takes over as an uncontrolled swact.
... If there is no unlocked standby controller then verify SM remains shutdown until the manually created Nv node locked
file is removed. At which point SM proceeds to activate services on that controller again.
Regression:
PASS: Verify controlled swact with unlocked enabled standby.
PASS: Verify uncontrolled swact with unlocked enabled standby.
PASS: Verify standby controller lock/unlock soak loop (10).
PASS: Verify swact loop soak (10).
PASS: Verify no crash or core dumps.
Closes-Bug: 2051578
Change-Id: I0f0e3d199586513ddce484fdcc056e1b2562b45f
Signed-off-by: Eric MacDonald <email address hidden>
Reviewed: https:/ /review. opendev. org/c/starlingx /ha/+/907623 /opendev. org/starlingx/ ha/commit/ 23d0d8ab2f3225f 10594547c5f8a67 c409f815a0
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 23d0d8ab2f3225f 10594547c5f8a67 c409f815a0
Author: Eric MacDonald <email address hidden>
Date: Fri Feb 2 16:52:50 2024 +0000
Add node locked gate to SM enable
Service Management (SM) sometimes selects and activates services on a
locked controller following a dead office recovery.
This update adds a node locked check to SM's enable handler to
block enable if present much like the existing goenabled check
blocks enable if not present in the same function.
The enable gate file is /etc/mtc/ tmp/.node_ locked on the local host.
Maintenance manages the presence or absence of this file based on
the node's administrative state.
This update also cleans up some extra whitespace in the changed file.
Test Plan:
PASS: Verify system build.
PASS: Verify AIO DX install.
PASS: Verify Standard DX system install with worker and storage.
For Both 'AIO DX' and 'Standard DX with worker and storage':
PASS: Verify SM does not activate on a locked controller.
controller does recover.
controller will cause SM to go disabled and shut down all
remains shutdown until the manually created Nv node locked
services on that controller again.
PASS: ... DOR case
PASS: ... Uncontrolled Swact case
PASS: Verify Standard DX behavior over DOR with one locked controller
while the only unlocked controller does not recover.
PASS: Verify behavior after above test case once the only unlocked
PASS: Verify lock of the standby controller and its sm logs
PASS: Verify manually creating the new Nv locked file on the active
services on that controller.
... If there is another unlocked controller then verify it
takes over as an uncontrolled swact.
... If there is no unlocked standby controller then verify SM
file is removed. At which point SM proceeds to activate
Regression:
PASS: Verify controlled swact with unlocked enabled standby.
PASS: Verify uncontrolled swact with unlocked enabled standby.
PASS: Verify standby controller lock/unlock soak loop (10).
PASS: Verify swact loop soak (10).
PASS: Verify no crash or core dumps.
Closes-Bug: 2051578 3ddce484fdcc056 e1b2562b45f
Change-Id: I0f0e3d19958651
Signed-off-by: Eric MacDonald <email address hidden>