Skip to content

Commit

Permalink
Merge pull request os-autoinst#20736 from mpagot/qesap_test_cluster_d…
Browse files Browse the repository at this point in the history
…etect_failure

Qesap regression cluster health
  • Loading branch information
lilyeyes authored Dec 4, 2024
2 parents 10a24f7 + 18491db commit c238f8b
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions tests/sles4sap/qesapdeployment/test_cluster.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,18 @@ sub run {
root => 1
);
record_info("crm status", $crm_status);
if ($provider_setting eq 'AZURE') {
if (cluster_status_matches_regex($crm_status)) {
record_info('Retry', 'Found issue, do crm resource cleanup and retry');
qesap_ansible_cmd(cmd => 'sudo crm resource cleanup', provider => $provider_setting, filter => 'hana');
qesap_ansible_cmd(cmd => 'cs_wait_for_idle --sleep 5', provider => $provider_setting, filter => 'hana');
$crm_status = qesap_ansible_script_output(
cmd => 'crm status',
provider => $provider_setting,
host => '"hana[0]"',
root => 1
);
record_info('Retry crm status', $crm_status);
die 'Cluster resources throwing errors' if cluster_status_matches_regex($crm_status);
}
if (cluster_status_matches_regex($crm_status)) {
record_info('Retry', 'Found issue, do crm resource cleanup and retry');
qesap_ansible_cmd(cmd => 'sudo crm resource cleanup', provider => $provider_setting, filter => 'hana');
qesap_ansible_cmd(cmd => 'cs_wait_for_idle --sleep 5', provider => $provider_setting, filter => 'hana');
$crm_status = qesap_ansible_script_output(
cmd => 'crm status',
provider => $provider_setting,
host => '"hana[0]"',
root => 1
);
record_info('Retry crm status', $crm_status);
die 'Cluster resources throwing errors' if cluster_status_matches_regex($crm_status);
}

qesap_ansible_cmd(cmd => $crm_mon_cmd, provider => $provider_setting, filter => '"hana[0]"');
Expand Down

0 comments on commit c238f8b

Please sign in to comment.