Skip to content

Commit

Permalink
Qesap regression cluster health
Browse files Browse the repository at this point in the history
Check cluster health for all CSP and not only for tests running in
Azure.
  • Loading branch information
mpagot committed Dec 3, 2024
1 parent 23c07de commit 18491db
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 18491db

Please sign in to comment.