Skip to content

Commit

Permalink
Enhance hanaSR module "sap_suse_cluster_connector"
Browse files Browse the repository at this point in the history
Enhance hanaSR module "sap_suse_cluster_connector", remove it from HANA scenarios and only schedule it on NetWeaver scenarios
TEAM-9612 - Enhance hanaSR test module "sap_suse_cluster_connector" according to the research of TEAM-9571
  • Loading branch information
lilyeyes committed Aug 28, 2024
1 parent a999030 commit 2019dda
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 29 deletions.
2 changes: 1 addition & 1 deletion lib/main_common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2748,11 +2748,11 @@ sub load_ha_cluster_tests {
loadtest 'sles4sap/netweaver_filesystems';
loadtest 'sles4sap/netweaver_install';
loadtest 'sles4sap/netweaver_cluster';
loadtest 'sles4sap/sap_suse_cluster_connector' if (check_var('HA_CLUSTER_INIT', 'yes'));
} elsif (get_var('HANA')) {
loadtest 'sles4sap/hana_install';
loadtest 'sles4sap/hana_cluster';
}
loadtest 'sles4sap/sap_suse_cluster_connector' if (check_var('HA_CLUSTER_INIT', 'yes'));
}
else {
# Test Hawk Web interface
Expand Down
5 changes: 0 additions & 5 deletions schedule/kernel/sles4sap/hana_cluster_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ schedule:
- '{{cluster_setup}}'
- sles4sap/hana_cluster
- sles4sap/monitoring_services
- '{{sap_suse_cluster_connector}}'
- '{{wmp_check_process}}'
- sles4sap/hana_test
- ha/fencing
Expand All @@ -73,10 +72,6 @@ conditional_schedule:
- ha/ha_cluster_init
no:
- ha/ha_cluster_join
sap_suse_cluster_connector:
HA_CLUSTER_INIT:
yes:
- sles4sap/sap_suse_cluster_connector
boot_to_desktop_node01:
HA_CLUSTER_INIT:
yes:
Expand Down
1 change: 0 additions & 1 deletion schedule/qam/15-SP2/qam-sles4sap_wmp_hana_node1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ schedule:
- sles4sap/wmp_setup
- ha/ha_cluster_init
- sles4sap/hana_cluster
- sles4sap/sap_suse_cluster_connector
- sles4sap/wmp_check_process
- ha/fencing
- boot/boot_to_desktop
Expand Down
1 change: 0 additions & 1 deletion schedule/qam/15-SP3/qam-sles4sap_wmp_hana_node1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ schedule:
- sles4sap/wmp_setup
- ha/ha_cluster_init
- sles4sap/hana_cluster
- sles4sap/sap_suse_cluster_connector
- sles4sap/wmp_check_process
- ha/fencing
- boot/boot_to_desktop
Expand Down
1 change: 0 additions & 1 deletion schedule/qam/15-SP4/qam-sles4sap_wmp_hana_node1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ schedule:
- sles4sap/wmp_setup
- ha/ha_cluster_init
- sles4sap/hana_cluster
- sles4sap/sap_suse_cluster_connector
- sles4sap/wmp_check_process
- ha/fencing
- boot/boot_to_desktop
Expand Down
1 change: 0 additions & 1 deletion schedule/qam/15-SP5/qam-sles4sap_wmp_hana_node1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ schedule:
- sles4sap/wmp_setup
- ha/ha_cluster_init
- sles4sap/hana_cluster
- sles4sap/sap_suse_cluster_connector
- sles4sap/wmp_check_process
- ha/fencing
- boot/boot_to_desktop
Expand Down
1 change: 0 additions & 1 deletion schedule/qam/15-SP6/qam-sles4sap_wmp_hana_node1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ schedule:
- sles4sap/wmp_setup
- ha/ha_cluster_init
- sles4sap/hana_cluster
- sles4sap/sap_suse_cluster_connector
- sles4sap/wmp_check_process
- ha/fencing
- boot/boot_to_desktop
Expand Down
1 change: 0 additions & 1 deletion schedule/qam/common/qam-sles4sap_hana_node01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ schedule:
- ha/ha_cluster_init
- sles4sap/hana_install
- sles4sap/hana_cluster
- sles4sap/sap_suse_cluster_connector
- ha/fencing
- boot/boot_to_desktop
- ha/check_after_reboot
Expand Down
1 change: 1 addition & 0 deletions schedule/sles4sap/ensa/ensa_nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ schedule:
- sles4sap/ensa/netweaver_ensa2_cluster
- sles4sap/ensa/netweaver_ensa2_cluster_connector
- sles4sap/ensa/netweaver_ensa2_web_methods
- sles4sap/sap_suse_cluster_connector
- ha/check_logs
conditional_schedule:
cluster_setup:
Expand Down
5 changes: 0 additions & 5 deletions schedule/sles4sap/hana/hana_cluster_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ schedule:
- '{{cluster_setup}}'
- sles4sap/hana_cluster
- sles4sap/monitoring_services
- '{{sap_suse_cluster_connector}}'
- '{{wmp_check_process}}'
- sles4sap/hana_test
- ha/fencing
Expand All @@ -72,10 +71,6 @@ conditional_schedule:
- ha/ha_cluster_init
no:
- ha/ha_cluster_join
sap_suse_cluster_connector:
HA_CLUSTER_INIT:
yes:
- sles4sap/sap_suse_cluster_connector
boot_to_desktop_node01:
HA_CLUSTER_INIT:
yes:
Expand Down
5 changes: 0 additions & 5 deletions schedule/sles4sap/hana/pvm_hana_cluster_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ schedule:
- sles4sap/hana_install
- '{{cluster_setup}}'
- sles4sap/hana_cluster
- '{{sap_suse_cluster_connector}}'
- ha/fencing
- '{{boot_to_desktop}}'
- ha/check_after_reboot
Expand All @@ -96,10 +95,6 @@ conditional_schedule:
- ha/ha_cluster_init
no:
- ha/ha_cluster_join
sap_suse_cluster_connector:
HA_CLUSTER_INIT:
yes:
- sles4sap/sap_suse_cluster_connector
boot_to_desktop:
HA_CLUSTER_INIT:
yes:
Expand Down
5 changes: 0 additions & 5 deletions schedule/sles4sap/qam/common/qam_hana_cluster_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ schedule:
- '{{wmp_setup}}'
- '{{cluster_setup}}'
- sles4sap/hana_cluster
- '{{sap_suse_cluster_connector}}'
- '{{wmp_check_process}}'
- sles4sap/hana_test
- ha/fencing
Expand All @@ -72,10 +71,6 @@ conditional_schedule:
- ha/ha_cluster_init
no:
- ha/ha_cluster_join
sap_suse_cluster_connector:
HA_CLUSTER_INIT:
yes:
- sles4sap/sap_suse_cluster_connector
boot_to_desktop_node01:
HA_CLUSTER_INIT:
yes:
Expand Down
11 changes: 9 additions & 2 deletions tests/sles4sap/sap_suse_cluster_connector.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ sub exec_conn_cmd {
my $cmd = $args{cmd};
$cmd .= " --out $args{log_file}" if ($args{log_file});

script_run("rm -f $args{log_file}") if ($args{log_file});
assert_script_run("$args{binary} $cmd", timeout => $timeout);
if ($args{log_file}) {
my $output = script_output("cat $args{log_file}", proceed_on_failure => 1);
Expand Down Expand Up @@ -59,9 +60,14 @@ sub run {

# Test Maintenance Mode
foreach my $mod (1, 0) {
exec_conn_cmd(binary => $binary, cmd => "smm --sid $instance_sid --ino $instance_id --mod $mod", log_file => $log_file);
my $retval = exec_conn_cmd(binary => $binary, cmd => "smm --sid $instance_sid --ino $instance_id --mod $mod", log_file => $log_file);
# Return code in general:
# 0: successfull command termination or "yes" to a yes-no-query
# 1: unsucessfull command termination or "no" to a yes-no-query
# 2: error occurred during command termination - mostly bad parameters
die "Commad 'smm' failed and returns $retval" if ($retval == 2);
# Wait to let enough time for the HA stack to change Maintenance Mode
sleep 10;
wait_for_idle_cluster;
}

# List nodes
Expand All @@ -71,6 +77,7 @@ sub run {
my $rsc = "rsc_${rsc_type}_${instance_sid}_$instance_type$instance_id";
wait_for_idle_cluster;
exec_conn_cmd(binary => $binary, cmd => "lsn --res $rsc", log_file => $log_file);
validate_script_output("cat $log_file 2>&1", sub { m/$rsc/ });
}

# Test Stop/Start of SAP resource
Expand Down

0 comments on commit 2019dda

Please sign in to comment.