Skip to content

Commit

Permalink
Fix HanaSR sporadically fails on ssh cmd 124 error
Browse files Browse the repository at this point in the history
Fix Public Cloud HanaSR sporadically failed on "Stop_site_b-primary/Crash_replica": ssh timed out, returned 124
TEAM-9601 - [PC] HanaSR sporadically failed on "Stop_site_b-primary/Crash_replica": ssh timed out, returned 124
  • Loading branch information
lilyeyes committed Aug 19, 2024
1 parent e144945 commit cbbeda0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/sles4sap_publiccloud.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ sub wait_for_idle {

my $rc = $self->run_cmd(cmd => 'cs_wait_for_idle --sleep 5', timeout => $timeout, rc_only => 1, proceed_on_failure => 1);
if ($rc == 124) {
record_info("cs_wait_for_idle", "cs_wait_for_idle timed out after $timeout. Gathering info and retrying");
record_info("WARN cs_wait_for_idle", "cs_wait_for_idle timed out after $timeout. Gathering info and retrying");
$self->run_cmd(cmd => 'cs_clusterstate', proceed_on_failure => 1);
$self->run_cmd(cmd => 'crm_mon -r -R -n -N -1', proceed_on_failure => 1);
$self->run_cmd(cmd => 'SAPHanaSR-showAttr', proceed_on_failure => 1);
Expand Down
6 changes: 3 additions & 3 deletions tests/sles4sap/publiccloud/hana_sr_takeover.pm
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ sub run {
$self->{my_instance}->wait_for_ssh(username => 'cloudadmin');

# SBD delay is active only after reboot
if (($takeover_action eq 'crash' and $sbd_delay != 0) ||
# Add SBD delay for 'stop' to fix sporadic 'takeover failed to complete' issue on EC2
($takeover_action eq 'stop' and check_var('PUBLIC_CLOUD_PROVIDER', 'EC2'))) {
if ($takeover_action eq 'crash' || $takeover_action eq 'stop') {
# Add SBD delay for to fix sporadic 'takeover failed to complete' issue on EC2
# Also fix sporadic issues (ssh timed out) mentioned in TEAM-9601
record_info('SBD SLEEP', "Waiting $sbd_delay sec for SBD delay timeout.");
# test needs to wait a little more than sbd delay
sleep($sbd_delay + 30);
Expand Down
2 changes: 1 addition & 1 deletion tests/sles4sap/publiccloud/hana_sr_test_secondary.pm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sub run {
$self->{my_instance}->wait_for_ssh(username => 'cloudadmin');

# SBD delay is active only after reboot
if ($db_action eq 'crash' and $sbd_delay != 0) {
if ($db_action eq 'crash' || $db_action eq 'stop') {
record_info('SBD SLEEP', "Waiting $sbd_delay sec for SBD delay timeout.");
# sleep needs to be a little longer than sbd start delay
sleep($sbd_delay + 30);
Expand Down

0 comments on commit cbbeda0

Please sign in to comment.