* Updated fence_pacemaker to no longer use stonith_admin and instead use pcs. This should resolve the main part of issue #279

Signed-off-by: digimer <digimer@gravitar.alteeve.com>
main
digimer 2 years ago
parent 0318b4bbe9
commit 98c3868870
  1. 1
      Anvil/Tools.pm
  2. 3
      tools/fence_pacemaker
  3. 1
      tools/unfence_pacemaker

@ -1261,7 +1261,6 @@ sub _set_paths
'ssh-keygen' => "/usr/bin/ssh-keygen", 'ssh-keygen' => "/usr/bin/ssh-keygen",
'ssh-keyscan' => "/usr/bin/ssh-keyscan", 'ssh-keyscan' => "/usr/bin/ssh-keyscan",
'stat' => "/usr/bin/stat", 'stat' => "/usr/bin/stat",
stonith_admin => "/usr/sbin/stonith_admin",
storcli64 => "/opt/MegaRAID/storcli/storcli64", storcli64 => "/opt/MegaRAID/storcli/storcli64",
strings => "/usr/bin/strings", strings => "/usr/bin/strings",
'striker-auto-initialize-all' => "/usr/sbin/striker-auto-initialize-all", 'striker-auto-initialize-all' => "/usr/sbin/striker-auto-initialize-all",

@ -82,7 +82,6 @@ my $conf = {
getent => "/usr/bin/getent", getent => "/usr/bin/getent",
logger => "/usr/bin/logger", logger => "/usr/bin/logger",
pcs => "/usr/sbin/pcs", pcs => "/usr/sbin/pcs",
stonith_admin => "/usr/sbin/stonith_admin",
}, },
}, },
# The script will set this. # The script will set this.
@ -738,7 +737,7 @@ sub kill_target
my ($conf) = @_; my ($conf) = @_;
# Variables # Variables
my $shell_call = $conf->{path}{exe}{stonith_admin}." --fence ".$conf->{cluster}{target_node}." --reboot --verbose; RC=\$?; ".$conf->{path}{exe}{crm_error}." \$RC; ".$conf->{path}{exe}{echo}." rc:\$RC"; my $shell_call = $conf->{path}{exe}{pcs}." stonith fence ".$conf->{cluster}{target_node}."; ".$conf->{path}{exe}{echo}." rc:\$?";
to_log($conf, {message => "Calling: [".$shell_call."]", 'line' => __LINE__, level => 2}); 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"; open (my $file_handle, $shell_call." 2>&1 |") or die "Failed to call: [".$shell_call."]. The error was: $!\n";
while(<$file_handle>) while(<$file_handle>)

@ -50,7 +50,6 @@ my $conf = {
getent => "/usr/bin/getent", getent => "/usr/bin/getent",
logger => "/usr/bin/logger", logger => "/usr/bin/logger",
pcs => "/usr/sbin/pcs", pcs => "/usr/sbin/pcs",
stonith_admin => "/usr/sbin/stonith_admin",
}, },
}, },
# The script will set this. # The script will set this.

Loading…
Cancel
Save