Skip to content

Commit

Permalink
Fix ENSA2 failing on 12sp5 during failover
Browse files Browse the repository at this point in the history
TEAM-9261 - [ENSA2]Investigate ENSA2 failing on 12sp5 during failover
  • Loading branch information
lilyeyes committed Jun 7, 2024
1 parent b4f7333 commit 32b2a34
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/sles4sap/ensa/netweaver_ensa2_web_methods.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,22 @@ use serial_terminal qw(select_serial_terminal);

sub webmethod_checks {
my ($self, $instance_id) = @_;
my $outputs;
my $looptime = 300;

# General status will help with troubleshooting
$self->sap_show_status_info(cluster => 1, netweaver => 1, instance_id => $instance_id);
record_info('ENSA check', "Executing 'HACheckConfig' and 'HACheckFailoverConfig'");
$self->sapcontrol(webmethod => 'HACheckConfig', instance_id => $instance_id);
while ($outputs = $self->sapcontrol(webmethod => 'HACheckConfig', instance_id => $instance_id, return_output => 1)) {
if ($outputs =~ /ERROR/) {
record_info("ERROR found in HACheckConfig: $outputs", "sleep 30s and try again");
sleep 30;
$looptime -= 30;
last if ($looptime <= 0);
next;
}
last;
}
$self->sapcontrol(webmethod => 'HACheckFailoverConfig', instance_id => $instance_id);
}

Expand Down Expand Up @@ -61,6 +73,11 @@ sub run {
$self->webmethod_checks($instance_id);
# Execute failover from ASCS instance - this will return resources to original host
if ($instance_type eq 'ASCS') {
# Some delay needed here for 12-SP5, don't know why even webmethod_checks passed
if (is_sle('=12-SP5')) {
sleep 60;
record_info "sleep 60s for 12-SP5";
}
record_info('Failover', "Executing 'HAFailoverToNode'. Failover from $physical_hostname to remote site");
$self->sapcontrol(webmethod => 'HAFailoverToNode', instance_id => $instance_id, additional_args => "\"\"");
}
Expand Down

0 comments on commit 32b2a34

Please sign in to comment.