From 2f193d5dcc8df6b25a31b387753f7e1fb682f151 Mon Sep 17 00:00:00 2001 From: lilyeyes Date: Thu, 22 Aug 2024 15:42:24 +0800 Subject: [PATCH] Enhance hanaSR module "sap_suse_cluster_connector" 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 --- lib/main_common.pm | 2 +- schedule/kernel/sles4sap/hana_cluster_node.yaml | 5 ----- schedule/qam/15-SP2/qam-sles4sap_wmp_hana_node1.yaml | 1 - schedule/qam/15-SP3/qam-sles4sap_wmp_hana_node1.yaml | 1 - schedule/qam/15-SP4/qam-sles4sap_wmp_hana_node1.yaml | 1 - schedule/qam/15-SP5/qam-sles4sap_wmp_hana_node1.yaml | 1 - schedule/qam/15-SP6/qam-sles4sap_wmp_hana_node1.yaml | 1 - .../common/qam-sle_sles4sap_scc_gnome_netweaver_cli.yml | 1 + schedule/qam/common/qam-sles4sap_hana_node01.yml | 1 - schedule/sles4sap/hana/hana_cluster_node.yaml | 5 ----- schedule/sles4sap/hana/pvm_hana_cluster_node.yaml | 5 ----- schedule/sles4sap/qam/common/qam_hana_cluster_node.yaml | 5 ----- tests/sles4sap/sap_suse_cluster_connector.pm | 7 +++++-- 13 files changed, 7 insertions(+), 29 deletions(-) diff --git a/lib/main_common.pm b/lib/main_common.pm index 125feac20b41..6d30523b897d 100644 --- a/lib/main_common.pm +++ b/lib/main_common.pm @@ -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 diff --git a/schedule/kernel/sles4sap/hana_cluster_node.yaml b/schedule/kernel/sles4sap/hana_cluster_node.yaml index fdba194c0992..67de6a757689 100644 --- a/schedule/kernel/sles4sap/hana_cluster_node.yaml +++ b/schedule/kernel/sles4sap/hana_cluster_node.yaml @@ -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 @@ -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: diff --git a/schedule/qam/15-SP2/qam-sles4sap_wmp_hana_node1.yaml b/schedule/qam/15-SP2/qam-sles4sap_wmp_hana_node1.yaml index 2559fe404d28..ae6b5022e3d5 100644 --- a/schedule/qam/15-SP2/qam-sles4sap_wmp_hana_node1.yaml +++ b/schedule/qam/15-SP2/qam-sles4sap_wmp_hana_node1.yaml @@ -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 diff --git a/schedule/qam/15-SP3/qam-sles4sap_wmp_hana_node1.yaml b/schedule/qam/15-SP3/qam-sles4sap_wmp_hana_node1.yaml index 2559fe404d28..ae6b5022e3d5 100644 --- a/schedule/qam/15-SP3/qam-sles4sap_wmp_hana_node1.yaml +++ b/schedule/qam/15-SP3/qam-sles4sap_wmp_hana_node1.yaml @@ -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 diff --git a/schedule/qam/15-SP4/qam-sles4sap_wmp_hana_node1.yaml b/schedule/qam/15-SP4/qam-sles4sap_wmp_hana_node1.yaml index 2559fe404d28..ae6b5022e3d5 100644 --- a/schedule/qam/15-SP4/qam-sles4sap_wmp_hana_node1.yaml +++ b/schedule/qam/15-SP4/qam-sles4sap_wmp_hana_node1.yaml @@ -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 diff --git a/schedule/qam/15-SP5/qam-sles4sap_wmp_hana_node1.yaml b/schedule/qam/15-SP5/qam-sles4sap_wmp_hana_node1.yaml index 2559fe404d28..ae6b5022e3d5 100644 --- a/schedule/qam/15-SP5/qam-sles4sap_wmp_hana_node1.yaml +++ b/schedule/qam/15-SP5/qam-sles4sap_wmp_hana_node1.yaml @@ -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 diff --git a/schedule/qam/15-SP6/qam-sles4sap_wmp_hana_node1.yaml b/schedule/qam/15-SP6/qam-sles4sap_wmp_hana_node1.yaml index 2559fe404d28..ae6b5022e3d5 100644 --- a/schedule/qam/15-SP6/qam-sles4sap_wmp_hana_node1.yaml +++ b/schedule/qam/15-SP6/qam-sles4sap_wmp_hana_node1.yaml @@ -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 diff --git a/schedule/qam/common/qam-sle_sles4sap_scc_gnome_netweaver_cli.yml b/schedule/qam/common/qam-sle_sles4sap_scc_gnome_netweaver_cli.yml index 7fb5cb3a7c91..72d7309819c9 100644 --- a/schedule/qam/common/qam-sle_sles4sap_scc_gnome_netweaver_cli.yml +++ b/schedule/qam/common/qam-sle_sles4sap_scc_gnome_netweaver_cli.yml @@ -7,3 +7,4 @@ schedule: - sles4sap/patterns - sles4sap/netweaver_install - sles4sap/netweaver_test_instance + - sles4sap/sap_suse_cluster_connector diff --git a/schedule/qam/common/qam-sles4sap_hana_node01.yml b/schedule/qam/common/qam-sles4sap_hana_node01.yml index a846948d06b0..ce95c110e971 100644 --- a/schedule/qam/common/qam-sles4sap_hana_node01.yml +++ b/schedule/qam/common/qam-sles4sap_hana_node01.yml @@ -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 diff --git a/schedule/sles4sap/hana/hana_cluster_node.yaml b/schedule/sles4sap/hana/hana_cluster_node.yaml index 396539de18c0..a6899e4591ed 100644 --- a/schedule/sles4sap/hana/hana_cluster_node.yaml +++ b/schedule/sles4sap/hana/hana_cluster_node.yaml @@ -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 @@ -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: diff --git a/schedule/sles4sap/hana/pvm_hana_cluster_node.yaml b/schedule/sles4sap/hana/pvm_hana_cluster_node.yaml index 0723e687886d..1d833006c0e0 100644 --- a/schedule/sles4sap/hana/pvm_hana_cluster_node.yaml +++ b/schedule/sles4sap/hana/pvm_hana_cluster_node.yaml @@ -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 @@ -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: diff --git a/schedule/sles4sap/qam/common/qam_hana_cluster_node.yaml b/schedule/sles4sap/qam/common/qam_hana_cluster_node.yaml index 9ca257fd60ab..472856a6590e 100644 --- a/schedule/sles4sap/qam/common/qam_hana_cluster_node.yaml +++ b/schedule/sles4sap/qam/common/qam_hana_cluster_node.yaml @@ -52,7 +52,6 @@ schedule: - '{{wmp_setup}}' - '{{cluster_setup}}' - sles4sap/hana_cluster - - '{{sap_suse_cluster_connector}}' - '{{wmp_check_process}}' - sles4sap/hana_test - ha/fencing @@ -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: diff --git a/tests/sles4sap/sap_suse_cluster_connector.pm b/tests/sles4sap/sap_suse_cluster_connector.pm index d31cdd3c42f1..9198e21fb151 100644 --- a/tests/sles4sap/sap_suse_cluster_connector.pm +++ b/tests/sles4sap/sap_suse_cluster_connector.pm @@ -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); @@ -59,9 +60,10 @@ 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); + 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 @@ -71,6 +73,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