diff --git a/Anvil/Tools.pm b/Anvil/Tools.pm index 2afd49c1..d8031fa3 100644 --- a/Anvil/Tools.pm +++ b/Anvil/Tools.pm @@ -1270,6 +1270,7 @@ sub _set_paths parted => "/usr/sbin/parted", passwd => "/usr/bin/passwd", pcs => "/usr/sbin/anvil-pcs-wrapper", + pcs_direct => "/usr/sbin/pcs", perccli64 => "/opt/MegaRAID/perccli/perccli64", pidof => "/usr/sbin/pidof", ping => "/usr/bin/ping", diff --git a/tools/anvil-safe-stop b/tools/anvil-safe-stop index 6a783ea5..16192448 100755 --- a/tools/anvil-safe-stop +++ b/tools/anvil-safe-stop @@ -239,7 +239,7 @@ sub stop_cluster ### NOTE: '--force' is needed or else sole-running nodes can't exit ### (complains about the loss of quorum) - my $shell_call = $anvil->data->{path}{exe}{pcs}." cluster stop --force"; + my $shell_call = $anvil->data->{path}{exe}{pcs_direct}." cluster stop --force"; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }}); my ($output, $return_code) = $anvil->System->call({shell_call => $shell_call}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { diff --git a/tools/fence_pacemaker b/tools/fence_pacemaker index 9c35bae5..3d5dec60 100755 --- a/tools/fence_pacemaker +++ b/tools/fence_pacemaker @@ -82,7 +82,8 @@ my $conf = { getent => "/usr/bin/getent", hostnamectl => "/usr/bin/hostnamectl", logger => "/usr/bin/logger", - pcs => "/usr/sbin/pcs", + pcs => "/usr/sbin/anvil-pcs-wrapper", + pcs_direct => "/usr/sbin/pcs", }, }, # The script will set this. @@ -192,7 +193,7 @@ sub create_constraint # Make sure there's a rule to apply the node attribute against. my $rule_found = 0; my $rule_name = "drbd-fenced_".$target_server; - my $shell_call = $conf->{path}{exe}{pcs}." constraint location config show ".$target_server; + my $shell_call = $conf->{path}{exe}{pcs_direct}." constraint location config show ".$target_server; to_log($conf, {message => "Calling: [".$shell_call."]", 'line' => __LINE__, level => 1}); open (my $file_handle, $shell_call." 2>&1 |") or die "Failed to call: [".$shell_call."]. The error was: $!\n"; while(<$file_handle>) @@ -353,7 +354,7 @@ sub set_location_constraint } to_log($conf, {message => "Setting the pacemaker location constraint so that: [".$server."] prefers this host.", 'line' => __LINE__, level => 1}); - my $shell_call = $conf->{path}{exe}{pcs}." constraint location ".$server." prefers ".$local_host."=200 ".$peer_host."=100"; + my $shell_call = $conf->{path}{exe}{pcs_direct}." constraint location ".$server." prefers ".$local_host."=200 ".$peer_host."=100"; to_log($conf, {message => "Calling: [".$shell_call."]", 'line' => __LINE__, level => 2}); open (my $file_handle, $shell_call." 2>&1 |") or die "Failed to call: [".$shell_call."]. The error was: $!\n"; while(<$file_handle>) @@ -943,7 +944,7 @@ sub kill_target my ($conf) = @_; # Variables - my $shell_call = $conf->{path}{exe}{pcs}." stonith fence ".$conf->{cluster}{target_node}."; ".$conf->{path}{exe}{echo}." rc:\$?"; + my $shell_call = $conf->{path}{exe}{pcs_direct}." stonith fence ".$conf->{cluster}{target_node}."; ".$conf->{path}{exe}{echo}." rc:\$?"; to_log($conf, {message => "Calling: [".$shell_call."]", 'line' => __LINE__, level => 2}); open (my $file_handle, $shell_call." 2>&1 |") or die "Failed to call: [".$shell_call."]. The error was: $!\n"; while(<$file_handle>) diff --git a/tools/striker-collect-debug b/tools/striker-collect-debug index 1ed40271..d7c31097 100755 --- a/tools/striker-collect-debug +++ b/tools/striker-collect-debug @@ -553,7 +553,7 @@ sub collect_remote_data { ### NOTE: The pcs wrapper was timing out when dumping the CIB, hence statically calling pcs below. print "- Collecting the cluster information base (CIB)... "; - $shell_call = "/usr/sbin/pcs cluster cib > /tmp/cib.xml"; + $shell_call = $anvil->data->{path}{exe}{pcs_direct}." cluster cib > /tmp/cib.xml"; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }}); ($output, $error, $return_code) = $anvil->Remote->call({ @@ -745,7 +745,7 @@ sub collect_local_data if ($this_host_type eq "node") { print "- Collecting the cluster information base (CIB)... "; - $shell_call = $anvil->data->{path}{exe}{pcs}." cluster cib > ".$target_directory."/cib.xml"; + $shell_call = $anvil->data->{path}{exe}{pcs_direct}." cluster cib > ".$target_directory."/cib.xml"; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }}); ($output, $return_code) = $anvil->System->call({shell_call => $shell_call}); diff --git a/tools/unfence_pacemaker b/tools/unfence_pacemaker index 75cae101..036a218e 100755 --- a/tools/unfence_pacemaker +++ b/tools/unfence_pacemaker @@ -49,7 +49,8 @@ my $conf = { echo => "/usr/bin/echo", getent => "/usr/bin/getent", logger => "/usr/bin/logger", - pcs => "/usr/sbin/pcs", + pcs => "/usr/sbin/anvil-pcs-wrapper", + pcs_direct => "/usr/sbin/pcs", }, }, # The script will set this.