From d072d0435309b217e2abf21d1ecfd31effb4d7c3 Mon Sep 17 00:00:00 2001 From: lilyeyes Date: Thu, 19 Sep 2024 18:48:19 +0800 Subject: [PATCH] Use choose_node to get remote node hostname --- tests/sles4sap/sap_suse_cluster_connector.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sles4sap/sap_suse_cluster_connector.pm b/tests/sles4sap/sap_suse_cluster_connector.pm index 8fe2a5773c8e..b228453a19da 100644 --- a/tests/sles4sap/sap_suse_cluster_connector.pm +++ b/tests/sles4sap/sap_suse_cluster_connector.pm @@ -82,7 +82,7 @@ sub run { validate_script_output("cat $log_file | cut -d : -f 4", sub { m/$hostname/ }); record_info("Found $hostname in lsn output"); # Check the "node list" contains remote node - my $remote_node = script_output("crm status bynode | grep -Po '(?<=\\* Node )(.*)(?=: online:\$)' | grep -v $hostname"); + my $remote_node = choose_node(2); validate_script_output("cat $log_file | cut -d : -f 4", sub { m/$remote_node/ }); record_info("Found $remote_node in lsn output"); }