Increase timeout heartbeat_failure_action validation

It was observed in some scenarios where the update of
heartbeat_failure_action parameter takes around 40 seconds to
complete the configuration of the nodes. This commit increases
the maximum wait time of verify_heartbeat_failure_action
function from 21 seconds to 60 seconds per the verification of
mtc.ini file every 4 seconds for a maximum of 15 attempts.

Test Plan:
PASS: Deploy AIO-DX system on stx 10 version and manually execute
      101-configure-ipsec-on-hosts.py script w/ activate. Observe
      that IPsec is disabled on all nodes and the nodes.

PASS: Deploy AIO-DX system on stx 10 version and manually execute
      101-configure-ipsec-on-hosts.py script w/ activate-rollback.
      Observe that IPsec is disabled on all nodes and the nodes.

Story: 2010940
Task: 51202

Change-Id: I5a45c7a4b5ca1d440ddc9924a05ee7d04995b1f2
Signed-off-by: Leonardo Mendes <Leonardo.MendesSantana@windriver.com>
This commit is contained in:
Leonardo Mendes 2024-10-21 17:17:45 -03:00
parent cdcaba915c
commit a36b863135

View File

@ -272,11 +272,11 @@ def verify_heartbeat_failure_action(action):
After service-parameter apply is called, the command takes some time to After service-parameter apply is called, the command takes some time to
change heartbeat failure action value and complete system configuration. change heartbeat failure action value and complete system configuration.
This function verifies the heartbeat_failure_action value in /etc/mtc.ini This function verifies the heartbeat_failure_action value in /etc/mtc.ini
every 03 seconds (maximum wait time: 21 seconds) in order to validate every 04 seconds (maximum wait time: 60 seconds) in order to validate
that the parameter was updated. that the parameter was updated.
""" """
for i in range(7): for i in range(15):
time.sleep(3) time.sleep(4)
value = get_heartbeat_failure_action() value = get_heartbeat_failure_action()
if value == action: if value == action:
return True return True