Skip to content

Commit

Permalink
Merge pull request os-autoinst#20497 from alvarocarvajald/team9768
Browse files Browse the repository at this point in the history
Ensure we run $self->wait_for_cluster in a cluster node
  • Loading branch information
a-kpappas authored Oct 29, 2024
2 parents 323b99b + 007b81d commit 36cebb4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/sles4sap/publiccloud/qesap_prevalidate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,17 @@ sub run {
}
}

# Exit early if not in cluster scenario
return unless $ha_enabled;

# Check cluster for overall readiness (nodes online, in sync and crm output contains no failed resources)
# First make sure that instance in $self->{my_instance} is a hana node
foreach my $instance (@{$self->{instances}}) {
$self->{my_instance} = $instance;
last if ($instance->{instance_id} =~ m/vmhana/);
}
$self->wait_for_cluster(wait_time => 60, max_retries => 10);

return unless $ha_enabled;

record_info(
'Instances:', "Detected HANA instances:
Site A (PRIMARY): $run_args->{$hana_sites[0]}{instance_id}
Expand Down

0 comments on commit 36cebb4

Please sign in to comment.