diff --git a/.fence-agents.metadata b/.fence-agents.metadata new file mode 100644 index 0000000..6d34543 --- /dev/null +++ b/.fence-agents.metadata @@ -0,0 +1 @@ +feb51459639ea8ca310ba1a5b79e38aacdc9a615 SOURCES/fence-agents-4.0.2.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/bz-fence_bladecenter-Fix-telnet-login-failure.patch b/SOURCES/bz-fence_bladecenter-Fix-telnet-login-failure.patch new file mode 100644 index 0000000..c16257d --- /dev/null +++ b/SOURCES/bz-fence_bladecenter-Fix-telnet-login-failure.patch @@ -0,0 +1,52 @@ +From 0981cfd54d6dbfb0bf5af536ed2c77b0594f13bb Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 28 Aug 2013 14:17:04 +0200 +Subject: [PATCH 6/6] fence_bladecenter: Fix telnet login failure + +Problem occured due to fact that welcome message contains string which looks like login prompt. + +Resolves: rhbz#997416 +--- + fence/agents/bladecenter/fence_bladecenter.py | 2 +- + fence/agents/lib/fencing.py.py | 5 ++--- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/fence/agents/bladecenter/fence_bladecenter.py b/fence/agents/bladecenter/fence_bladecenter.py +index e199dee..40d7136 100644 +--- a/fence/agents/bladecenter/fence_bladecenter.py ++++ b/fence/agents/bladecenter/fence_bladecenter.py +@@ -100,7 +100,7 @@ and uses the command line interface to power on and off blades." + ## + ## Operate the fencing device + ###### +- conn = fence_login(options) ++ conn = fence_login(options, "(username: )") + result = fence_action(conn, options, set_power_status, get_power_status, get_blades_list) + + ## +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index c896e90..2131d6d 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -950,8 +950,8 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list = None + + return result + +-def fence_login(options): +- force_ipvx = "" ++def fence_login(options, re_login_string = "(login\s*: )|(Login Name: )|(username: )|(User Name :)"): ++ force_ipvx="" + + if (options.has_key("--inet6-only")): + force_ipvx = "-6 " +@@ -971,7 +971,6 @@ def fence_login(options): + time.sleep(int(options["--delay"])) + + try: +- re_login_string = "(login\s*: )|(Login Name: )|(username: )|(User Name :)" + re_login = re.compile(re_login_string, re.IGNORECASE) + re_pass = re.compile("(password)|(pass phrase)", re.IGNORECASE) + +-- +1.7.7.6 + diff --git a/SOURCES/bz-fence_brocade-Port-fencing-agent-to-fencing-library.patch b/SOURCES/bz-fence_brocade-Port-fencing-agent-to-fencing-library.patch new file mode 100644 index 0000000..216edff --- /dev/null +++ b/SOURCES/bz-fence_brocade-Port-fencing-agent-to-fencing-library.patch @@ -0,0 +1,459 @@ +From bf77062b93a43a2ef288ca8b6e6b0a889c2993c3 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Thu, 29 Aug 2013 16:22:15 +0200 +Subject: [PATCH 5/6] fence_brocade: Port fencing agent to fencing library + +Resolves: rhbz#641632 rhbz#642232 rhbz#841556 +--- + fence/agents/brocade/Makefile.am | 4 +- + fence/agents/brocade/fence_brocade.pl | 322 --------------------------------- + fence/agents/brocade/fence_brocade.py | 86 +++++++++ + 3 files changed, 88 insertions(+), 324 deletions(-) + delete mode 100644 fence/agents/brocade/fence_brocade.pl + create mode 100644 fence/agents/brocade/fence_brocade.py + +diff --git a/fence/agents/brocade/Makefile.am b/fence/agents/brocade/Makefile.am +index 3338804..171425f 100644 +--- a/fence/agents/brocade/Makefile.am ++++ b/fence/agents/brocade/Makefile.am +@@ -2,7 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in + + TARGET = fence_brocade + +-SRC = $(TARGET).pl ++SRC = $(TARGET).py + + EXTRA_DIST = $(SRC) + +@@ -11,7 +11,7 @@ sbin_SCRIPTS = $(TARGET) + man_MANS = $(TARGET).8 + + include $(top_srcdir)/make/fencebuild.mk +-include $(top_srcdir)/make/fencemanperl.mk ++include $(top_srcdir)/make/fenceman.mk + + clean-local: clean-man + rm -f $(TARGET) +diff --git a/fence/agents/brocade/fence_brocade.pl b/fence/agents/brocade/fence_brocade.pl +deleted file mode 100644 +index 4be0436..0000000 +--- a/fence/agents/brocade/fence_brocade.pl ++++ /dev/null +@@ -1,322 +0,0 @@ +-#!/usr/bin/perl +- +-use Getopt::Std; +-use Net::Telnet (); +- +-my $ME = $0; +- +-END { +- defined fileno STDOUT or return; +- close STDOUT and return; +- warn "$ME: failed to close standard output: $!\n"; +- $? ||= 1; +-} +- +-# Get the program name from $0 and strip directory names +-$_=$0; +-s/.*\///; +-my $pname = $_; +- +-$opt_o = 'disable'; # Default fence action +- +-# WARNING!! Do not add code bewteen "#BEGIN_VERSION_GENERATION" and +-# "#END_VERSION_GENERATION" It is generated by the Makefile +- +-#BEGIN_VERSION_GENERATION +-$RELEASE_VERSION=""; +-$REDHAT_COPYRIGHT=""; +-$BUILD_DATE=""; +-#END_VERSION_GENERATION +- +- +-sub usage +-{ +- print "Usage:\n"; +- print "\n"; +- print "$pname [options]\n"; +- print "\n"; +- print "Options:\n"; +- print " -a IP address or hostname of switch\n"; +- print " -h usage\n"; +- print " -l Login name\n"; +- print " -n Port number to operate on\n"; +- print " -o Action: disable (default), enable or metadata\n"; +- print " -p Password for login\n"; +- print " -S Script to run to retrieve password\n"; +- print " -q quiet mode\n"; +- print " -V version\n"; +- +- exit 0; +-} +- +-sub fail +-{ +- ($msg) = @_; +- print $msg."\n" unless defined $opt_q; +- $t->close if defined $t; +- exit 1; +-} +- +-sub fail_usage +-{ +- ($msg)=@_; +- print STDERR $msg."\n" if $msg; +- print STDERR "Please use '-h' for usage.\n"; +- exit 1; +-} +- +-sub version +-{ +- print "$pname $RELEASE_VERSION $BUILD_DATE\n"; +- print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT ); +- +- exit 0; +-} +- +-sub print_metadata +-{ +-print ' +- +- +-fence_brocade is an I/O Fencing agent which can be used with Brocade FC switches. It logs into a Brocade switch via telnet and disables a specified port. Disabling the port which a machine is connected to effectively fences that machine. Lengthy telnet connections to the switch should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. +- +-After a fence operation has taken place the fenced machine can no longer connect to the Brocade FC switch. When the fenced machine is ready to be brought back into the GFS cluster (after reboot) the port on the Brocade FC switch needs to be enabled. This can be done by running fence_brocade and specifying the enable action. +- +-http://www.brocade.com +- +- +- +- +- Fencing Action +- +- +- +- +- IP Address or Hostname +- +- +- +- +- Login Name +- +- +- +- +- Login password or passphrase +- +- +- +- +- Script to retrieve password +- +- +- +- +- Physical plug number or name of virtual machine +- +- +- +- +- Display help and exit +- +- +- +- +- +- +- +- +- +-'; +-} +- +- +-if (@ARGV > 0) { +- getopts("a:hl:n:o:p:S:qV") || fail_usage ; +- +- usage if defined $opt_h; +- version if defined $opt_V; +- +- fail_usage "Unknown parameter." if (@ARGV > 0); +- +- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) { +- print_metadata(); +- exit 0; +- } +- +- if (defined $opt_S) { +- $pwd_script_out = `$opt_S`; +- chomp($pwd_script_out); +- if ($pwd_script_out) { +- $opt_p = $pwd_script_out; +- } +- } +- +- fail_usage "No '-a' flag specified." unless defined $opt_a; +- fail_usage "No '-n' flag specified." unless defined $opt_n; +- fail_usage "No '-l' flag specified." unless defined $opt_l; +- fail_usage "No '-p' or '-S' flag specified." unless defined $opt_p; +- fail_usage "Unrecognised action '$opt_o' for '-o' flag" +- unless $opt_o =~ /^(disable|enable)$/i; +- +-} else { +- get_options_stdin(); +- +- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) { +- print_metadata(); +- exit 0; +- } +- +- fail "failed: no IP address" unless defined $opt_a; +- fail "failed: no plug number" unless defined $opt_n; +- fail "failed: no login name" unless defined $opt_l; +- +- if (defined $opt_S) { +- $pwd_script_out = `$opt_S`; +- chomp($pwd_script_out); +- if ($pwd_script_out) { +- $opt_p = $pwd_script_out; +- } +- } +- +- fail "failed: no password" unless defined $opt_p; +- fail "failed: unrecognised action: $opt_o" +- unless $opt_o =~ /^(disable|enable)$/i; +-} +- +-if ( $opt_o =~ /^(disable|enable)$/i ) +-{ +- $opt_o = "port".$1; +-} +- +- +-# +-# Set up and log in +-# +- +-$t = new Net::Telnet; +- +-$t->open($opt_a); +- +-$t->waitfor('/login:/'); +- +-$t->print($opt_l); +- +-$t->waitfor('/assword:/'); +- +-$t->print($opt_p); +- +-$t->waitfor('/\>/'); +- +- +- +-# +-# Do the command +-# +- +-$cmd = "$opt_o $opt_n"; +-$t->print($cmd); +- +- +-# +-# Assume here that the word "error" will appear after errors (bad assumption! see next check) +-# +- +-($text, $match) = $t->waitfor('/\>/'); +-if ($text =~ /error/) +-{ +- fail "failed: error from switch\n"; +-} +- +- +-# +-# Do a portshow on the port and look for the DISABLED string to verify success +-# +- +-$t->print("portshow $opt_n"); +-($text, $match) = $t->waitfor('/\>/'); +- +-if ( $opt_o eq "portdisable" && !($text =~ /DISABLED/) ) +-{ +- fail "failed: portshow $opt_n does not show DISABLED\n"; +-} +-elsif ( $opt_o eq "portenable" && ($text =~ /DISABLED/) ) +-{ +- fail "failed: portshow $opt_n shows DISABLED\n"; +-} +- +- +-print "success: $opt_o $opt_n\n" unless defined $opt_q; +-exit 0; +- +-sub get_options_stdin +-{ +- my $opt; +- my $line = 0; +- while( defined($in = <>) ) +- { +- $_ = $in; +- chomp; +- +- # strip leading and trailing whitespace +- s/^\s*//; +- s/\s*$//; +- +- # skip comments +- next if /^#/; +- +- $line+=1; +- $opt=$_; +- next unless $opt; +- +- ($name,$val)=split /\s*=\s*/, $opt; +- +- if ( $name eq "" ) +- { +- print STDERR "parse error: illegal name in option $line\n"; +- exit 2; +- } +- +- # DO NOTHING -- this field is used by fenced +- elsif ($name eq "agent" ) { } +- +- # FIXME -- depricated. use "port" instead. +- elsif ($name eq "fm" ) +- { +- (my $dummy,$opt_n) = split /\s+/,$val; +- print STDERR "Depricated \"fm\" entry detected. refer to man page.\n"; +- } +- +- elsif ($name eq "ipaddr" ) +- { +- $opt_a = $val; +- } +- elsif ($name eq "login" ) +- { +- $opt_l = $val; +- } +- +- # FIXME -- depreicated residue of old fencing system +- elsif ($name eq "name" ) { } +- +- elsif (($name eq "option" ) || ($name eq "action")) +- { +- $opt_o = $val; +- } +- elsif ($name eq "passwd" ) +- { +- $opt_p = $val; +- } +- elsif ($name eq "passwd_script") { +- $opt_S = $val; +- } +- elsif ($name eq "port" ) +- { +- $opt_n = $val; +- } +- # elsif ($name eq "test" ) +- # { +- # $opt_T = $val; +- # } +- } +-} +diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py +new file mode 100644 +index 0000000..25581fd +--- /dev/null ++++ b/fence/agents/brocade/fence_brocade.py +@@ -0,0 +1,86 @@ ++#!/usr/bin/python ++ ++import sys, re, pexpect, exceptions ++sys.path.append("@FENCEAGENTSLIBDIR@") ++from fencing import * ++ ++#BEGIN_VERSION_GENERATION ++RELEASE_VERSION="New Brocade Agent - test release on steroids" ++REDHAT_COPYRIGHT="" ++BUILD_DATE="March, 20013" ++#END_VERSION_GENERATION ++ ++def get_power_status(conn, options): ++ conn.send_eol("portCfgShow " + options["--plug"]) ++ ++ exp_result = conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) ++ ++ show_re = re.compile('^\s*Persistent Disable\s*(ON|OFF)\s*$', re.IGNORECASE) ++ lines = conn.before.split("\n") ++ ++ for x in lines: ++ res = show_re.search(x) ++ if (res != None): ++ # We queried if it is disabled, so we have to negate answer ++ if res.group(1) == "ON": ++ return "off" ++ else: ++ return "on" ++ ++ fail(EC_STATUS) ++def set_power_status(conn, options): ++ action = { ++ 'on' : "portCfgPersistentEnable", ++ 'off': "portCfgPersistentDisable" ++ }[options["--action"]] ++ ++ conn.send_eol(action + " " + options["--plug"]) ++ conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) ++ ++def main(): ++ device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", "port", "fabric_fencing" ] ++ ++ atexit.register(atexit_handler) ++ ++ all_opt["cmd_prompt"]["default"] = [ "> " ] ++ ++ options = check_input(device_opt, process_input(device_opt)) ++ options["eol"] = "\n" ++ ++ docs = { } ++ docs["shortdesc"] = "Fence agent for HP Brocade over telnet/ssh" ++ docs["longdesc"] = "fence_brocade is an I/O Fencing agent which can be used with Brocade FC switches. \ ++It logs into a Brocade switch via telnet and disables a specified port. Disabling the port which a machine is \ ++connected to effectively fences that machine. Lengthy telnet connections to the switch should be avoided while \ ++a GFS cluster is running because the connection will block any necessary fencing actions. \ ++\ ++After a fence operation has taken place the fenced machine can no longer connect to the Brocade FC switch. \ ++When the fenced machine is ready to be brought back into the GFS cluster (after reboot) the port on the Brocade \ ++FC switch needs to be enabled. This can be done by running fence_brocade and specifying the enable action" ++ docs["vendorurl"] = "http://www.brocade.com" ++ show_docs(options, docs) ++ ++ ## ++ ## Operate the fencing device ++ #### ++ conn = fence_login(options) ++ ++ result = fence_action(conn, options, set_power_status, get_power_status, None) ++ ++ ## ++ ## Logout from system ++ ## ++ ## In some special unspecified cases it is possible that ++ ## connection will be closed before we run close(). This is not ++ ## a problem because everything is checked before. ++ ###### ++ try: ++ conn.send_eol("exit") ++ conn.close() ++ except: ++ pass ++ ++ sys.exit(result) ++ ++if __name__ == "__main__": ++ main() +-- +1.7.7.6 + diff --git a/SOURCES/bz-fence_ilo2-Unable-to-login-when-password-contains.patch b/SOURCES/bz-fence_ilo2-Unable-to-login-when-password-contains.patch new file mode 100644 index 0000000..a4cd707 --- /dev/null +++ b/SOURCES/bz-fence_ilo2-Unable-to-login-when-password-contains.patch @@ -0,0 +1,58 @@ +From 9568720a6230f1d918eaf30a53860a0865ff1f32 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 31 Jul 2013 14:15:58 +0200 +Subject: [PATCH 1/6] fence_ilo2: Unable to login when password contains " + +Resolves: rhbz#990537 +--- + fence/agents/ilo/fence_ilo.py | 13 +++++++------ + 1 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py +index 4890daa..f8bf795 100644 +--- a/fence/agents/ilo/fence_ilo.py ++++ b/fence/agents/ilo/fence_ilo.py +@@ -12,6 +12,7 @@ + ##### + + import sys, re, pexpect ++from xml.sax.saxutils import quoteattr + sys.path.append("@FENCEAGENTSLIBDIR@") + from fencing import * + +@@ -22,8 +23,8 @@ BUILD_DATE="March, 2008" + #END_VERSION_GENERATION + + def get_power_status(conn, options): +- conn.send("\r\n") ++ conn.send("\r\n") + conn.send("\r\n") + conn.send("\r\n") + conn.log_expect(options, "HOST_POWER=\"(.*?)\"", int(options["--power-timeout"])) +@@ -32,8 +33,8 @@ def get_power_status(conn, options): + return status.lower().strip() + + def set_power_status(conn, options): +- conn.send("\r\n") ++ conn.send("\r\n") + conn.send("") + + if options.has_key("fw_processor") and options["fw_processor"] == "iLO2": +@@ -101,8 +102,8 @@ the iLO card through an XML stream." + else: + conn.send("\r\n") + +- conn.send("\r\n") ++ conn.send("\r\n") + if options["--ribcl-version"] >= 2: + conn.send("\r\n") + conn.send("\r\n") +-- +1.7.7.6 + diff --git a/SOURCES/bz-fence_scsi-Add-documention-of-delay-into-manual-page.patch b/SOURCES/bz-fence_scsi-Add-documention-of-delay-into-manual-page.patch new file mode 100644 index 0000000..be12153 --- /dev/null +++ b/SOURCES/bz-fence_scsi-Add-documention-of-delay-into-manual-page.patch @@ -0,0 +1,38 @@ +From 924de15ae56e3bb1aba6c17948284374143e89ff Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 12 Aug 2013 15:01:25 +0200 +Subject: [PATCH 3/6] fence_scsi: Add documention of "delay" into manual pages + +Resolves: rhbz#912773 +--- + fence/agents/scsi/fence_scsi.8 | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/fence/agents/scsi/fence_scsi.8 b/fence/agents/scsi/fence_scsi.8 +index 0d70930..08495c7 100644 +--- a/fence/agents/scsi/fence_scsi.8 ++++ b/fence/agents/scsi/fence_scsi.8 +@@ -71,6 +71,10 @@ node. For the "on" action, the key specifies the key use to register + the local node. For the "off" action, this key specifies the key to be + removed from the device(s). + .TP ++\fB-H\fP \fIdelay\fR ++Wait X seconds before fencing is started (Default Value: 0) ++ ++.TP + \fB-a\fP + Use the APTPL flag for registrations. This option is only used for the + "on" action. +@@ -104,6 +108,9 @@ Same as -f option + \fIkey = "param"\fR + Same as -k option. + .TP ++\fIdelay = "param"\fR ++Same as -H option. ++.TP + \fIaptpl = "1" + Enable the APTPL flag. Default is 0 (disable). + +-- +1.7.7.6 + diff --git a/SOURCES/bz-fence_scsi-Fix-error-in-XML-metadata.patch b/SOURCES/bz-fence_scsi-Fix-error-in-XML-metadata.patch new file mode 100644 index 0000000..5e4e35c --- /dev/null +++ b/SOURCES/bz-fence_scsi-Fix-error-in-XML-metadata.patch @@ -0,0 +1,25 @@ +From 583c74caf4939856fe1ffec61a838a640ba83309 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 7 Aug 2013 12:41:08 +0200 +Subject: [PATCH 2/6] fence_scsi: Fix error in XML metadata + +Resolves: rhbz#994186 +--- + fence/agents/scsi/fence_scsi.pl | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl +index a447661..4e5cc96 100644 +--- a/fence/agents/scsi/fence_scsi.pl ++++ b/fence/agents/scsi/fence_scsi.pl +@@ -727,7 +727,6 @@ sub print_metadata () + "File to write error/debug messages" . + "\n"; + print "\t\n"; +- print "\t\n"; + print "\t\n"; + print "\t\t\n"; + print "\t\t\n"; +-- +1.7.7.6 + diff --git a/SOURCES/bz-fencing_snmp-Fix-KeyError-a-that-results-in-tracebac.patch b/SOURCES/bz-fencing_snmp-Fix-KeyError-a-that-results-in-tracebac.patch new file mode 100644 index 0000000..2668d6a --- /dev/null +++ b/SOURCES/bz-fencing_snmp-Fix-KeyError-a-that-results-in-tracebac.patch @@ -0,0 +1,27 @@ +From 1d4e75171802d574fdd51914d04498b52073b47b Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 28 Aug 2013 10:13:56 +0200 +Subject: [PATCH 4/6] fencing_snmp: Fix 'KeyError --a' that results in + traceback + +Resolves: rhbz#999146 +--- + fence/agents/lib/fencing_snmp.py.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/fence/agents/lib/fencing_snmp.py.py b/fence/agents/lib/fencing_snmp.py.py +index 89f8ece..513af20 100644 +--- a/fence/agents/lib/fencing_snmp.py.py ++++ b/fence/agents/lib/fencing_snmp.py.py +@@ -71,7 +71,7 @@ class FencingSnmp: + ('snmp-priv-passwd','X'),('password','A'),('username','u')) + for item in mapping_v3: + if (self.options.has_key("--"+item[0])): +- cmd += " -%s '%s'"% (item[1], self.quote_for_run(self.options["--" + item[1]])) ++ cmd += " -%s '%s'"% (item[1], self.quote_for_run(self.options["--" + item[0]])) + + force_ipvx = "" + +-- +1.7.7.6 + diff --git a/SOURCES/bz1012994-automatic_unfence_to_metadata.patch b/SOURCES/bz1012994-automatic_unfence_to_metadata.patch new file mode 100644 index 0000000..d96abb7 --- /dev/null +++ b/SOURCES/bz1012994-automatic_unfence_to_metadata.patch @@ -0,0 +1,38 @@ +commit 003fcf63623fe42b5879908eaec8b87da160be9c +Author: Marek 'marx' Grac +Date: Fri Sep 27 16:31:44 2013 +0200 + + fencing: Add information about automatic "unfence" to metadata + + Resolves: rhbz#1012994 + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index bb144bb..d6b02d3 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -487,7 +487,11 @@ def metadata(avail_opt, options, docs): + print "\t" + print "" + print "" +- print "\t" ++ if avail_opt.count("fabric_fencing") == 1: ++ ## do 'unfence' at the start ++ print "\t" ++ else: ++ print "\t" + print "\t" + + if avail_opt.count("fabric_fencing") == 0: +diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl +index 4e5cc96..2585f9e 100644 +--- a/fence/agents/scsi/fence_scsi.pl ++++ b/fence/agents/scsi/fence_scsi.pl +@@ -757,7 +757,7 @@ sub print_metadata () + print "\t\n"; + print "\n"; + print "\n"; +- print "\t\n"; ++ print "\t\n"; + print "\t\n"; + print "\t\n"; + print "\t\n"; diff --git a/SOURCES/bz1018780-fence_vmware_soap-report_privileges.patch b/SOURCES/bz1018780-fence_vmware_soap-report_privileges.patch new file mode 100644 index 0000000..fb95c9a --- /dev/null +++ b/SOURCES/bz1018780-fence_vmware_soap-report_privileges.patch @@ -0,0 +1,62 @@ +commit be464e49a941f727812615107cbeeda119cf5669 +Author: Marek 'marx' Grac +Date: Mon Oct 14 13:54:47 2013 +0200 + + fence_vmware_soap: Correct error message when user does not have privileges + + Previously, when an user does not have privileges to reboot a virtual machine, the + fence agent fails with python traceback. After applying this patch (by Shane Bradley), + the fence_vmware_soap fails with human readable error message. + + Resolves: rhbz#1918263 + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index d6b02d3..b2ab4be 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -24,6 +24,7 @@ EC_WAITING_OFF = 7 + EC_STATUS = 8 + EC_STATUS_HMC = 9 + EC_PASSWORD_MISSING = 10 ++EC_INVALID_PRIVILEGES = 11 + + TELNET_PATH = "/usr/bin/telnet" + SSH_PATH = "/usr/bin/ssh" +@@ -413,7 +414,8 @@ def fail(error_code): + EC_STATUS : "Failed: Unable to obtain correct plug status or plug is not available", + EC_STATUS_HMC : + "Failed: Either unable to obtain correct plug status, partition is not available or incorrect HMC version used", +- EC_PASSWORD_MISSING : "Failed: You have to set login password" ++ EC_PASSWORD_MISSING : "Failed: You have to set login password", ++ EC_INVALID_PRIVILEGES : "Failed: The user does not have the correct privileges to do the requested action." + }[error_code] + "\n" + sys.stderr.write(message) + syslog.syslog(syslog.LOG_ERR, message) +diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py +index ac7f0d9..98ac011 100644 +--- a/fence/agents/vmware_soap/fence_vmware_soap.py ++++ b/fence/agents/vmware_soap/fence_vmware_soap.py +@@ -156,10 +156,19 @@ def set_power_status(conn, options): + mo_machine = Property(vm.value) + mo_machine._type = "VirtualMachine" + +- if options["--action"] == "on": +- conn.service.PowerOnVM_Task(mo_machine) +- else: +- conn.service.PowerOffVM_Task(mo_machine) ++ try: ++ if options["--action"] == "on": ++ conn.service.PowerOnVM_Task(mo_machine) ++ else: ++ conn.service.PowerOffVM_Task(mo_machine) ++ except WebFault, ex: ++ if ((str(ex).find("Permission to perform this operation was denied")) >= 0): ++ fail(EC_INVALID_PRIVILEGES) ++ else: ++ if options["--action"] == "on": ++ fail(EC_WAITING_ON) ++ else: ++ fail(EC_WAITING_OFF) + + def remove_tmp_dir(tmp_dir): + shutil.rmtree(tmp_dir) diff --git a/SOURCES/bz1021392-fence_brocade-add_agent.patch b/SOURCES/bz1021392-fence_brocade-add_agent.patch new file mode 100644 index 0000000..7884b74 --- /dev/null +++ b/SOURCES/bz1021392-fence_brocade-add_agent.patch @@ -0,0 +1,29 @@ +diff -p1 -urN fence-agents-4.0.2-orig/fence/agents/brocade/Makefile.in fence-agents-4.0.2/fence/agents/brocade/Makefile.in +--- fence-agents-4.0.2-orig/fence/agents/brocade/Makefile.in 2013-11-04 17:27:27.400389591 +0100 ++++ fence-agents-4.0.2/fence/agents/brocade/Makefile.in 2013-11-04 17:27:49.298515272 +0100 +@@ -55,3 +55,3 @@ DIST_COMMON = $(srcdir)/Makefile.am $(sr + $(top_srcdir)/make/fencebuild.mk \ +- $(top_srcdir)/make/fencemanperl.mk ++ $(top_srcdir)/make/fenceman.mk + subdir = fence/agents/brocade +@@ -243,3 +243,3 @@ MAINTAINERCLEANFILES = Makefile.in + TARGET = fence_brocade +-SRC = $(TARGET).pl ++SRC = $(TARGET).py + EXTRA_DIST = $(SRC) +@@ -250,3 +250,3 @@ all: all-am + .SUFFIXES: +-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/make/fencebuild.mk $(top_srcdir)/make/fencemanperl.mk $(am__configure_deps) ++$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/make/fencebuild.mk $(top_srcdir)/make/fenceman.mk $(am__configure_deps) + @for dep in $?; do \ +@@ -271,3 +271,3 @@ Makefile: $(srcdir)/Makefile.in $(top_bu + esac; +-$(top_srcdir)/make/fencebuild.mk $(top_srcdir)/make/fencemanperl.mk: ++$(top_srcdir)/make/fencebuild.mk $(top_srcdir)/make/fenceman.mk: + +@@ -550,3 +550,4 @@ $(TARGET): $(SRC) + set -e && \ +- perl $(TARGET) -o metadata > .$@.tmp && \ ++ PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib \ ++ python $^ -o metadata > .$@.tmp && \ + xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@ diff --git a/SOURCES/bz1022528-disable_cache_in_suds.patch b/SOURCES/bz1022528-disable_cache_in_suds.patch new file mode 100644 index 0000000..756d5df --- /dev/null +++ b/SOURCES/bz1022528-disable_cache_in_suds.patch @@ -0,0 +1,80 @@ +commit f78785f7d53e9d126ba51ee9e381f5ae9b3d0368 +Author: Marek 'marx' Grac +Date: Mon Oct 7 15:41:09 2013 +0200 + + fence_vmware_soap, fence_ovh: Caching problem with SOAP library + + Both fence agents are built on top of SUDS library which creates a cache file. Unfortunately, + it is not yet possible to completely move cache or remove it. Due to possible security issue (symlink + vulnerability) we have decided to solve this problem as simply as possible. So '/tmp' was changed to an + automatically generated temp directory which is removed at the exit of fence agent as we won't reuse it anyway. + + Resolves: rhbz#1014000 + +diff --git a/fence/agents/ovh/fence_ovh.py b/fence/agents/ovh/fence_ovh.py +index 881aa90..2ec3fa0 100644 +--- a/fence/agents/ovh/fence_ovh.py ++++ b/fence/agents/ovh/fence_ovh.py +@@ -9,6 +9,7 @@ + # This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. + + import sys, time ++import shutil, tempfile + from datetime import datetime + from suds.client import Client + from suds.xsd.doctor import ImportDoctor, Import +@@ -61,6 +62,10 @@ def soap_login(options): + imp.filter.add('http://soapi.ovh.com/manager') + d = ImportDoctor(imp) + ++ tmp_dir = tempfile.mkdtemp() ++ tempfile.tempdir = tmp_dir ++ atexit.register(remove_tmp_dir, tmp_dir) ++ + try: + soap = Client(url, doctor=d) + session = soap.service.login(options["--username"], options["--password"], 'en', 0) +@@ -69,6 +74,9 @@ def soap_login(options): + + options["session"] = session + return soap ++ ++def remove_tmp_dir(tmp_dir): ++ shutil.rmtree(tmp_dir) + + def main(): + device_opt = [ "login", "passwd", "port", "email" ] +diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py +index 365f8cc..ac7f0d9 100644 +--- a/fence/agents/vmware_soap/fence_vmware_soap.py ++++ b/fence/agents/vmware_soap/fence_vmware_soap.py +@@ -1,6 +1,7 @@ + #!/usr/bin/python + + import sys, exceptions ++import shutil, tempfile + sys.path.append("@FENCEAGENTSLIBDIR@") + + from suds.client import Client +@@ -20,6 +21,11 @@ def soap_login(options): + url = "http://" + + url += options["--ip"] + ":" + str(options["--ipport"]) + "/sdk" ++ ++ tmp_dir = tempfile.mkdtemp() ++ tempfile.tempdir = tmp_dir ++ atexit.register(remove_tmp_dir, tmp_dir) ++ + try: + conn = Client(url + "/vimService.wsdl") + conn.set_options(location = url) +@@ -155,6 +161,9 @@ def set_power_status(conn, options): + else: + conn.service.PowerOffVM_Task(mo_machine) + ++def remove_tmp_dir(tmp_dir): ++ shutil.rmtree(tmp_dir) ++ + def main(): + device_opt = [ "ipaddr", "login", "passwd", "web", "ssl", "port" ] + diff --git a/SOURCES/bz1022529-ensure_validity_of_xml_metadata-1.patch b/SOURCES/bz1022529-ensure_validity_of_xml_metadata-1.patch new file mode 100644 index 0000000..f0c9215 --- /dev/null +++ b/SOURCES/bz1022529-ensure_validity_of_xml_metadata-1.patch @@ -0,0 +1,181 @@ +commit 44f59b0698a3d82d3362da4c68a0d188f14f97da +Author: Marek 'marx' Grac +Date: Thu Oct 10 10:57:19 2013 +0200 + + fencing: Add schema for fence agents metadata (relax ng) + + Add a metadata schema which reflects current state. In order to simplify it + few minor changes were done to fence agents. + +diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c +index 3561456..83029e3 100644 +--- a/fence/agents/ipmilan/ipmilan.c ++++ b/fence/agents/ipmilan/ipmilan.c +@@ -915,10 +915,11 @@ static void print_xml_metadata(char *pname) { + "option (lanplus / -P) and increase wait after operation to " + "4 seconds (power_wait=4 / -T 4)"); + printf("\n"); ++ printf("http://www.intel.com\n"); + printf("%s\n",""); + + for (i=0;i<(sizeof(xml_parameters)/sizeof(struct xml_parameter_s));i++) { +- printf("\t\n",xml_parameters[i].name); ++ printf("\t\n",xml_parameters[i].name, xml_parameters[i].required); + + printf("\t\t\n",xml_parameters[i].getopt); + if (xml_parameters[i].default_value == NULL) { +diff --git a/fence/agents/lib/metadata.rng b/fence/agents/lib/metadata.rng +new file mode 100644 +index 0000000..2566fee +--- /dev/null ++++ b/fence/agents/lib/metadata.rng +@@ -0,0 +1,65 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ boolean ++ string ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ 0 ++ 1 ++ ++ ++ ++ +diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py +index 9dc3e4d..6d2c649 100644 +--- a/fence/agents/lpar/fence_lpar.py ++++ b/fence/agents/lpar/fence_lpar.py +@@ -133,6 +133,7 @@ def main(): + docs = { } + docs["shortdesc"] = "Fence agent for IBM LPAR" + docs["longdesc"] = "" ++ docs["vendorurl"] = "http://www.ibm.com" + show_docs(options, docs) + + if 0 == options.has_key("--managed"): +diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl +index 2585f9e..c959417 100644 +--- a/fence/agents/scsi/fence_scsi.pl ++++ b/fence/agents/scsi/fence_scsi.pl +@@ -705,6 +705,7 @@ sub print_metadata () + print "\n"; + print "fence_scsi\n"; ++ print "http://www.t10.org\n"; + print "\n"; + print "\t\n"; + print "\t\t\n"; +diff --git a/fence/agents/virsh/fence_virsh.py b/fence/agents/virsh/fence_virsh.py +index ccbd6e2..ac8dc7b 100644 +--- a/fence/agents/virsh/fence_virsh.py ++++ b/fence/agents/virsh/fence_virsh.py +@@ -78,6 +78,7 @@ all work. \ + \n.P\n\ + By default, virsh needs root account to do properly work. So you \ + must allow ssh login in your sshd_config." ++ docs["vendorurl"] = "http://libvirt.org" + show_docs(options, docs) + + ## Operate the fencing device +diff --git a/fence/agents/xenapi/fence_xenapi.py b/fence/agents/xenapi/fence_xenapi.py +index 7ba8533..064624a 100644 +--- a/fence/agents/xenapi/fence_xenapi.py ++++ b/fence/agents/xenapi/fence_xenapi.py +@@ -214,6 +214,7 @@ It uses the XenAPI, supplied by Citrix, to establish an XML-RPC sesssion \ + to a XenServer host. Once the session is established, further XML-RPC \ + commands are issued in order to switch on, switch off, restart and query \ + the status of virtual machines running on the host." ++ docs["vendorurl"] = "http://www.xenproject.org" + show_docs(options, docs) + + xenSession = connect_and_login(options) +diff --git a/make/fenceman.mk b/make/fenceman.mk +index e6df9f0..d4f3b4e 100644 +--- a/make/fenceman.mk ++++ b/make/fenceman.mk +@@ -2,6 +2,7 @@ + set -e && \ + PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib \ + python $^ -o metadata > .$@.tmp && \ ++ xmllint --noout --relaxng $(top_srcdir)/fence/agents/lib/metadata.rng .$@.tmp && \ + xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@ + + clean-man: +diff --git a/make/fencemanc.mk b/make/fencemanc.mk +index 9c904b6..27e1aae 100644 +--- a/make/fencemanc.mk ++++ b/make/fencemanc.mk +@@ -1,6 +1,7 @@ + %.8: $(TARGET) $(top_srcdir)/fence/agents/lib/fence2man.xsl + set -e && \ + ./$^ -o metadata > .$@.tmp && \ ++ xmllint --noout --relaxng $(top_srcdir)/fence/agents/lib/metadata.rng .$@.tmp && \ + xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@ + + clean-man: +diff --git a/make/fencemanperl.mk b/make/fencemanperl.mk +index 74c1508..ed7c9cc 100644 +--- a/make/fencemanperl.mk ++++ b/make/fencemanperl.mk +@@ -1,6 +1,7 @@ + %.8: $(TARGET) $(top_srcdir)/fence/agents/lib/fence2man.xsl + set -e && \ + perl $(TARGET) -o metadata > .$@.tmp && \ ++ xmllint --noout --relaxng $(top_srcdir)/fence/agents/lib/metadata.rng .$@.tmp && \ + xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@ + + clean-man: diff --git a/SOURCES/bz1022529-ensure_validity_of_xml_metadata-2.patch b/SOURCES/bz1022529-ensure_validity_of_xml_metadata-2.patch new file mode 100644 index 0000000..2e484d4 --- /dev/null +++ b/SOURCES/bz1022529-ensure_validity_of_xml_metadata-2.patch @@ -0,0 +1,61 @@ +commit eb546e504e720bd97258a70ef96e4e51e5778009 +Author: Marek 'marx' Grac +Date: Wed Oct 30 14:24:24 2013 +0100 + + [build] updates in build system to properly work with metadata.rng + + Minor updates were required to build a package without this patch you + can do ./autogen.sh; ./configure; make - but not a build package process + +diff --git a/fence/agents/lib/Makefile.am b/fence/agents/lib/Makefile.am +index f2fbb09..4cf4b9f 100644 +--- a/fence/agents/lib/Makefile.am ++++ b/fence/agents/lib/Makefile.am +@@ -6,11 +6,11 @@ if BUILD_XENAPILIB + TARGET += XenAPI.py + endif + +-SRC = fencing.py.py fencing_snmp.py.py XenAPI.py.py ++SRC = fencing.py.py fencing_snmp.py.py XenAPI.py.py check_used_options.py + + XSL = fence2man.xsl fence2rng.xsl + +-FASRNG = fence.rng.head fence.rng.tail ++FASRNG = fence.rng.head fence.rng.tail metadata.rng + + EXTRA_DIST = $(SRC) $(XSL) $(FASRNG) + +diff --git a/make/fencebuild.mk b/make/fencebuild.mk +index d775e92..15a47fd 100644 +--- a/make/fencebuild.mk ++++ b/make/fencebuild.mk +@@ -1,8 +1,4 @@ + $(TARGET): $(SRC) +- if [ 0 -eq `echo "$(SRC)" | grep fence_ &> /dev/null; echo $$?` ]; then \ +- PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib $(top_srcdir)/fence/agents/lib/check_used_options.py $(SRC); \ +- else true ; fi +- + bash $(top_srcdir)/scripts/fenceparse \ + $(top_srcdir)/make/copyright.cf REDHAT_COPYRIGHT \ + $(VERSION) \ +@@ -14,3 +10,7 @@ $(TARGET): $(SRC) + -e 's#@''SBINDIR@#${sbindir}#g' \ + -e 's#@''LIBEXECDIR@#${libexecdir}#g' \ + > $@ ++ ++ if [ 0 -eq `echo "$(SRC)" | grep fence_ &> /dev/null; echo $$?` ]; then \ ++ PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib $(top_srcdir)/fence/agents/lib/check_used_options.py $@; \ ++ else true ; fi +diff --git a/make/fenceman.mk b/make/fenceman.mk +index d4f3b4e..d4f0377 100644 +--- a/make/fenceman.mk ++++ b/make/fenceman.mk +@@ -2,7 +2,7 @@ + set -e && \ + PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib \ + python $^ -o metadata > .$@.tmp && \ +- xmllint --noout --relaxng $(top_srcdir)/fence/agents/lib/metadata.rng .$@.tmp && \ ++ xmllint --noout --relaxng $(abs_srcdir)/../lib/metadata.rng .$@.tmp && \ + xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@ + + clean-man: diff --git a/SOURCES/bz1022533-invalid_use_of_options-1.patch b/SOURCES/bz1022533-invalid_use_of_options-1.patch new file mode 100644 index 0000000..ca3737b --- /dev/null +++ b/SOURCES/bz1022533-invalid_use_of_options-1.patch @@ -0,0 +1,95 @@ +commit 1db6440eb38789bcb59451cb8adb39f2084f9443 +Author: Marek 'marx' Grac +Date: Mon Oct 21 12:44:39 2013 +0200 + + testing: Check if fence agent uses only valid keys in options["--???"] + + Valid keys are defined in fencing library or fence agent itself. This check + will be run at every build, so we should be protected against case when + developer unintentionally use new key (e.g. typo). These type of bugs are + usually not detected by static analyzers. + +diff --git a/fence/agents/lib/check_used_options.py b/fence/agents/lib/check_used_options.py +new file mode 100755 +index 0000000..2d75756 +--- /dev/null ++++ b/fence/agents/lib/check_used_options.py +@@ -0,0 +1,65 @@ ++#!/usr/bin/python ++ ++## Check if fence agent uses only options["--??"] which are defined in fencing library or ++## fence agent itself ++## ++## Usage: ./check_used_options.py fence-agent (e.g. lpar/fence_lpar.py) ++## ++ ++import sys, re ++sys.path.append("@FENCEAGENTSLIBDIR@") ++from fencing import all_opt ++ ++def main(): ++ agent = sys.argv[1] ++ ++ available = { } ++ ++ ## all_opt from fencing library are imported ++ for k in all_opt.keys(): ++ if all_opt[k].has_key("longopt"): ++ available["--" + all_opt[k]["longopt"]] = True ++ ++ ## add UUID which is derived automatically from --plug if possible ++ available["--uuid"] = True ++ ++ ## all_opt defined in fence agent are found ++ agent_file = open(agent) ++ opt_re = re.compile("\s*all_opt\[\"([^\"]*)\"\] = {") ++ opt_longopt_re = re.compile("\s*\"longopt\" : \"([^\"]*)\"") ++ ++ in_opt = False ++ for line in agent_file: ++ if opt_re.search(line) != None: ++ in_opt = True ++ if in_opt and opt_longopt_re.search(line) != None: ++ available["--" + opt_longopt_re.search(line).group(1)] = True ++ in_opt = False ++ ++ ## check if all options are defined ++ agent_file = open(agent) ++ option_use_re = re.compile("options\[\"(--[^\"]*)\"\]") ++ option_has_re = re.compile("options.has_key\(\"(--[^\"]*)\"\)") ++ ++ counter = 0 ++ without_errors = True ++ for line in agent_file: ++ counter += 1 ++ ++ for x in option_use_re.findall(line): ++ if not available.has_key(x): ++ print "ERROR on line %d in %s: option %s is not defined" % (counter, agent, option_use_re.search(line).group(1)) ++ without_errors = False ++ ++ for x in option_has_re.findall(line): ++ if not available.has_key(x): ++ print "ERROR on line %d in %s: option %s is not defined" % (counter, agent, option_has_re.search(line).group(1)) ++ without_errors = False ++ ++ if without_errors: ++ sys.exit(0) ++ else: ++ sys.exit(1) ++ ++if __name__ == "__main__": ++ main() +diff --git a/make/fencebuild.mk b/make/fencebuild.mk +index e86d03c..d775e92 100644 +--- a/make/fencebuild.mk ++++ b/make/fencebuild.mk +@@ -1,4 +1,8 @@ + $(TARGET): $(SRC) ++ if [ 0 -eq `echo "$(SRC)" | grep fence_ &> /dev/null; echo $$?` ]; then \ ++ PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib $(top_srcdir)/fence/agents/lib/check_used_options.py $(SRC); \ ++ else true ; fi ++ + bash $(top_srcdir)/scripts/fenceparse \ + $(top_srcdir)/make/copyright.cf REDHAT_COPYRIGHT \ + $(VERSION) \ diff --git a/SOURCES/bz1022533-invalid_use_of_options-2.patch b/SOURCES/bz1022533-invalid_use_of_options-2.patch new file mode 100644 index 0000000..ba1bb51 --- /dev/null +++ b/SOURCES/bz1022533-invalid_use_of_options-2.patch @@ -0,0 +1,24 @@ +commit 38373e3be9ceedd877ce6c02a88acf059f9f9d42 +Author: Marek 'marx' Grac +Date: Sun Oct 20 17:06:08 2013 +0200 + + fence_drac5: Fix test used for Dell DRAC CMC + + In version 4.x the '--module-name' was renamed to standard '--plug'. This patch + reflects it. + +diff --git a/fence/agents/drac5/fence_drac5.py b/fence/agents/drac5/fence_drac5.py +index 2e9a8d3..1b16733 100644 +--- a/fence/agents/drac5/fence_drac5.py ++++ b/fence/agents/drac5/fence_drac5.py +@@ -112,8 +112,8 @@ By default, the telnet interface is not enabled." + conn = fence_login(options) + + if conn.before.find("CMC") >= 0: +- if 0 == options.has_key("--module-name") and 0 == ["monitor", "list"].count(options["--action"].lower()): +- fail_usage("Failed: You have to enter module name (-m)") ++ if 0 == options.has_key("--plug") and 0 == ["monitor", "list"].count(options["--action"].lower()): ++ fail_usage("Failed: You have to enter module name (-n)") + + options["model"] = "DRAC CMC" + elif conn.before.find("DRAC 5") >= 0: diff --git a/SOURCES/bz1022533-invalid_use_of_options-3.patch b/SOURCES/bz1022533-invalid_use_of_options-3.patch new file mode 100644 index 0000000..fa0f932 --- /dev/null +++ b/SOURCES/bz1022533-invalid_use_of_options-3.patch @@ -0,0 +1,34 @@ +commit 110274aa54e8673a47653da7c9fecb2bd95bd517 +Author: Marek 'marx' Grac +Date: Mon Oct 21 12:45:35 2013 +0200 + + fence_vmware: Option --vmware_type is not used correctly + + --vmware_type is defined but --vmware-type was used in source code. + +diff --git a/fence/agents/vmware/fence_vmware.py b/fence/agents/vmware/fence_vmware.py +index 87d0958..dc4ef0f 100644 +--- a/fence/agents/vmware/fence_vmware.py ++++ b/fence/agents/vmware/fence_vmware.py +@@ -261,17 +261,17 @@ def vmware_is_supported_vmrun_version(options): + def vmware_check_vmware_type(options): + global vmware_internal_type + +- options["--vmware-type"] = options["--vmware-type"].lower() ++ options["--vmware_type"] = options["--vmware_type"].lower() + +- if (options["--vmware-type"]=="esx"): ++ if (options["--vmware_type"]=="esx"): + vmware_internal_type = VMWARE_TYPE_ESX + if (not options.has_key("--exec")): + options["--exec"] = VMHELPER_COMMAND +- elif (options["--vmware-type"]=="server2"): ++ elif (options["--vmware_type"]=="server2"): + vmware_internal_type = VMWARE_TYPE_SERVER2 + if (not options.has_key("--exec")): + options["--exec"] = VMRUN_COMMAND +- elif (options["--vmware-type"]=="server1"): ++ elif (options["--vmware_type"]=="server1"): + vmware_internal_type = VMWARE_TYPE_SERVER1 + if (not options.has_key("--exec")): + options["--exec"] = VMRUN_COMMAND diff --git a/SOURCES/bz1022536-fence_wti-named_groups.patch b/SOURCES/bz1022536-fence_wti-named_groups.patch new file mode 100644 index 0000000..d4b8cd8 --- /dev/null +++ b/SOURCES/bz1022536-fence_wti-named_groups.patch @@ -0,0 +1,125 @@ +commit 0b92cea4cb27f248834d77a72266ba5bf69c1d95 +Author: Marek 'marx' Grac +Date: Mon Oct 21 13:50:06 2013 +0200 + + fence_wti: Add support for named groups + + On some WTI devices it is possible to name a group of devices by single names (e.g. 1,2 -> server). These + groups can be used to operate all these plugs by single command. + + Patch by: Thibat Pouzet + +diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py +index b315061..34967e1 100644 +--- a/fence/agents/wti/fence_wti.py ++++ b/fence/agents/wti/fence_wti.py +@@ -21,10 +21,10 @@ REDHAT_COPYRIGHT="" + BUILD_DATE="March, 2008" + #END_VERSION_GENERATION + +-def get_power_status(conn, options): ++def get_listing(conn, options, listing_command): + listing = "" + +- conn.send("/S"+"\r\n") ++ conn.send(listing_command + "\r\n") + + if isinstance(options["--command-prompt"], list): + re_all = list(options["--command-prompt"]) +@@ -39,7 +39,12 @@ def get_power_status(conn, options): + conn.send("\r\n") + conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + listing += conn.before +- ++ ++ return listing ++ ++def get_plug_status(conn, options): ++ listing = get_listing(conn, options, "/S") ++ + plug_section = 0 + plug_index = -1 + name_index = -1 +@@ -72,6 +77,82 @@ def get_power_status(conn, options): + else: + return "PROBLEM" + ++def get_plug_group_status_from_list(status_list): ++ for status in status_list: ++ if status == "on": ++ return status ++ return "off" ++ ++def get_plug_group_status(conn, options): ++ listing = get_listing(conn, options, "/SG") ++ ++ plug_section = 0 ++ outlets = {} ++ current_outlet = "" ++ line_index = 0 ++ lines = listing.splitlines() ++ while line_index < len(lines) and line_index >= 0: ++ line = lines[line_index] ++ if (line.find("|") >= 0 and line.lstrip().startswith("GROUP NAME") == False): ++ plug_line = [x.strip().lower() for x in line.split("|")] ++ if ["list", "monitor"].count(options["--action"]) == 0 and options["--plug"].lower() == plug_line[name_index]: ++ line_index += 1 ++ plug_status = [] ++ while line_index < len(lines) and line_index >= 0: ++ plug_line = [x.strip().lower() for x in lines[line_index].split("|")] ++ if len(plug_line[plug_index]) > 0 and len(plug_line[name_index]) == 0: ++ plug_status.append(plug_line[status_index]) ++ line_index += 1 ++ else: ++ line_index = -1 ++ ++ return get_plug_group_status_from_list(plug_status) ++ ++ else: ++ ## We already believe that first column contains plug number ++ if len(plug_line[0]) != 0: ++ group_name = plug_line[0] ++ plug_line_index = line_index + 1 ++ plug_status = [] ++ while plug_line_index < len(lines) and plug_line_index >= 0: ++ plug_line = [x.strip().lower() for x in lines[plug_line_index].split("|")] ++ if len(plug_line[name_index]) > 0: ++ plug_line_index = -1 ++ break ++ if len(plug_line[plug_index]) > 0: ++ plug_status.append(plug_line[status_index]) ++ plug_line_index += 1 ++ else: ++ plug_line_index = -1 ++ outlets[group_name] = (group_name, get_plug_group_status_from_list(plug_status)) ++ line_index += 1 ++ ++ elif (line.upper().lstrip().startswith("GROUP NAME")): ++ plug_header = [x.strip().lower() for x in line.split("|")] ++ name_index = plug_header.index("group name") ++ plug_index = plug_header.index("plug") ++ status_index = plug_header.index("status") ++ line_index += 2 ++ else: ++ line_index += 1 ++ ++ ++ if ["list", "monitor"].count(options["--action"]) == 1: ++ for group, status in outlet_groups: ++ outlets[group] = (group, status[0]) ++ ++ return outlets ++ else: ++ return "PROBLEM" ++ ++def get_power_status(conn, options): ++ ret = get_plug_status(conn, options) ++ ++ if ret == "PROBLEM": ++ ret = get_plug_group_status(conn, options) ++ ++ return ret ++ + def set_power_status(conn, options): + action = { + 'on' : "/on", diff --git a/SOURCES/bz1022538-fence_rsb-update_regex.patch b/SOURCES/bz1022538-fence_rsb-update_regex.patch new file mode 100644 index 0000000..d76cbf8 --- /dev/null +++ b/SOURCES/bz1022538-fence_rsb-update_regex.patch @@ -0,0 +1,23 @@ +commit 9c3cf5bfe41559191510c32be9195da6ee00d06d +Author: Marek 'marx' Grac +Date: Wed Oct 23 09:46:44 2013 +0200 + + fence_rsb: Change in power status output + + Regular expression was extended to support newer version. + + Patch by: Christian Masopust + +diff --git a/fence/agents/rsb/fence_rsb.py b/fence/agents/rsb/fence_rsb.py +index 1da186f..da60a61 100755 +--- a/fence/agents/rsb/fence_rsb.py ++++ b/fence/agents/rsb/fence_rsb.py +@@ -13,7 +13,7 @@ BUILD_DATE="" + def get_power_status(conn, options): + conn.send("2") + conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) +- status = re.compile("Power Status : (on|off)", re.IGNORECASE).search(conn.before).group(1) ++ status = re.compile("Power Status[\s]*: (on|off)", re.IGNORECASE).search(conn.before).group(1) + conn.send("0") + conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec new file mode 100755 index 0000000..d553c05 --- /dev/null +++ b/SPECS/fence-agents.spec @@ -0,0 +1,594 @@ +############################################################################### +############################################################################### +## +## Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. +## +## This copyrighted material is made available to anyone wishing to use, +## modify, copy, or redistribute it subject to the terms and conditions +## of the GNU General Public License v.2. +## +############################################################################### +############################################################################### + +# keep around ready for later user +## global alphatag git0a6184070 + +Name: fence-agents +Summary: Fence Agents for Red Hat Cluster +Version: 4.0.2 +Release: 6%{?alphatag:.%{alphatag}}%{?dist} +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +URL: http://sourceware.org/cluster/wiki/ +Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.xz +Patch0: bz-fence_ilo2-Unable-to-login-when-password-contains.patch +Patch1: bz-fence_scsi-Fix-error-in-XML-metadata.patch +Patch2: bz-fence_scsi-Add-documention-of-delay-into-manual-page.patch +Patch3: bz-fencing_snmp-Fix-KeyError-a-that-results-in-tracebac.patch +Patch4: bz-fence_brocade-Port-fencing-agent-to-fencing-library.patch +Patch5: bz-fence_bladecenter-Fix-telnet-login-failure.patch +Patch6: bz1012994-automatic_unfence_to_metadata.patch +Patch7: bz1022528-disable_cache_in_suds.patch +Patch8: bz1018780-fence_vmware_soap-report_privileges.patch +Patch9: bz1022536-fence_wti-named_groups.patch +Patch10: bz1022538-fence_rsb-update_regex.patch +Patch11: bz1022529-ensure_validity_of_xml_metadata-1.patch +Patch12: bz1022533-invalid_use_of_options-1.patch +Patch13: bz1022533-invalid_use_of_options-2.patch +Patch14: bz1022533-invalid_use_of_options-3.patch +Patch15: bz1022529-ensure_validity_of_xml_metadata-2.patch +Patch16: bz1021392-fence_brocade-add_agent.patch + +%if 0%{?fedora} +%global supportedagents alom apc apc_snmp bladecenter brocade cisco_mds cisco_ucs drac5 eaton_snmp eps hpblade ibmblade ifmib ilo ilo_mp intelmodular ipdu ipmilan kdump ldom lpar rhevm rsa rsb scsi vmware_soap wti +%global testagents virsh +%global allfenceagents fence-agents-alom fence-agents-apc fence-agents-apc-snmp fence-agents-bladecenter fence-agents-brocade fence-agents-cisco-mds fence-agents-cisco-ucs fence-agents-drac5 fence-agents-eaton-snmp fence-agents-eps fence-agents-hpblade fence-agents-ibmblade fence-agents-ifmib fence-agents-ilo2 fence-agents-ilo-mp fence-agents-intelmodular fence-agents-ipdu fence-agents-ipmilan fence-agents-kdump fence-agents-ldom fence-agents-lpar fence-agents-rhevm fence-agents-rsa fence-agents-rsb fence-agents-scsi fence-agents-vmware-soap fence-agents-wti +%endif + +%if 0%{?rhel} +%global supportedagents apc apc_snmp bladecenter brocade cisco_mds cisco_ucs drac5 eaton_snmp eps hpblade ibmblade ifmib ilo ilo_mp intelmodular ipdu ipmilan kdump rhevm rsb scsi vmware_soap wti +%global testagents virsh +%global allfenceagents fence-agents-apc fence-agents-apc-snmp fence-agents-bladecenter fence-agents-brocade fence-agents-cisco-mds fence-agents-cisco-ucs fence-agents-drac5 fence-agents-eaton-snmp fence-agents-eps fence-agents-hpblade fence-agents-ibmblade fence-agents-ifmib fence-agents-ilo2 fence-agents-ilo-mp fence-agents-intelmodular fence-agents-ipdu fence-agents-ipmilan fence-agents-kdump fence-agents-rhevm fence-agents-rsb fence-agents-scsi fence-agents-vmware-soap fence-agents-wti +%endif + +## Setup/build bits + +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +# Build dependencies +BuildRequires: perl +BuildRequires: glibc-devel +BuildRequires: nss-devel nspr-devel +BuildRequires: libxslt +BuildRequires: python pexpect python-pycurl python-suds +BuildRequires: perl(Net::Telnet) net-snmp-utils +%if 0%{?fedora} +BuildRequires: perl(Pod::MinimumVersion) +%endif + +%prep +%setup -q -n %{name}-%{version} +%patch0 -p1 -b .bug0 +%patch1 -p1 -b .bug1 +%patch2 -p1 -b .bug2 +%patch3 -p1 -b .bug3 +%patch4 -p1 -b .bug4 +%patch5 -p1 -b .bug5 +%patch6 -p1 -b .bz1012994 +%patch7 -p1 -b .bz1022528 +%patch8 -p1 -b .bz1018780 +%patch9 -p1 -b .bz1022536 +%patch10 -p1 -b .bz1022538 +%patch11 -p1 -b .bz1022529-1 +%patch12 -p1 -b .bz1022533-1 +%patch13 -p1 -b .bz1022533-2 +%patch14 -p1 -b .bz1022533-3 +%patch15 -p1 -b .bz1022529-2 +%patch16 -p1 -b .bz1021392 + +%build +%{configure} --with-agents='%{supportedagents} %{testagents}' +CFLAGS="$(echo '%{optflags}')" make %{_smp_mflags} + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} + +## tree fix up +# fix libfence permissions +chmod 0755 %{buildroot}%{_datadir}/fence/*.py +# remove docs +rm -rf %{buildroot}/usr/share/doc/fence-agents + +%clean +rm -rf %{buildroot} + +%post +ccs_update_schema > /dev/null 2>&1 ||: + +%description +Red Hat Fence Agents is a collection of scripts to handle remote +power management for several devices. + +%package common +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Common utilities for fence agents +Requires: python pexpect +%description common +Red Hat Fence Agents is a collection of scripts and libraries to handle remote power management for various devices. +%files common +%defattr(-,root,root,-) +%doc doc/COPYING.* doc/COPYRIGHT doc/README.licence +%{_datadir}/fence +%{_datadir}/cluster +%{_datadir}/fence/fencing.py +%{_datadir}/fence/fencing_snmp.py + +%package all +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agents +Requires: %{allfenceagents} +Provides: fence-agents = %{version}-%{release} +Obsoletes: fence-agents < 3.1.13 +%description all +Red Hat Fence Agents is a collection of all supported fence agents. +%files all + +%if 0%{?fedora} +%package alom +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for SUN ALOM +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description alom +Red Hat Fence Agents +%files alom +%defattr(-,root,root,-) +%{_sbindir}/fence_alom +%{_mandir}/man8/fence_alom.8* +%endif + +%package apc +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for APC devices +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description apc +The fence-agents-apc package contains a fence agent for APC devices that are accessed via telnet or SSH. +%files apc +%defattr(-,root,root,-) +%{_sbindir}/fence_apc +%{_mandir}/man8/fence_apc.8* + +%package apc-snmp +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for APC devices (SNMP) +Requires: fence-agents-common net-snmp-utils +Obsoletes: fence-agents +%description apc-snmp +The fence-agents-apc-snmp package contains a fence agent for APC devices that are accessed via the SNMP protocol. +%files apc-snmp +%defattr(-,root,root,-) +%{_sbindir}/fence_apc_snmp +%{_mandir}/man8/fence_apc_snmp.8* + +%package bladecenter +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for IBM BladeCenter +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description bladecenter +The fence-agents-bladecenter package contains a fence agent for IBM BladeCenter devices that are accessed via telnet or SSH. +%files bladecenter +%defattr(-,root,root,-) +%{_sbindir}/fence_bladecenter +%{_mandir}/man8/fence_bladecenter.8* + +%package brocade +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for HP Brocade +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description brocade +The fence-agents-brocade package contains a fence agent for HP Brocade devices that are accessed via telnet or SSH. +%files brocade +%defattr(-,root,root,-) +%{_sbindir}/fence_brocade +%{_mandir}/man8/fence_brocade.8* + +%package cisco-mds +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Cisco MDS 9000 series +Requires: fence-agents-common net-snmp-utils +Obsoletes: fence-agents +%description cisco-mds +The fence-agents-cisco-mds package contains a fence agent for Cisco MDS 9000 series devices that are accessed via the SNMP protocol. +%files cisco-mds +%defattr(-,root,root,-) +%{_sbindir}/fence_cisco_mds +%{_mandir}/man8/fence_cisco_mds.8* + +%package cisco-ucs +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Cisco UCS series +Requires: fence-agents-common pycurl +Obsoletes: fence-agents +%description cisco-ucs +The fence-agents-cisco-ucs package contains a fence agent for Cisco UCS series devices that are accessed via the SNMP protocol. +%files cisco-ucs +%defattr(-,root,root,-) +%{_sbindir}/fence_cisco_ucs +%{_mandir}/man8/fence_cisco_ucs.8* + +%package drac5 +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Dell DRAC 5 +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description drac5 +The fence-agents-drac5 package contains a fence agent for Dell DRAC 5 series devices that are accessed via telnet or SSH. +%files drac5 +%defattr(-,root,root,-) +%{_sbindir}/fence_drac5 +%{_mandir}/man8/fence_drac5.8* + +%package eaton-snmp +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Eaton network power switches +Requires: fence-agents-common net-snmp-utils +Obsoletes: fence-agents +%description eaton-snmp +The fence-agents-eaton-snmp package contains a fence agent for Eaton network power switches that are accessed via the SNMP protocol. +%files eaton-snmp +%defattr(-,root,root,-) +%{_sbindir}/fence_eaton_snmp +%{_mandir}/man8/fence_eaton_snmp.8* + +%package eps +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for ePowerSwitch 8M+ power switches +Requires: fence-agents-common +Obsoletes: fence-agents +%description eps +The fence-agents-eps package contains a fence agent for ePowerSwitch 8M+ power switches that are accessed via the HTTP(s) protocol. +%files eps +%defattr(-,root,root,-) +%{_sbindir}/fence_eps +%{_mandir}/man8/fence_eps.8* + +%package hpblade +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for HP BladeSystem devices +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description hpblade +The fence-agents-hpblade package contains a fence agent for HP BladeSystem devices that are accessed via telnet or SSH. +%files hpblade +%defattr(-,root,root,-) +%{_sbindir}/fence_hpblade +%{_mandir}/man8/fence_hpblade.8* + +%package ibmblade +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for IBM BladeCenter +Requires: fence-agents-common net-snmp-utils +Obsoletes: fence-agents +%description ibmblade +The fence-agents-ibmblade package contains a fence agent for IBM BladeCenter devices that are accessed via the SNMP protocol. +%files ibmblade +%defattr(-,root,root,-) +%{_sbindir}/fence_ibmblade +%{_mandir}/man8/fence_ibmblade.8* + +%package ifmib +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for devices with IF-MIB interfaces +Requires: fence-agents-common net-snmp-utils +Obsoletes: fence-agents +%description ifmib +The fence-agents-ifmib package contains a fence agent for IF-MIB interfaces that are accessed via the SNMP protocol. +%files ifmib +%defattr(-,root,root,-) +%{_sbindir}/fence_ifmib +%{_mandir}/man8/fence_ifmib.8* + +%package ilo2 +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for HP iLO2 devices +Requires: fence-agents-common +Obsoletes: fence-agents +%description ilo2 +The fence-agents-ilo2 package contains a fence agent for HP iLO2 devices that are accessed via the HTTP(s) protocol. +%files ilo2 +%defattr(-,root,root,-) +%{_libexecdir}/fence_nss_wrapper +%{_sbindir}/fence_ilo +%{_sbindir}/fence_ilo2 +%{_mandir}/man8/fence_ilo.8* +%{_mandir}/man8/fence_ilo2.8* + +%package ilo-mp +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for HP iLO MP devices +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description ilo-mp +The fence-agents-ilo-mp package contains a fence agent for HP iLO MP devices that are accessed via telnet or SSH. +%files ilo-mp +%defattr(-,root,root,-) +%{_sbindir}/fence_ilo_mp +%{_mandir}/man8/fence_ilo_mp.8* + +%package intelmodular +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for devices with Intel Modular interfaces +Requires: fence-agents-common net-snmp-utils +Obsoletes: fence-agents +%description intelmodular +The fence-agents-intelmodular package contains a fence agent for Intel Modular interfaces that are accessed via the SNMP protocol. +%files intelmodular +%defattr(-,root,root,-) +%{_sbindir}/fence_intelmodular +%{_mandir}/man8/fence_intelmodular.8* + +%package ipdu +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for IBM iPDU network power switches +Requires: fence-agents-common net-snmp-utils +Obsoletes: fence-agents +%description ipdu +The fence-agents-ipdu package contains a fence agent for IBM iPDU network power switches that are accessed via the SNMP protocol. +%files ipdu +%defattr(-,root,root,-) +%{_sbindir}/fence_ipdu +%{_mandir}/man8/fence_ipdu.8* + +%package ipmilan +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for devices with IPMI interface +Requires: fence-agents-common /usr/bin/ipmitool +Obsoletes: fence-agents +%description ipmilan +The fence-agents-ipmilan package contains a fence agent for devices with IPMI interface. +%files ipmilan +%defattr(-,root,root,-) +%{_sbindir}/fence_ipmilan +%{_mandir}/man8/fence_ipmilan.8* +%{_sbindir}/fence_idrac +%{_mandir}/man8/fence_idrac.8* +%{_sbindir}/fence_ilo3 +%{_mandir}/man8/fence_ilo3.8* +%{_sbindir}/fence_ilo4 +%{_mandir}/man8/fence_ilo4.8* +%{_sbindir}/fence_imm +%{_mandir}/man8/fence_imm.8* + +%package kdump +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for use with kdump crash recovery service +Requires: fence-agents-common +Obsoletes: fence-agents +%description kdump +The fence-agents-kdump package contains a fence agent for use with kdump crash recovery service. +%files kdump +%defattr(-,root,root,-) +%{_sbindir}/fence_kdump +%{_libexecdir}/fence_kdump_send +%{_mandir}/man8/fence_kdump.8* +%{_mandir}/man8/fence_kdump_send.8* + +%if 0%{?fedora} +%package ldom +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Sun LDom virtual machines +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description ldom +The fence-agents-ldom package contains a fence agent for APC devices that are accessed via telnet or SSH. +%files ldom +%defattr(-,root,root,-) +%{_sbindir}/fence_ldom +%{_mandir}/man8/fence_ldom.8* +%endif + +%if 0%{?fedora} +%package lpar +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for IBM LPAR +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description lpar +The fence-agents-lpar package contains a fence agent for IBM LPAR devices that are accessed via telnet or SSH. +%files lpar +%defattr(-,root,root,-) +%{_sbindir}/fence_lpar +%{_mandir}/man8/fence_lpar.8* +%endif + +%package rhevm +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for RHEV-M +Requires: fence-agents-common +Obsoletes: fence-agents +%description rhevm +The fence-agents-rhevm package contains a fence agent for RHEV-M via REST API +%files rhevm +%defattr(-,root,root,-) +%{_sbindir}/fence_rhevm +%{_mandir}/man8/fence_rhevm.8* + +%if 0%{?fedora} +%package rsa +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for IBM RSA II +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description rsa +The fence-agents-rsa package contains a fence agent for IBM RSA II devices that are accessed via telnet or SSH. +%files rsa +%defattr(-,root,root,-) +%{_sbindir}/fence_rsa +%{_mandir}/man8/fence_rsa.8* +%endif + +%package rsb +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Fujitsu RSB +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description rsb +The fence-agents-rsb package contains a fence agent for Fujitsu RSB devices that are accessed via telnet or SSH. +%files rsb +%defattr(-,root,root,-) +%{_sbindir}/fence_rsb +%{_mandir}/man8/fence_rsb.8* + +%if 0 +%package sanbox2 +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for QLogic SANBox2 FC switches +Requires: fence-agents-common telnet +Obsoletes: fence-agents +%description sanbox2 +The fence-agents-sanbox2 package contains a fence agent for QLogic SANBox2 switches that are accessed via telnet. +%files sanbox2 +%defattr(-,root,root,-) +%{_sbindir}/fence_sanbox2 +%{_mandir}/man8/fence_sanbox2.8* +%endif + +%package scsi +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for SCSI persisent reservations +Requires: perl sg3_utils +Obsoletes: fence-agents +%description scsi +The fence-agents-scsi package contains fence agent for SCSI persisent reservations +%files scsi +%defattr(-,root,root,-) +%{_sbindir}/fence_scsi +%{_datadir}/cluster/fence_scsi_check.pl +%{_mandir}/man8/fence_scsi.8* + +%package virsh +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for virtual machines based on libvirt +Requires: fence-agents-common openssh-clients /usr/bin/virsh +Obsoletes: fence-agents +%description virsh +The fence-agents-virsh package contains a fence agent for virtual machines that are accessed via SSH. +%files virsh +%defattr(-,root,root,-) +%{_sbindir}/fence_virsh +%{_mandir}/man8/fence_virsh.8* + +%package vmware-soap +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for VMWare with SOAP API v4.1+ +Requires: fence-agents-common python-suds +Obsoletes: fence-agents +%description vmware-soap +The fence-agents-vmware-soap package contains a fence agent for VMWare with SOAP API v4.1+ +%files vmware-soap +%defattr(-,root,root,-) +%{_sbindir}/fence_vmware_soap +%{_mandir}/man8/fence_vmware_soap.8* + +%package wti +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for WTI Network power switches +Requires: fence-agents-common telnet openssh-clients +Obsoletes: fence-agents +%description wti +The fence-agents-wti package contains a fence agent for WTI network power switches that are accessed via telnet or SSH. +%files wti +%defattr(-,root,root,-) +%{_sbindir}/fence_wti +%{_mandir}/man8/fence_wti.8* + +%changelog +* Mon Nov 04 2013 Marek Grac - 4.0.2-6 +- fencing: Ensure validity of XML metadata using Relax NG + Resolves: rhbz#1022529 +- fencing: Fix invalid use of options[".."] + Resolves: rhbz#1022533 +- fence_brocade: Add fence agent + Resolves: rhbz#1021392 + +* Mon Nov 04 2013 Marek Grac - 4.0.2-5 +- fence_vmware_soap: Report if user privileges are not enough for given operation + Resolves: rhbz#1018780 +- fence_wti: Add support for named groups + Resolves: rhbz#1022536 +- fence_rsb: Update regular expression to match newer firmware version + Resolves: rhbz#1022538 + +* Mon Nov 04 2013 Marek Grac - 4.0.2-4 +- fence_vmware_soap: Disable cache in SUDS library to resolve SELinux problems + Resolves: rhbz#1022528 +- fencing: Add information that operation 'unfence' should be run automatically after start of the cluster + Resolves: rhbz#1012994 +- Aligned to upstream 4.0.4 + +* Mon Sep 02 2013 Marek Grac - 4.0.2-3 +- fence_bladecenter: Fix telnet login failure +- fence_brocade: Rewrite to fencing library +- fencing_snmp: Fix 'KeyError --a' +- fence_scsi: Fix XML metadata +- fence_scsi: Add a documentation of "delay" +- fence_ilo2: Unable to login when password contains " + +* Tue Jul 30 2013 Marek Grac - 4.0.2-2 +- new upstream release + +* Tue Jul 09 2013 Marek Grac - 4.0.1-1 +- new upstream release + +* Mon Jun 24 2013 Marek Grac - 4.0.0-5 +- fence-agents-all should provide fence-agent for clean update path + +* Wed Apr 03 2013 Marek Grac - 4.0.0-4 +- minor changes in spec file + +* Thu Mar 21 2013 Marek Grac - 4.0.0-3 +- minor changes in spec file + +* Mon Mar 18 2013 Marek Grac - 4.0.0-2 +- minor changes in spec file + +* Mon Mar 11 2013 Marek Grac - 4.0.0-1 +- new upstream release +- introducing subpackages + +