Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=a2b07ebb…
Commit: a2b07ebb3b2050bf04b4d31a7a613efccf1096ff
Parent: 752879cf1f77c85149925f0a48f03215d544ee4f
Author: David Vossel <dvossel(a)redhat.com>
AuthorDate: Wed Nov 7 14:15:03 2012 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Wed Nov 7 14:19:47 2012 -0600
fence_scsi: support unfence action in Pacemaker
Add attribute to fence_scsi's metadata that indicates that on action
must be performed on local node. Also allow metadata action via stdin.
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index ef7d14d..e3c78b4 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -746,7 +746,7 @@ sub print_metadata ()
print "\t</parameter>\n";
print "</parameters>\n";
print "<actions>\n";
- print "\t<action name=\"on\"/>\n";
+ print "\t<action name=\"on\" on_target=\"true\"/>\n";
print "\t<action name=\"off\"/>\n";
print "\t<action name=\"status\"/>\n";
print "\t<action name=\"metadata\"/>\n";
@@ -760,19 +760,18 @@ sub print_metadata ()
if (@ARGV > 0) {
getopts ("ad:f:hk:n:o:qV") or print_usage;
-
print_usage if (defined $opt_h);
print_version if (defined $opt_V);
-
- ## handle the metadata action here to avoid other parameter checks
- ##
- if ($opt_o =~ /^metadata$/i) {
- print_metadata;
- }
} else {
get_options_stdin ();
}
+## handle the metadata action here to avoid other parameter checks
+##
+if ($opt_o =~ /^metadata$/i) {
+ print_metadata;
+}
+
## if the logfile (-f) parameter was specified, open the logfile
## and redirect STDOUT and STDERR to the logfile.
##