From 3340af8c36d90ed6fce9c42ca0dffee10e5f9522 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 05 2015 13:18:04 +0000 Subject: import fence-agents-4.0.11-10.el7 --- diff --git a/.fence-agents.metadata b/.fence-agents.metadata index 6d34543..3cece23 100644 --- a/.fence-agents.metadata +++ b/.fence-agents.metadata @@ -1 +1 @@ -feb51459639ea8ca310ba1a5b79e38aacdc9a615 SOURCES/fence-agents-4.0.2.tar.xz +6be7c01343d69945df899c104b59571e51b7e6a9 SOURCES/fence-agents-4.0.11.tar.xz diff --git a/.gitignore b/.gitignore index c9fa08f..55cd481 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/fence-agents-4.0.2.tar.xz +SOURCES/fence-agents-4.0.11.tar.xz diff --git a/SOURCES/backward-rename_fence_scsi_check_to_pl.patch b/SOURCES/backward-rename_fence_scsi_check_to_pl.patch new file mode 100644 index 0000000..f5746d5 --- /dev/null +++ b/SOURCES/backward-rename_fence_scsi_check_to_pl.patch @@ -0,0 +1,76 @@ +diff -urN fence-agents-4.0.11/fence/agents/scsi/fence_scsi.py fence-agents-4.0.11.scsi/fence/agents/scsi/fence_scsi.py +--- fence-agents-4.0.11/fence/agents/scsi/fence_scsi.py 2014-08-06 09:35:09.000000000 +0200 ++++ fence-agents-4.0.11.scsi/fence/agents/scsi/fence_scsi.py 2014-09-03 13:00:37.000000000 +0200 +@@ -387,7 +387,7 @@ + all_opt["delay"]["getopt"] = "H:" + + #fence_scsi_check +- if os.path.basename(sys.argv[0]) == "fence_scsi_check": ++ if os.path.basename(sys.argv[0]) == "fence_scsi_check.pl": + sys.exit(scsi_check()) + + options = check_input(device_opt, process_input(device_opt)) +diff -urN fence-agents-4.0.11/fence/agents/scsi/Makefile.am fence-agents-4.0.11.scsi/fence/agents/scsi/Makefile.am +--- fence-agents-4.0.11/fence/agents/scsi/Makefile.am 2014-08-27 15:32:14.000000000 +0200 ++++ fence-agents-4.0.11.scsi/fence/agents/scsi/Makefile.am 2014-09-03 13:10:22.000000000 +0200 +@@ -4,10 +4,10 @@ + + SRC = $(TARGET).py + +-EXTRA_DIST = $(SRC) ++EXTRA_DIST = $(SRC) + + scsidatadir = $(CLUSTERDATA) +-scsidata_SCRIPTS = fence_scsi_check ++scsidata_SCRIPTS = fence_scsi_check.pl + + sbin_SCRIPTS = $(TARGET) + +@@ -15,7 +15,7 @@ + + FENCE_TEST_ARGS = -k 1 + +-fence_scsi_check: $(TARGET) ++fence_scsi_check.pl: $(TARGET) + cp $^ $@ + + include $(top_srcdir)/make/fencebuild.mk +@@ -23,4 +23,4 @@ + include $(top_srcdir)/make/agentpycheck.mk + + clean-local: clean-man +- rm -f $(TARGET) $(SYMTARGET) fence_scsi_check ++ rm -f $(TARGET) $(SYMTARGET) fence_scsi_check.pl +diff -urN fence-agents-4.0.11/fence/agents/scsi/Makefile.in fence-agents-4.0.11.scsi/fence/agents/scsi/Makefile.in +--- fence-agents-4.0.11/fence/agents/scsi/Makefile.in 2014-08-27 15:52:24.000000000 +0200 ++++ fence-agents-4.0.11.scsi/fence/agents/scsi/Makefile.in 2014-09-03 13:10:37.000000000 +0200 +@@ -285,9 +285,9 @@ + MAINTAINERCLEANFILES = Makefile.in + TARGET = fence_scsi + SRC = $(TARGET).py +-EXTRA_DIST = $(SRC) ++EXTRA_DIST = $(SRC) + scsidatadir = $(CLUSTERDATA) +-scsidata_SCRIPTS = fence_scsi_check ++scsidata_SCRIPTS = fence_scsi_check.pl + sbin_SCRIPTS = $(TARGET) + man_MANS = $(TARGET).8 + FENCE_TEST_ARGS = -k 1 +@@ -607,7 +607,7 @@ + uninstall-sbinSCRIPTS uninstall-scsidataSCRIPTS + + +-fence_scsi_check: $(TARGET) ++fence_scsi_check.pl: $(TARGET) + cp $^ $@ + $(TARGET): $(SRC) + bash $(top_srcdir)/scripts/fenceparse \ +@@ -664,7 +664,7 @@ + python ./$(INPUT) --delay 0 $(FENCE_TEST_ARGS) -- + + clean-local: clean-man +- rm -f $(TARGET) $(SYMTARGET) fence_scsi_check ++ rm -f $(TARGET) $(SYMTARGET) fence_scsi_check.pl + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/SOURCES/bz-fence_bladecenter-Fix-telnet-login-failure.patch b/SOURCES/bz-fence_bladecenter-Fix-telnet-login-failure.patch deleted file mode 100644 index c16257d..0000000 --- a/SOURCES/bz-fence_bladecenter-Fix-telnet-login-failure.patch +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index 216edff..0000000 --- a/SOURCES/bz-fence_brocade-Port-fencing-agent-to-fencing-library.patch +++ /dev/null @@ -1,459 +0,0 @@ -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 deleted file mode 100644 index a4cd707..0000000 --- a/SOURCES/bz-fence_ilo2-Unable-to-login-when-password-contains.patch +++ /dev/null @@ -1,58 +0,0 @@ -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 deleted file mode 100644 index be12153..0000000 --- a/SOURCES/bz-fence_scsi-Add-documention-of-delay-into-manual-page.patch +++ /dev/null @@ -1,38 +0,0 @@ -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 deleted file mode 100644 index 5e4e35c..0000000 --- a/SOURCES/bz-fence_scsi-Fix-error-in-XML-metadata.patch +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 2668d6a..0000000 --- a/SOURCES/bz-fencing_snmp-Fix-KeyError-a-that-results-in-tracebac.patch +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index d96abb7..0000000 --- a/SOURCES/bz1012994-automatic_unfence_to_metadata.patch +++ /dev/null @@ -1,38 +0,0 @@ -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-Unknown-exception.patch b/SOURCES/bz1018780-fence_vmware_soap-Unknown-exception.patch deleted file mode 100644 index 8fa18b5..0000000 --- a/SOURCES/bz1018780-fence_vmware_soap-Unknown-exception.patch +++ /dev/null @@ -1,35 +0,0 @@ -From b9d7388fdb2cf895f16842ac7c5615f6dd405d68 Mon Sep 17 00:00:00 2001 -From: Marek 'marx' Grac -Date: Mon, 17 Feb 2014 15:23:19 +0100 -Subject: [PATCH] fence_vmware_soap: Unknown exception fixed - -Resolves: rhbz#1018780 ---- - fence/agents/vmware_soap/fence_vmware_soap.py | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py -index acfdcbb..776273e 100644 ---- a/fence/agents/vmware_soap/fence_vmware_soap.py -+++ b/fence/agents/vmware_soap/fence_vmware_soap.py -@@ -1,7 +1,7 @@ - #!/usr/bin/python - - import sys, exceptions, time --import shutil, tempfile -+import shutil, tempfile, suds - sys.path.append("@FENCEAGENTSLIBDIR@") - - from suds.client import Client -@@ -164,7 +164,7 @@ def set_power_status(conn, options): - conn.service.PowerOnVM_Task(mo_machine) - else: - conn.service.PowerOffVM_Task(mo_machine) -- except WebFault, ex: -+ except suds.WebFault, ex: - if ((str(ex).find("Permission to perform this operation was denied")) >= 0): - fail(EC_INVALID_PRIVILEGES) - else: --- -1.7.7.6 - diff --git a/SOURCES/bz1018780-fence_vmware_soap-report_privileges.patch b/SOURCES/bz1018780-fence_vmware_soap-report_privileges.patch deleted file mode 100644 index fb95c9a..0000000 --- a/SOURCES/bz1018780-fence_vmware_soap-report_privileges.patch +++ /dev/null @@ -1,62 +0,0 @@ -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/bz1018780-fence_vmware_soap_fix_option_parsing_from_stdin.patch b/SOURCES/bz1018780-fence_vmware_soap_fix_option_parsing_from_stdin.patch deleted file mode 100644 index ff71df1..0000000 --- a/SOURCES/bz1018780-fence_vmware_soap_fix_option_parsing_from_stdin.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit f1ee9c18423a1c65ccab4650601bd0146f200ef3 -Author: Fabio M. Di Nitto -Date: Thu Feb 27 08:27:19 2014 +0100 - - fence_vmware_soap: fix short/long option parsing traceback - - Signed-off-by: Fabio M. Di Nitto - -diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py -index c73a1d6..bbac1c5 100644 ---- a/fence/agents/vmware_soap/fence_vmware_soap.py -+++ b/fence/agents/vmware_soap/fence_vmware_soap.py -@@ -16,7 +16,7 @@ BUILD_DATE="April, 2011" - #END_VERSION_GENERATION - - def soap_login(options): -- if options["-o"] in ["off", "reboot"]: -+ if options["--action"] in ["off", "reboot"]: - time.sleep(int(options["--delay"])) - - if options.has_key("--ssl"): diff --git a/SOURCES/bz1018780-fence_vmware_soap_suppress_suds_message.patch b/SOURCES/bz1018780-fence_vmware_soap_suppress_suds_message.patch deleted file mode 100644 index 85f1d55..0000000 --- a/SOURCES/bz1018780-fence_vmware_soap_suppress_suds_message.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit c360d3eecf6f9976d3371090034d08d03000f0e1 -Author: Fabio M. Di Nitto -Date: Wed Feb 26 09:34:35 2014 +0100 - - vmware_soap: drop warning from python suds when error occours - - prepatch: - fence_vmware_soap -z -l test -p wrongpasswd -a blabla -n vm1 -o reboot -v - No handlers could be found for logger "suds.client" - Failed: The user does not have the correct privileges to do the requested action. - - postpatch: - fence_vmware_soap -z -l test -p wrongpassed -a blabla -n vm1 -o reboot -v - Failed: The user does not have the correct privileges to do the requested action. - - Based on https://fedorahosted.org/suds/wiki/Documentation - logging must be configured and filter for CRITICAL since the harmless - error is at INFO level. - - Signed-off-by: Fabio M. Di Nitto - -diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py -index 400e81f..c73a1d6 100644 ---- a/fence/agents/vmware_soap/fence_vmware_soap.py -+++ b/fence/agents/vmware_soap/fence_vmware_soap.py -@@ -2,6 +2,7 @@ - - import sys, exceptions, time - import shutil, tempfile, suds -+import logging - sys.path.append("@FENCEAGENTSLIBDIR@") - - from suds.client import Client -@@ -199,6 +200,9 @@ Alternatively you can always use UUID to access virtual machine." - docs["vendorurl"] = "http://www.vmware.com" - show_docs(options, docs) - -+ logging.basicConfig(level=logging.INFO) -+ logging.getLogger('suds.client').setLevel(logging.CRITICAL) -+ - ## - ## Operate the fencing device - #### diff --git a/SOURCES/bz1021392-fence_brocade-add_agent.patch b/SOURCES/bz1021392-fence_brocade-add_agent.patch deleted file mode 100644 index 7884b74..0000000 --- a/SOURCES/bz1021392-fence_brocade-add_agent.patch +++ /dev/null @@ -1,29 +0,0 @@ -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/bz1021392-fencing_default_action_off.patch b/SOURCES/bz1021392-fencing_default_action_off.patch deleted file mode 100644 index 986d370..0000000 --- a/SOURCES/bz1021392-fencing_default_action_off.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 8b127ebff6a38b0c6dd9c2a1ad738e2d7637e0fa Mon Sep 17 00:00:00 2001 -From: Marek 'marx' Grac -Date: Wed, 22 Jan 2014 13:51:50 +0100 -Subject: [PATCH 1/3] fencing: Fabric fence agents should have default action - "off" - -Previously, when you have run fence agent without -o XYZ, reboot was performed. Fabric fence agents do not have them -so fence agent fails. This update does not fix only this issue but also text --help and in manual pages. - -Resolves: rhbz#1021392 ---- - fence/agents/lib/fencing.py.py | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py -index 9cc7407..889bb04 100644 ---- a/fence/agents/lib/fencing.py.py -+++ b/fence/agents/lib/fencing.py.py -@@ -618,6 +618,10 @@ def check_input(device_opt, opt): - else: - all_opt["login"]["required"] = "0" - -+ if device_opt.count("fabric_fencing"): -+ all_opt["action"]["default"] = "off" -+ all_opt["action"]["help"] = "-o, --action=[action] Action: status, off (default) or on" -+ - ## Set default values - ##### - for opt in device_opt: --- -1.7.7.6 - diff --git a/SOURCES/bz1022528-disable_cache_in_suds.patch b/SOURCES/bz1022528-disable_cache_in_suds.patch deleted file mode 100644 index 756d5df..0000000 --- a/SOURCES/bz1022528-disable_cache_in_suds.patch +++ /dev/null @@ -1,80 +0,0 @@ -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 deleted file mode 100644 index f0c9215..0000000 --- a/SOURCES/bz1022529-ensure_validity_of_xml_metadata-1.patch +++ /dev/null @@ -1,181 +0,0 @@ -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 deleted file mode 100644 index 2e484d4..0000000 --- a/SOURCES/bz1022529-ensure_validity_of_xml_metadata-2.patch +++ /dev/null @@ -1,61 +0,0 @@ -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/bz1022529-ensure_validity_of_xml_metadata-3.patch b/SOURCES/bz1022529-ensure_validity_of_xml_metadata-3.patch deleted file mode 100644 index 1ebc2cd..0000000 --- a/SOURCES/bz1022529-ensure_validity_of_xml_metadata-3.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 849d0dba262c2111446fb5a03040b22146c35726 Mon Sep 17 00:00:00 2001 -From: Marek 'marx' Grac -Date: Thu, 23 Jan 2014 18:29:35 +0100 -Subject: [PATCH] fence_kdump: Add vendor-url to metadata - -Resolves: rhbz#1022529 ---- - fence/agents/kdump/fence_kdump.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/fence/agents/kdump/fence_kdump.c b/fence/agents/kdump/fence_kdump.c -index fa1f6a4..cae9842 100644 ---- a/fence/agents/kdump/fence_kdump.c -+++ b/fence/agents/kdump/fence_kdump.c -@@ -178,6 +178,7 @@ do_action_metadata (const char *self) - fprintf (stdout, ""); - fprintf (stdout, "The fence_kdump agent is intended to be used with with kdump service."); - fprintf (stdout, "\n"); -+ fprintf (stdout, "http://www.kernel.org/pub/linux/utils/kernel/kexec/\n"); - - fprintf (stdout, "\n"); - --- -1.7.7.6 - diff --git a/SOURCES/bz1022533-invalid_use_of_options-1.patch b/SOURCES/bz1022533-invalid_use_of_options-1.patch deleted file mode 100644 index ca3737b..0000000 --- a/SOURCES/bz1022533-invalid_use_of_options-1.patch +++ /dev/null @@ -1,95 +0,0 @@ -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 deleted file mode 100644 index ba1bb51..0000000 --- a/SOURCES/bz1022533-invalid_use_of_options-2.patch +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index fa0f932..0000000 --- a/SOURCES/bz1022533-invalid_use_of_options-3.patch +++ /dev/null @@ -1,34 +0,0 @@ -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-2-fence_wti-named_groups.patch b/SOURCES/bz1022536-2-fence_wti-named_groups.patch deleted file mode 100644 index 3ba7c85..0000000 --- a/SOURCES/bz1022536-2-fence_wti-named_groups.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 53fe387f00278e769e00ec10b28e2cb6ff52c8b1 Mon Sep 17 00:00:00 2001 -From: Marek 'marx' Grac -Date: Wed, 29 Jan 2014 15:29:21 +0100 -Subject: [PATCH] fence_wti: Add support for firmware v1.40 (on MPC device) - -Previously, named groups were tested only on firmware v1.43 (on NPS device). ---- - fence/agents/wti/fence_wti.py | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py -index 34967e1..c9c5237 100644 ---- a/fence/agents/wti/fence_wti.py -+++ b/fence/agents/wti/fence_wti.py -@@ -96,12 +96,13 @@ def get_plug_group_status(conn, options): - 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]) -+ if len(plug_line) >= max(name_index, status_index) and len(plug_line[plug_index]) > 0 and (len(plug_line[name_index]) == 0 or options["--plug"].lower() == plug_line[name_index]): -+ ## Firmware 1.43 does not have a valid value of plug on first line as only name is defined on that line -+ if not "---" in plug_line[status_index]: -+ plug_status.append(plug_line[status_index]) - line_index += 1 - else: - line_index = -1 --- -1.7.7.6 - diff --git a/SOURCES/bz1022536-fence_wti-named_groups.patch b/SOURCES/bz1022536-fence_wti-named_groups.patch deleted file mode 100644 index d4b8cd8..0000000 --- a/SOURCES/bz1022536-fence_wti-named_groups.patch +++ /dev/null @@ -1,125 +0,0 @@ -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 deleted file mode 100644 index d76cbf8..0000000 --- a/SOURCES/bz1022538-fence_rsb-update_regex.patch +++ /dev/null @@ -1,23 +0,0 @@ -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/SOURCES/bz1048843-fencing-do_not_use_public_keys.patch b/SOURCES/bz1048843-fencing-do_not_use_public_keys.patch deleted file mode 100644 index 6d0f23c..0000000 --- a/SOURCES/bz1048843-fencing-do_not_use_public_keys.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit cfd1f7490d7958ee25ad5937c9f2072adaa9862e -Author: Marek 'marx' Grac -Date: Mon Jan 6 13:25:43 2014 +0100 - - fencing: Do not use public keys when identity-file is not defined - - Previously, fence agent (ssh) tried to use keys before it asks for password. This lead to a situation - when fence agent did not work correctly as it was waiting for 'Password' which did not occur. - -diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py -index a570203..c8b9bda 100644 ---- a/fence/agents/lib/fencing.py.py -+++ b/fence/agents/lib/fencing.py.py -@@ -979,7 +979,7 @@ def fence_login(options, re_login_string = "(login\s*: )|(Login Name: )|(userna - syslog.syslog(syslog.LOG_ERR, str(ex)) - sys.exit(EC_GENERIC_ERROR) - elif options.has_key("--ssh") and 0 == options.has_key("--identity-file"): -- command = '%s %s %s@%s -p %s' % (SSH_PATH, force_ipvx, options["--username"], options["--ip"], options["--ipport"]) -+ command = '%s %s %s@%s -p %s -o PubkeyAuthentication=no' % (SSH_PATH, force_ipvx, options["--username"], options["--ip"], options["--ipport"]) - if options.has_key("--ssh-options"): - command += ' ' + options["--ssh-options"] - try: diff --git a/SOURCES/bz1057299-fence_vmware_soap-add_delay.patch b/SOURCES/bz1057299-fence_vmware_soap-add_delay.patch deleted file mode 100644 index f55e935..0000000 --- a/SOURCES/bz1057299-fence_vmware_soap-add_delay.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 530e97f05e43bdd5bef9d24c75d4cc3057a491e8 -Author: Marek 'marx' Grac -Date: Fri Jan 10 15:54:49 2014 +0100 - - fence_vmware_soap: --delay is not respected - - Because fence agent do not use standard login process, support for the --delay has to be added. - -diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py -index 98ac011..acfdcbb 100644 ---- a/fence/agents/vmware_soap/fence_vmware_soap.py -+++ b/fence/agents/vmware_soap/fence_vmware_soap.py -@@ -1,6 +1,6 @@ - #!/usr/bin/python - --import sys, exceptions -+import sys, exceptions, time - import shutil, tempfile - sys.path.append("@FENCEAGENTSLIBDIR@") - -@@ -15,6 +15,9 @@ BUILD_DATE="April, 2011" - #END_VERSION_GENERATION - - def soap_login(options): -+ if options["-o"] in ["off", "reboot"]: -+ time.sleep(int(options["--delay"])) -+ - if options.has_key("--ssl"): - url = "https://" - else: diff --git a/SOURCES/bz1072564-1-add_ssl_secure_and_ssl_insecure.patch b/SOURCES/bz1072564-1-add_ssl_secure_and_ssl_insecure.patch new file mode 100644 index 0000000..a9a969a --- /dev/null +++ b/SOURCES/bz1072564-1-add_ssl_secure_and_ssl_insecure.patch @@ -0,0 +1,207 @@ +From 809b909651118c06d2ab48d7911bbee2e512e478 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 1 Sep 2014 15:05:20 +0200 +Subject: [PATCH 1/2] fencing: Add new options --ssl-secure and --ssl-insecure + +These new options extends current --ssl (same as --ssl-secure). Until now certificate of the fence device +was not validated what can possibly lead to attack on infrastructe. With this patch, user can decide +if certificate should (--ssl-secure) or should not (--ssl-insecure) be verified. + +The default option is to validate certificate. + +Resolves: rhbz#1072564 +--- + fence/agents/cisco_ucs/fence_cisco_ucs.py | 9 ++++++-- + fence/agents/lib/fencing.py.py | 28 ++++++++++++++++++++--- + fence/agents/rhevm/fence_rhevm.py | 9 ++++++-- + fence/agents/vmware_soap/fence_vmware_soap.py | 33 +++++++++++++++++++++++---- + 4 files changed, 68 insertions(+), 11 deletions(-) + +diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py +index f72e696..888d689 100644 +--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py ++++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py +@@ -90,8 +90,13 @@ def send_command(opt, command, timeout): + conn.setopt(pycurl.POSTFIELDS, command) + conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write) + conn.setopt(pycurl.TIMEOUT, timeout) +- conn.setopt(pycurl.SSL_VERIFYPEER, 0) +- conn.setopt(pycurl.SSL_VERIFYHOST, 0) ++ if opt.has_key("--ssl") or opt.has_key("--ssl-secure"): ++ conn.setopt(pycurl.SSL_VERIFYPEER, 1) ++ conn.setopt(pycurl.SSL_VERIFYHOST, 2) ++ ++ if opt.has_key("--ssl-insecure"): ++ conn.setopt(pycurl.SSL_VERIFYPEER, 0) ++ conn.setopt(pycurl.SSL_VERIFYHOST, 0) + conn.perform() + result = web_buffer.getvalue() + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index d1d5aae..557358a 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -179,6 +179,21 @@ all_opt = { + "required" : "0", + "shortdesc" : "SSL connection", + "order" : 1}, ++ "ssl_insecure" : { ++ "getopt" : "9", ++ "longopt" : "ssl-insecure", ++ "help" : "--ssl-insecure Use ssl connection without verifying certificate", ++ "required" : "0", ++ "shortdesc" : "SSL connection without verifying fence device's certificate", ++ "order" : 1}, ++ "ssl_secure" : { ++ "getopt" : "9", ++ "longopt" : "ssl-secure", ++ "help" : "--ssl-secure Use ssl connection with verifying certificate", ++ "required" : "0", ++ "shortdesc" : "SSL connection with verifying fence device's certificate", ++ "order" : 1}, ++ + "notls" : { + "getopt" : "t", + "longopt" : "notls", +@@ -385,6 +400,7 @@ DEPENDENCY_OPT = { + "secure" : ["identity_file", "ssh_options"], + "ipaddr" : ["ipport", "inet4_only", "inet6_only"], + "port" : ["separator"], ++ "ssl" : ["ssl_secure", "ssl_insecure"], + "community" : ["snmp_auth_prot", "snmp_sec_level", "snmp_priv_prot", \ + "snmp_priv_passwd", "snmp_priv_passwd_script"] + } +@@ -662,7 +678,7 @@ def check_input(device_opt, opt): + elif options.has_key("--ssh") or (all_opt["secure"].has_key("default") and all_opt["secure"]["default"] == '1'): + all_opt["ipport"]["default"] = 22 + all_opt["ipport"]["help"] = "-u, --ipport=[port] TCP/UDP port to use (default 22)" +- elif options.has_key("--ssl") or (all_opt["ssl"].has_key("default") and all_opt["ssl"]["default"] == '1'): ++ elif options.has_key("--ssl") or options.has_key("--ssl-secure") or options.has_key("--ssl-insecure") or (all_opt["ssl"].has_key("default") and all_opt["ssl"]["default"] == '1'): + all_opt["ipport"]["default"] = 443 + all_opt["ipport"]["help"] = "-u, --ipport=[port] TCP/UDP port to use (default 443)" + elif device_opt.count("web"): +@@ -972,11 +988,17 @@ def fence_login(options, re_login_string=r"(login\s*: )|(Login Name: )|(usernam + + if options.has_key("--ssl"): + gnutls_opts = "" ++ ssl_opts = "" ++ + if options.has_key("--notls"): + gnutls_opts = "--priority \"NORMAL:-VERS-TLS1.2:-VERS-TLS1.1:-VERS-TLS1.0:+VERS-SSL3.0\"" + +- command = '%s %s --insecure --crlf -p %s %s' % \ +- (SSL_PATH, gnutls_opts, options["--ipport"], options["--ip"]) ++ # --ssl is same as the --ssl-secure ++ if options.has_key("--ssl-insecure"): ++ ssl_opts = "--insecure" ++ ++ command = '%s %s %s --insecure --crlf -p %s %s' % \ ++ (SSL_PATH, gnutls_opts, ssl_opts, options["--ipport"], options["--ip"]) + try: + conn = fspawn(options, command) + except pexpect.ExceptionPexpect, ex: +diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py +index a0d8d59..444fb56 100644 +--- a/fence/agents/rhevm/fence_rhevm.py ++++ b/fence/agents/rhevm/fence_rhevm.py +@@ -91,8 +91,13 @@ def send_command(opt, command, method="GET"): + conn.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC) + conn.setopt(pycurl.USERPWD, opt["--username"] + ":" + opt["--password"]) + conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) +- conn.setopt(pycurl.SSL_VERIFYPEER, 0) +- conn.setopt(pycurl.SSL_VERIFYHOST, 0) ++ if opt.has_key("--ssl") or opt.has_key("--ssl-secure"): ++ conn.setopt(pycurl.SSL_VERIFYPEER, 1) ++ conn.setopt(pycurl.SSL_VERIFYHOST, 2) ++ ++ if opt.has_key("--ssl-insecure"): ++ conn.setopt(pycurl.SSL_VERIFYPEER, 0) ++ conn.setopt(pycurl.SSL_VERIFYHOST, 0) + + if method == "POST": + conn.setopt(pycurl.POSTFIELDS, "") +diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py +index 53fd9ea..3217c6b 100644 +--- a/fence/agents/vmware_soap/fence_vmware_soap.py ++++ b/fence/agents/vmware_soap/fence_vmware_soap.py +@@ -2,12 +2,14 @@ + + import sys + import shutil, tempfile, suds +-import logging ++import logging, requests + import atexit + sys.path.append("@FENCEAGENTSLIBDIR@") + + from suds.client import Client + from suds.sudsobject import Property ++from suds.transport.http import HttpAuthenticated ++from suds.transport import Reply, TransportError + from fencing import * + from fencing import fail, EC_STATUS, EC_LOGIN_DENIED, EC_INVALID_PRIVILEGES, EC_WAITING_ON, EC_WAITING_OFF + from fencing import run_delay +@@ -18,12 +20,31 @@ REDHAT_COPYRIGHT="" + BUILD_DATE="April, 2011" + #END_VERSION_GENERATION + ++class RequestsTransport(HttpAuthenticated): ++ def __init__(self, **kwargs): ++ self.cert = kwargs.pop('cert', None) ++ self.verify = kwargs.pop('verify', True) ++ self.session = requests.Session() ++ # super won't work because not using new style class ++ HttpAuthenticated.__init__(self, **kwargs) ++ ++ def send(self, request): ++ self.addcredentials(request) ++ resp = self.session.post(request.url, data = request.message, headers = request.headers, cert = self.cert, verify = self.verify) ++ result = Reply(resp.status_code, resp.headers, resp.content) ++ return result ++ + def soap_login(options): + run_delay(options) + +- if options.has_key("--ssl"): ++ if options.has_key("--ssl") or options.has_key("--ssl-secure") or options.has_key("--ssl-insecure"): ++ if options.has_key("--ssl-insecure"): ++ verify = False ++ else: ++ verify = True + url = "https://" + else: ++ verify = False + url = "http://" + + url += options["--ip"] + ":" + str(options["--ipport"]) + "/sdk" +@@ -33,8 +54,8 @@ def soap_login(options): + atexit.register(remove_tmp_dir, tmp_dir) + + try: +- conn = Client(url + "/vimService.wsdl") +- conn.set_options(location=url) ++ headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : ""} ++ conn = Client(url + "/vimService.wsdl", location = url, transport = RequestsTransport(verify = verify), headers = headers) + + mo_ServiceInstance = Property('ServiceInstance') + mo_ServiceInstance._type = 'ServiceInstance' +@@ -43,6 +64,8 @@ def soap_login(options): + mo_SessionManager._type = 'SessionManager' + + conn.service.Login(mo_SessionManager, options["--username"], options["--password"]) ++ except requests.exceptions.SSLError, ex: ++ fail_usage("Server side certificate verification failed") + except Exception: + fail(EC_LOGIN_DENIED) + +@@ -205,6 +228,8 @@ Alternatively you can always use UUID to access virtual machine." + + logging.basicConfig(level=logging.INFO) + logging.getLogger('suds.client').setLevel(logging.CRITICAL) ++ logging.getLogger("requests").setLevel(logging.CRITICAL) ++ logging.getLogger("urllib3").setLevel(logging.CRITICAL) + + ## + ## Operate the fencing device +-- +1.9.3 + diff --git a/SOURCES/bz1072564-2-add_ssl_secure_and_ssl_insecure.patch b/SOURCES/bz1072564-2-add_ssl_secure_and_ssl_insecure.patch new file mode 100644 index 0000000..95e7dee --- /dev/null +++ b/SOURCES/bz1072564-2-add_ssl_secure_and_ssl_insecure.patch @@ -0,0 +1,186 @@ +From 6b7ba7c2969169a96146c0f3ed1fa6a0b34ff00f Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 1 Sep 2014 16:37:50 +0200 +Subject: [PATCH 2/2] [tests] Update XML metadata of fence agents + +added --ssl-secure, --ssl-insecure +--- + tests/data/metadata/fence_cisco_ucs.xml | 10 ++++++++++ + tests/data/metadata/fence_docker.xml | 10 ++++++++++ + tests/data/metadata/fence_ilo.xml | 10 ++++++++++ + tests/data/metadata/fence_ilo2.xml | 10 ++++++++++ + tests/data/metadata/fence_rhevm.xml | 10 ++++++++++ + tests/data/metadata/fence_vmware_soap.xml | 10 ++++++++++ + 6 files changed, 60 insertions(+) + +diff --git a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml +index 30a3cb4..75e45ce 100644 +--- a/tests/data/metadata/fence_cisco_ucs.xml ++++ b/tests/data/metadata/fence_cisco_ucs.xml +@@ -13,6 +13,11 @@ + + Disable TLS negotiation + ++ ++ ++ ++ SSL connection with verifying fence device's certificate ++ + + + +@@ -53,6 +58,11 @@ + + Additional path needed to access suborganization + ++ ++ ++ ++ SSL connection without verifying fence device's certificate ++ + + + +diff --git a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml +index bda31d01..d100b8c 100644 +--- a/tests/data/metadata/fence_docker.xml ++++ b/tests/data/metadata/fence_docker.xml +@@ -8,6 +8,11 @@ + + TCP/UDP port to use for connection with device + ++ ++ ++ ++ SSL connection with verifying fence device's certificate ++ + + + +@@ -41,6 +46,11 @@ + + SSL connection + ++ ++ ++ ++ SSL connection without verifying fence device's certificate ++ + + + +diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml +index eb8951c..25d9d54 100644 +--- a/tests/data/metadata/fence_ilo.xml ++++ b/tests/data/metadata/fence_ilo.xml +@@ -19,6 +19,11 @@ + + Force ribcl version to use + ++ ++ ++ ++ SSL connection with verifying fence device's certificate ++ + + + +@@ -54,6 +59,11 @@ + + SSL connection + ++ ++ ++ ++ SSL connection without verifying fence device's certificate ++ + + + +diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml +index 4d65808..47e8e28 100644 +--- a/tests/data/metadata/fence_ilo2.xml ++++ b/tests/data/metadata/fence_ilo2.xml +@@ -19,6 +19,11 @@ + + Force ribcl version to use + ++ ++ ++ ++ SSL connection with verifying fence device's certificate ++ + + + +@@ -54,6 +59,11 @@ + + SSL connection + ++ ++ ++ ++ SSL connection without verifying fence device's certificate ++ + + + +diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml +index a47f025..c9d6eeb 100644 +--- a/tests/data/metadata/fence_rhevm.xml ++++ b/tests/data/metadata/fence_rhevm.xml +@@ -13,6 +13,11 @@ + + Disable TLS negotiation + ++ ++ ++ ++ SSL connection with verifying fence device's certificate ++ + + + +@@ -48,6 +53,11 @@ + + SSL connection + ++ ++ ++ ++ SSL connection without verifying fence device's certificate ++ + + + +diff --git a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml +index 97d8fc6..d0a465f 100644 +--- a/tests/data/metadata/fence_vmware_soap.xml ++++ b/tests/data/metadata/fence_vmware_soap.xml +@@ -15,6 +15,11 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g + + Disable TLS negotiation + ++ ++ ++ ++ SSL connection with verifying fence device's certificate ++ + + + +@@ -50,6 +55,11 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g + + SSL connection + ++ ++ ++ ++ SSL connection without verifying fence device's certificate ++ + + + +-- +1.9.3 + diff --git a/SOURCES/bz1072564-2-feature_ssl-secure.patch b/SOURCES/bz1072564-2-feature_ssl-secure.patch deleted file mode 100644 index 66eba0c..0000000 --- a/SOURCES/bz1072564-2-feature_ssl-secure.patch +++ /dev/null @@ -1,104 +0,0 @@ -From c40a11439c738b67471da01ebfbc3d3d66db6311 Mon Sep 17 00:00:00 2001 -From: Marek 'marx' Grac -Date: Fri, 7 Mar 2014 15:13:44 +0100 -Subject: [PATCH] fence_vmware_soap: Add new options --ssl-secure and - --ssl-insecure - -These new options extends current --ssl (same as --ssl-secure). Until now certificate of the fence device -was not validated what can possibly lead to attack on infrastructe. With this patch, user can decide -if certificate should (--ssl-secure) or should not (--ssl-insecure) be verified. - -python-suds do not validates SSL certificates at all. It is required to change underlying library to -one that can support that what results in new dependency on python-requests. ---- - fence/agents/vmware_soap/fence_vmware_soap.py | 35 +++++++++++++++++++++--- - 1 files changed, 30 insertions(+), 5 deletions(-) - -diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py -index bbac1c5..a578662 100644 ---- a/fence/agents/vmware_soap/fence_vmware_soap.py -+++ b/fence/agents/vmware_soap/fence_vmware_soap.py -@@ -2,11 +2,13 @@ - - import sys, exceptions, time - import shutil, tempfile, suds --import logging -+import logging, requests - sys.path.append("@FENCEAGENTSLIBDIR@") - - from suds.client import Client - from suds.sudsobject import Property -+from suds.transport.http import HttpAuthenticated -+from suds.transport import Reply, TransportError - from fencing import * - - #BEGIN_VERSION_GENERATION -@@ -15,13 +17,32 @@ REDHAT_COPYRIGHT="" - BUILD_DATE="April, 2011" - #END_VERSION_GENERATION - -+class RequestsTransport(HttpAuthenticated): -+ def __init__(self, **kwargs): -+ self.cert = kwargs.pop('cert', None) -+ self.verify = kwargs.pop('verify', True) -+ self.session = requests.Session() -+ # super won't work because not using new style class -+ HttpAuthenticated.__init__(self, **kwargs) -+ -+ def send(self, request): -+ self.addcredentials(request) -+ resp = self.session.post(request.url, data = request.message, headers = request.headers, cert = self.cert, verify = self.verify) -+ result = Reply(resp.status_code, resp.headers, resp.content) -+ return result -+ - def soap_login(options): - if options["--action"] in ["off", "reboot"]: - time.sleep(int(options["--delay"])) - -- if options.has_key("--ssl"): -+ if options.has_key("--ssl") or options.has_key("--ssl-secure") or options.has_key("--ssl-insecure"): -+ if options.has_key("--ssl-insecure"): -+ verify = False -+ else: -+ verify = True - url = "https://" - else: -+ verify = False - url = "http://" - - url += options["--ip"] + ":" + str(options["--ipport"]) + "/sdk" -@@ -29,10 +50,10 @@ def soap_login(options): - 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) -+ headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : ""} -+ conn = Client(url + "/vimService.wsdl", location = url, transport = RequestsTransport(verify = verify), headers = headers) - - mo_ServiceInstance = Property('ServiceInstance') - mo_ServiceInstance._type = 'ServiceInstance' -@@ -41,6 +62,8 @@ def soap_login(options): - mo_SessionManager._type = 'SessionManager' - - SessionManager = conn.service.Login(mo_SessionManager, options["--username"], options["--password"]) -+ except requests.exceptions.SSLError, ex: -+ fail_usage("Server side certificate verification failed") - except Exception, ex: - fail(EC_LOGIN_DENIED) - -@@ -202,6 +225,8 @@ Alternatively you can always use UUID to access virtual machine." - - logging.basicConfig(level=logging.INFO) - logging.getLogger('suds.client').setLevel(logging.CRITICAL) -+ logging.getLogger("requests").setLevel(logging.CRITICAL) -+ logging.getLogger("urllib3").setLevel(logging.CRITICAL) - - ## - ## Operate the fencing device --- -1.7.7.6 - diff --git a/SOURCES/bz1072564-feature_ssl-secure.patch b/SOURCES/bz1072564-feature_ssl-secure.patch deleted file mode 100644 index 46108d9..0000000 --- a/SOURCES/bz1072564-feature_ssl-secure.patch +++ /dev/null @@ -1,128 +0,0 @@ -From e51df7a73141c4d378d12e4a3ade12776e48ebff Mon Sep 17 00:00:00 2001 -From: Marek 'marx' Grac -Date: Wed, 5 Mar 2014 12:49:17 +0100 -Subject: [PATCH] fencing: Add new options --ssl-secure and --ssl-insecure - -These new options extends current --ssl (same as --ssl-secure). Until now certificate of the fence device -was not validated what can possibly lead to attack on infrastructe. With this patch, user can decide -if certificate should (--ssl-secure) or should not (--ssl-insecure) be verified. ---- - fence/agents/cisco_ucs/fence_cisco_ucs.py | 10 ++++++- - fence/agents/lib/fencing.py.py | 29 ++++++++++++++++++--- - fence/agents/rhevm/fence_rhevm.py | 11 ++++++-- - 4 files changed, 70 insertions(+), 14 deletions(-) - -diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py -index 71782cb..1e9d983 100644 ---- a/fence/agents/cisco_ucs/fence_cisco_ucs.py -+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py -@@ -85,8 +85,14 @@ def send_command(opt, command, timeout): - c.setopt(pycurl.POSTFIELDS, command) - c.setopt(pycurl.WRITEFUNCTION, b.write) - c.setopt(pycurl.TIMEOUT, timeout) -- c.setopt(pycurl.SSL_VERIFYPEER, 0) -- c.setopt(pycurl.SSL_VERIFYHOST, 0) -+ if opt.has_key("--ssl") or opt.has_key("--ssl-secure"): -+ c.setopt(pycurl.SSL_VERIFYPEER, 1) -+ c.setopt(pycurl.SSL_VERIFYHOST, 2) -+ -+ if opt.has_key("--ssl-insecure"): -+ c.setopt(pycurl.SSL_VERIFYPEER, 0) -+ c.setopt(pycurl.SSL_VERIFYHOST, 0) -+ - c.perform() - result = b.getvalue() - -diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py -index 2006f0d..e40cbb2 100644 ---- a/fence/agents/lib/fencing.py.py -+++ b/fence/agents/lib/fencing.py.py -@@ -170,6 +170,20 @@ all_opt = { - "required" : "0", - "shortdesc" : "SSL connection", - "order" : 1 }, -+ "ssl_insecure" : { -+ "getopt" : "9", -+ "longopt" : "ssl-insecure", -+ "help" : "--ssl-insecure Use ssl connection without verifying certificate", -+ "required" : "0", -+ "shortdesc" : "SSL connection without verifying fence device's certificate", -+ "order" : 1 }, -+ "ssl_secure" : { -+ "getopt" : "9", -+ "longopt" : "ssl-secure", -+ "help" : "--ssl-secure Use ssl connection with verifying certificate", -+ "required" : "0", -+ "shortdesc" : "SSL connection with verifying fence device's certificate", -+ "order" : 1 }, - "notls" : { - "getopt" : "t", - "longopt" : "notls", -@@ -370,6 +384,7 @@ DEPENDENCY_OPT = { - "secure" : [ "identity_file", "ssh_options" ], - "ipaddr" : [ "ipport", "inet4_only", "inet6_only" ], - "port" : [ "separator" ], -+ "ssl" : [ "ssl_secure", "ssl_insecure" ], - "community" : [ "snmp_auth_prot", "snmp_sec_level", "snmp_priv_prot", \ - "snmp_priv_passwd", "snmp_priv_passwd_script" ] - } -@@ -645,7 +660,7 @@ def check_input(device_opt, opt): - elif options.has_key("--ssh"): - all_opt["ipport"]["default"] = 22 - all_opt["ipport"]["help"] = "-u, --ipport=[port] TCP/UDP port to use (default 22)" -- elif options.has_key("--ssl"): -+ elif options.has_key("--ssl") or options.has_key("--ssl-secure") or options.has_key("--ssl-insecure"): - all_opt["ipport"]["default"] = 443 - all_opt["ipport"]["help"] = "-u, --ipport=[port] TCP/UDP port to use (default 443)" - elif device_opt.count("web"): -@@ -738,7 +753,7 @@ def check_input(device_opt, opt): - if options.has_key("--ipport") == False: - if options.has_key("--ssh"): - options["--ipport"] = 22 -- elif options.has_key("--ssl"): -+ elif options.has_key("--ssl") or options.has_key("--ssl-secure") or options.has_key("--ssl-insecure"): - options["--ipport"] = 443 - elif device_opt.count("web"): - options["--ipport"] = 80 -@@ -968,11 +983,17 @@ def fence_login(options, re_login_string = "(login\s*: )|(Login Name: )|(userna - re_pass = re.compile("(password)|(pass phrase)", re.IGNORECASE) - - if options.has_key("--ssl"): -- gnutls_opts="" -+ gnutls_opts = "" -+ ssl_opts = "" -+ - if options.has_key("--notls"): - gnutls_opts = "--priority \"NORMAL:-VERS-TLS1.2:-VERS-TLS1.1:-VERS-TLS1.0:+VERS-SSL3.0\"" - -- command = '%s %s --insecure --crlf -p %s %s' % (SSL_PATH, gnutls_opts, options["--ipport"], options["--ip"]) -+ # --ssl is same as the --ssl-secure -+ if options.has_key("--ssl-insecure"): -+ ssl_opts = "--insecure" -+ -+ command = '%s %s %s --crlf -p %s %s' % (SSL_PATH, gnutls_opts, ssl_opts, options["--ipport"], options["--ip"]) - try: - conn = fspawn(options, command) - except pexpect.ExceptionPexpect, ex: -diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py -index ff3d19f..6098071 100644 ---- a/fence/agents/rhevm/fence_rhevm.py -+++ b/fence/agents/rhevm/fence_rhevm.py -@@ -84,9 +84,14 @@ def send_command(opt, command, method = "GET"): - c.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC) - c.setopt(pycurl.USERPWD, opt["--username"] + ":" + opt["--password"]) - c.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) -- c.setopt(pycurl.SSL_VERIFYPEER, 0) -- c.setopt(pycurl.SSL_VERIFYHOST, 0) -- -+ if opt.has_key("--ssl") or opt.has_key("--ssl-secure"): -+ c.setopt(pycurl.SSL_VERIFYPEER, 1) -+ c.setopt(pycurl.SSL_VERIFYHOST, 2) -+ -+ if opt.has_key("--ssl-insecure"): -+ c.setopt(pycurl.SSL_VERIFYPEER, 0) -+ c.setopt(pycurl.SSL_VERIFYHOST, 0) -+ - if (method == "POST"): - c.setopt(pycurl.POSTFIELDS, "") - diff --git a/SOURCES/bz1073947-ssh_login_failed.patch b/SOURCES/bz1073947-ssh_login_failed.patch deleted file mode 100644 index 53189bd..0000000 --- a/SOURCES/bz1073947-ssh_login_failed.patch +++ /dev/null @@ -1,40 +0,0 @@ -From a90a90cf56f713be9a4064a02c0f630425b2091c Mon Sep 17 00:00:00 2001 -From: Ondrej Mular -Date: Fri, 7 Mar 2014 09:43:00 -0500 -Subject: [PATCH] fencing: fixed pexpect TypeError exception, when using - identity file for login via ssh - -Previously, fence-agent failed to log in (ssh) using identity file. This caused fence-agent failure because of uncaught exception. - -Resolves: rhbz#1073947 - -Signed-off-by: Marek 'marx' Grac ---- - fence/agents/lib/fencing.py.py | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py -index 2006f0d..76855e1 100644 ---- a/fence/agents/lib/fencing.py.py -+++ b/fence/agents/lib/fencing.py.py -@@ -1022,13 +1022,12 @@ def fence_login(options, re_login_string = "(login\s*: )|(Login Name: )|(userna - "are not in the spec file and must be installed separately." + "\n") - sys.exit(EC_GENERIC_ERROR) - -- result = conn.log_expect(options, [ options["--command-prompt"], \ -- "Are you sure you want to continue connecting (yes/no)?", \ -- "Enter passphrase for key '" + options["--identity-file"] + "':" ], int(options["--login-timeout"])) -+ result = conn.log_expect(options, [ "Enter passphrase for key '" + options["--identity-file"] + "':",\ -+ "Are you sure you want to continue connecting (yes/no)?" ] + options["--command-prompt"], int(options["--login-timeout"])) - if result == 1: - conn.sendline("yes") -- conn.log_expect(options, [ options["--command-prompt"], "Enter passphrase for key '"+options["--identity-file"]+"':"] , int(options["--login-timeout"])) -- if result != 0: -+ result = conn.log_expect(options, [ "Enter passphrase for key '"+options["--identity-file"]+"':"] + options["--command-prompt"], int(options["--login-timeout"])) -+ if result == 0: - if options.has_key("--password"): - conn.sendline(options["--password"]) - conn.log_expect(options, options["--command-prompt"], int(options["--login-timeout"])) --- -1.8.5.3 - diff --git a/SOURCES/bz1111597-1-fence_rsb.patch b/SOURCES/bz1111597-1-fence_rsb.patch new file mode 100644 index 0000000..0bb780a --- /dev/null +++ b/SOURCES/bz1111597-1-fence_rsb.patch @@ -0,0 +1,27 @@ +From 11def0b2e4dcd18c5f098ba6a4cb935af937784e Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Thu, 2 Oct 2014 16:08:26 +0200 +Subject: [PATCH 1/2] fence_rsb: Fix 62d90e3a0827fcdc5be632bdf4103d3c08b39622 + +Patch was not incorporated correctly from older version. + +Resolves: rhbz#1110428 +--- + fence/agents/rsb/fence_rsb.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/fence/agents/rsb/fence_rsb.py b/fence/agents/rsb/fence_rsb.py +index bcad1de..d21093f 100755 +--- a/fence/agents/rsb/fence_rsb.py ++++ b/fence/agents/rsb/fence_rsb.py +@@ -29,7 +29,6 @@ def set_power_status(conn, options): + conn.send("2") + conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + conn.send_eol(action) +- conn.log_expect(options, ["want to power off", "'yes' or 'no'"], int(options["--shell-timeout"])) + conn.log_expect(options, ["want to power " + options["--action"], + "yes/no", "'yes' or 'no'"], int(options["--shell-timeout"])) + conn.send_eol("yes") +-- +1.9.3 + diff --git a/SOURCES/bz1111599-1-fence_cisco_and_soap_logout.patch b/SOURCES/bz1111599-1-fence_cisco_and_soap_logout.patch new file mode 100644 index 0000000..faafcc0 --- /dev/null +++ b/SOURCES/bz1111599-1-fence_cisco_and_soap_logout.patch @@ -0,0 +1,164 @@ +commit 91399dd3e884c50e2317ab738eea1569faa8d55a +Author: Marek 'marx' Grac +Date: Mon Sep 8 15:10:05 2014 +0200 + + fence_cisco_ucs & fence_vmware_soap: Logout has to be performed even when fencing fails + + Previously, logout was not performed in the case when fence agent was aborted e.g. timeout. What could + lead to a situation when connections were not closed correctly. In the extreme case, it was not possible + to log into device at all + + Resolves: rhbz#1111599 + +diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py +index 888d689..f411433 100644 +--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py ++++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py +@@ -19,6 +19,8 @@ RE_STATUS = re.compile("", ++ int(options_global["--shell-timeout"])) ++ except Exception: ++ pass ++ + def main(): ++ global options_global + device_opt = ["ipaddr", "login", "passwd", "ssl", "notls", "port", "web", "suborg"] + + atexit.register(atexit_handler) ++ atexit.register(logout) + + define_new_opts() + +- options = check_input(device_opt, process_input(device_opt)) ++ options_global = check_input(device_opt, process_input(device_opt)) + + docs = {} + docs["shortdesc"] = "Fence agent for Cisco UCS" + docs["longdesc"] = "fence_cisco_ucs is an I/O Fencing agent which can be \ + used with Cisco UCS to fence machines." + docs["vendorurl"] = "http://www.cisco.com" +- show_docs(options, docs) ++ show_docs(options_global, docs) + +- run_delay(options) ++ run_delay(options_global) + ### Login + try: +- res = send_command(options, "", int(options["--login-timeout"])) ++ res = send_command(options_global, "", int(options_global["--login-timeout"])) + result = RE_COOKIE.search(res) + if result == None: + ## Cookie is absenting in response +@@ -143,22 +155,19 @@ used with Cisco UCS to fence machines." + except Exception: + fail(EC_LOGIN_DENIED) + +- options["cookie"] = result.group(1) ++ options_global["cookie"] = result.group(1) + + ## + ## Modify suborg to format /suborg +- if options["--suborg"] != "": +- options["--suborg"] = "/" + options["--suborg"].lstrip("/").rstrip("/") ++ if options_global["--suborg"] != "": ++ options_global["--suborg"] = "/" + options_global["--suborg"].lstrip("/").rstrip("/") + + ## + ## Fence operations + #### +- result = fence_action(None, options, set_power_status, get_power_status, get_list) +- +- ### Logout; we do not care about result as we will end in any case +- send_command(options, "", +- int(options["--shell-timeout"])) ++ result = fence_action(None, options_global, set_power_status, get_power_status, get_list) + ++ ## Logout is done every time at atexit phase + sys.exit(result) + + if __name__ == "__main__": +diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py +index 3217c6b..2cea105 100644 +--- a/fence/agents/vmware_soap/fence_vmware_soap.py ++++ b/fence/agents/vmware_soap/fence_vmware_soap.py +@@ -20,6 +20,9 @@ REDHAT_COPYRIGHT="" + BUILD_DATE="April, 2011" + #END_VERSION_GENERATION + ++options_global = None ++conn_global = None ++ + class RequestsTransport(HttpAuthenticated): + def __init__(self, **kwargs): + self.cert = kwargs.pop('cert', None) +@@ -203,12 +206,21 @@ def set_power_status(conn, options): + def remove_tmp_dir(tmp_dir): + shutil.rmtree(tmp_dir) + ++def logout(): ++ try: ++ conn_global.service.Logout(options_global["mo_SessionManager"]) ++ except Exception: ++ pass ++ + def main(): ++ global options_global ++ global conn_global + device_opt = ["ipaddr", "login", "passwd", "web", "ssl", "notls", "port"] + + atexit.register(atexit_handler) ++ atexit.register(logout) + +- options = check_input(device_opt, process_input(device_opt)) ++ options_global = check_input(device_opt, process_input(device_opt)) + + ## + ## Fence agent specific defaults +@@ -224,7 +236,7 @@ format (e.g. /datacenter/vm/Discovered virtual machine/myMachine). \ + In the cases when name of yours VM is unique you can use it instead. \ + Alternatively you can always use UUID to access virtual machine." + docs["vendorurl"] = "http://www.vmware.com" +- show_docs(options, docs) ++ show_docs(options_global, docs) + + logging.basicConfig(level=logging.INFO) + logging.getLogger('suds.client').setLevel(logging.CRITICAL) +@@ -234,18 +246,11 @@ Alternatively you can always use UUID to access virtual machine." + ## + ## Operate the fencing device + #### +- conn = soap_login(options) +- +- result = fence_action(conn, options, set_power_status, get_power_status, get_power_status) ++ conn_global = soap_login(options_global) + +- ## +- ## Logout from system +- ##### +- try: +- conn.service.Logout(options["mo_SessionManager"]) +- except Exception: +- pass ++ result = fence_action(conn_global, options_global, set_power_status, get_power_status, get_power_status) + ++ ## Logout from system is done automatically via atexit() + sys.exit(result) + + if __name__ == "__main__": diff --git a/SOURCES/bz1121122-1-fence_ilo_ssh.patch b/SOURCES/bz1121122-1-fence_ilo_ssh.patch new file mode 100644 index 0000000..fc469a2 --- /dev/null +++ b/SOURCES/bz1121122-1-fence_ilo_ssh.patch @@ -0,0 +1,134 @@ +From 5cb174f204865d7ffe6d9edbfe8177b54bd61b49 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 3 Sep 2014 14:22:38 +0200 +Subject: [PATCH] fence_ilo_ssh: New fence agent for HP iLO3/4 via SSH + +Resolves: rhbz#1121122 +--- + configure.ac | 1 + + fence/agents/ilo_ssh/Makefile.am | 20 ++++++++++ + fence/agents/ilo_ssh/fence_ilo_ssh.py | 73 +++++++++++++++++++++++++++++++++++ + 3 files changed, 94 insertions(+) + create mode 100644 fence/agents/ilo_ssh/Makefile.am + create mode 100644 fence/agents/ilo_ssh/fence_ilo_ssh.py + +diff --git a/configure.ac b/configure.ac +index 0569dfe..b603878 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -278,6 +278,7 @@ AC_CONFIG_FILES([Makefile + fence/agents/ilo/Makefile + fence/agents/ilo_moonshot/Makefile + fence/agents/ilo_mp/Makefile ++ fence/agents/ilo_ssh/Makefile + fence/agents/intelmodular/Makefile + fence/agents/ipmilan/Makefile + fence/agents/kdump/Makefile +diff --git a/fence/agents/ilo_ssh/Makefile.am b/fence/agents/ilo_ssh/Makefile.am +new file mode 100644 +index 0000000..d67d7d1 +--- /dev/null ++++ b/fence/agents/ilo_ssh/Makefile.am +@@ -0,0 +1,20 @@ ++MAINTAINERCLEANFILES = Makefile.in ++ ++TARGET = fence_ilo_ssh ++ ++SRC = $(TARGET).py ++ ++EXTRA_DIST = $(SRC) ++ ++sbin_SCRIPTS = $(TARGET) ++ ++man_MANS = $(TARGET).8 ++ ++FENCE_TEST_ARGS = -p test -a test ++ ++include $(top_srcdir)/make/fencebuild.mk ++include $(top_srcdir)/make/fenceman.mk ++include $(top_srcdir)/make/agentpycheck.mk ++ ++clean-local: clean-man ++ rm -f $(TARGET) +diff --git a/fence/agents/ilo_ssh/fence_ilo_ssh.py b/fence/agents/ilo_ssh/fence_ilo_ssh.py +new file mode 100644 +index 0000000..f75ac25 +--- /dev/null ++++ b/fence/agents/ilo_ssh/fence_ilo_ssh.py +@@ -0,0 +1,73 @@ ++#!/usr/bin/python -tt ++ ++import sys, re ++import atexit ++sys.path.append("@FENCEAGENTSLIBDIR@") ++from fencing import * ++ ++#BEGIN_VERSION_GENERATION ++RELEASE_VERSION="" ++REDHAT_COPYRIGHT="" ++BUILD_DATE="" ++#END_VERSION_GENERATION ++ ++def get_power_status(conn, options): ++ conn.send_eol("show /system1") ++ ++ re_state = re.compile('EnabledState=(.*)', re.IGNORECASE) ++ conn.log_expect(options, re_state, int(options["--shell-timeout"])) ++ ++ status = conn.match.group(1).lower() ++ ++ if status.startswith("enabled"): ++ return "on" ++ else: ++ return "off" ++ ++def set_power_status(conn, options): ++ if options["--action"] == "on": ++ conn.send_eol("start /system1") ++ else: ++ conn.send_eol("power off hard") ++ ++ conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) ++ ++ return ++ ++def reboot_cycle(conn, options): ++ conn.send_eol("reset hard /system1") ++ conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) ++ return ++ ++def main(): ++ device_opt = ["ipaddr", "login", "passwd", "secure", "cmd_prompt", "method"] ++ ++ atexit.register(atexit_handler) ++ ++ all_opt["cmd_prompt"]["default"] = ["MP>", "hpiLO->"] ++ all_opt["power_wait"]["default"] = 5 ++ all_opt["method"]["default"] = "onoff" ++ ++ options = check_input(device_opt, process_input(device_opt)) ++ ++ docs = {} ++ docs["shortdesc"] = "Fence agent for HP iLO over SSH" ++ docs["longdesc"] = "fence_ilo_ssh is a fence agent that connects to iLO device. It logs into \ ++device via ssh and reboot a specified outlet. " ++ docs["vendorurl"] = "http://www.hp.com" ++ docs["symlink"] = [("fence_ilo3_ssh", "Fence agent for HP iLO3 over SSH"), ++ ("fence_ilo4_ssh", "Fence agent for HP iLO4 over SSH")] ++ show_docs(options, docs) ++ ++ conn = fence_login(options) ++ conn.send_eol("SMCLP") ++ ++ ## ++ ## Fence operations ++ #### ++ result = fence_action(conn, options, set_power_status, get_power_status, None, reboot_cycle) ++ fence_logout(conn, "exit") ++ sys.exit(result) ++ ++if __name__ == "__main__": ++ main() +-- +1.9.3 + diff --git a/SOURCES/bz1121122-2-broken_syslog.patch b/SOURCES/bz1121122-2-broken_syslog.patch new file mode 100644 index 0000000..9167515 --- /dev/null +++ b/SOURCES/bz1121122-2-broken_syslog.patch @@ -0,0 +1,25 @@ +From 9db6e28d381b19f2a396ea1a0f06ae4d434c0a27 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Thu, 27 Nov 2014 13:36:16 +0100 +Subject: [PATCH 1/3] [fencing] Character \x00 can't be inside syslog message + +--- + fence/agents/lib/fencing.py.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 740a4e0..302bba2 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -1215,5 +1215,7 @@ class SyslogLibHandler(logging.StreamHandler): + }[record.levelno] + + msg = self.format(record) +- syslog.syslog(syslog_level, msg) ++ ++ # syslos.syslog can not have 0x00 character inside or exception is thrown ++ syslog.syslog(syslog_level, msg.replace("\x00","\n")) + return +-- +1.9.3 + diff --git a/SOURCES/bz1121122-3-eol_changed.patch b/SOURCES/bz1121122-3-eol_changed.patch new file mode 100644 index 0000000..4e8ce84 --- /dev/null +++ b/SOURCES/bz1121122-3-eol_changed.patch @@ -0,0 +1,29 @@ +From ffee19e58c7186c88e7aba58f52ab0098d0939a7 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 1 Dec 2014 10:10:00 +0100 +Subject: [PATCH 2/3] fence_ilo_ssh: Change EOL to \r + +Previously, we have used \r\n that works fine with iLO3 with firmware >=1.50 but +for iLO4 all firmware that we have tested works only with \r + +Resolves: rhbz#1121122 +--- + fence/agents/ilo_ssh/fence_ilo_ssh.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/fence/agents/ilo_ssh/fence_ilo_ssh.py b/fence/agents/ilo_ssh/fence_ilo_ssh.py +index 2fc9de2..7451792 100644 +--- a/fence/agents/ilo_ssh/fence_ilo_ssh.py ++++ b/fence/agents/ilo_ssh/fence_ilo_ssh.py +@@ -59,6 +59,8 @@ device via ssh and reboot a specified outlet. " + ("fence_ilo4_ssh", "Fence agent for HP iLO4 over SSH")] + show_docs(options, docs) + ++ options["eol"] = "\r" ++ + conn = fence_login(options) + conn.send_eol("SMCLP") + +-- +1.9.3 + diff --git a/SOURCES/bz1121122-3.5-delay_test.patch b/SOURCES/bz1121122-3.5-delay_test.patch new file mode 100644 index 0000000..5badd5b --- /dev/null +++ b/SOURCES/bz1121122-3.5-delay_test.patch @@ -0,0 +1,19 @@ +commit fbef1a9288b311564e3abe840ba414a4fee59832 +Author: Marek 'marx' Grac +Date: Thu Oct 16 14:12:00 2014 +0200 + + [test] fence_ilo_ssh: Add required parameter for testing --delay + +diff --git a/fence/agents/ilo_ssh/Makefile.am b/fence/agents/ilo_ssh/Makefile.am +index 3605e3c..dff0e6a 100644 +--- a/fence/agents/ilo_ssh/Makefile.am ++++ b/fence/agents/ilo_ssh/Makefile.am +@@ -10,7 +10,7 @@ sbin_SCRIPTS = $(TARGET) + + man_MANS = $(TARGET).8 + +-FENCE_TEST_ARGS = -p test -a test ++FENCE_TEST_ARGS = -p test -a test -l test + + include $(top_srcdir)/make/fencebuild.mk + include $(top_srcdir)/make/fenceman.mk diff --git a/SOURCES/bz1121122-4-symlink_ilo34_ssh.patch b/SOURCES/bz1121122-4-symlink_ilo34_ssh.patch new file mode 100644 index 0000000..201de40 --- /dev/null +++ b/SOURCES/bz1121122-4-symlink_ilo34_ssh.patch @@ -0,0 +1,35 @@ +From 46bd07975854e3ad0b351af93d0cfc769811a81e Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 1 Dec 2014 10:11:38 +0100 +Subject: [PATCH 3/3] fence_ilo_ssh: Create symlinks for fence_ilo3_ssh and + fence_ilo4_ssh + +Resolves: rhbz#1121122 +--- + fence/agents/ilo_ssh/Makefile.am | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/fence/agents/ilo_ssh/Makefile.am b/fence/agents/ilo_ssh/Makefile.am +index dff0e6a..34769d9 100644 +--- a/fence/agents/ilo_ssh/Makefile.am ++++ b/fence/agents/ilo_ssh/Makefile.am +@@ -2,13 +2,15 @@ MAINTAINERCLEANFILES = Makefile.in + + TARGET = fence_ilo_ssh + ++SYMTARGET = fence_ilo3_ssh fence_ilo4_ssh ++ + SRC = $(TARGET).py + + EXTRA_DIST = $(SRC) + + sbin_SCRIPTS = $(TARGET) + +-man_MANS = $(TARGET).8 ++man_MANS = $(TARGET).8 $(SYMTARGET:%=%.8) + + FENCE_TEST_ARGS = -p test -a test -l test + +-- +1.9.3 + diff --git a/SOURCES/bz1121122-5-symlink_ilo34_ssh.patch b/SOURCES/bz1121122-5-symlink_ilo34_ssh.patch new file mode 100644 index 0000000..564e7bc --- /dev/null +++ b/SOURCES/bz1121122-5-symlink_ilo34_ssh.patch @@ -0,0 +1,35 @@ +From cf83b8aebf21dc9a306d42aff33d86bd5c20bcbc Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 1 Dec 2014 11:04:25 +0100 +Subject: [PATCH] fence_ilo_ssh: Create symlinks for fence_ilo3_ssh and + fence_ilo4_ssh + +Resolves: rhbz#1121122 +--- + fence/agents/ilo_ssh/Makefile.am | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/fence/agents/ilo_ssh/Makefile.am b/fence/agents/ilo_ssh/Makefile.am +index 34769d9..883c306 100644 +--- a/fence/agents/ilo_ssh/Makefile.am ++++ b/fence/agents/ilo_ssh/Makefile.am +@@ -8,12 +8,15 @@ SRC = $(TARGET).py + + EXTRA_DIST = $(SRC) + +-sbin_SCRIPTS = $(TARGET) ++sbin_SCRIPTS = $(TARGET) $(SYMTARGET) + + man_MANS = $(TARGET).8 $(SYMTARGET:%=%.8) + + FENCE_TEST_ARGS = -p test -a test -l test + ++$(SYMTARGET) : $(TARGET) ++ cp $^ $@ ++ + include $(top_srcdir)/make/fencebuild.mk + include $(top_srcdir)/make/fenceman.mk + include $(top_srcdir)/make/agentpycheck.mk +-- +1.9.3 + diff --git a/SOURCES/bz1140921-1-fence_zvm.patch b/SOURCES/bz1140921-1-fence_zvm.patch new file mode 100644 index 0000000..9362066 --- /dev/null +++ b/SOURCES/bz1140921-1-fence_zvm.patch @@ -0,0 +1,62 @@ +From ad16ebe302d8f7acee25afc767c03128a0daf98c Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Fri, 12 Sep 2014 21:02:59 +0200 +Subject: [PATCH] fence_zvm: Fixes for better upstream inclusion + +--- + fence/agents/zvm/Makefile.am | 7 +++++++ + fence/agents/zvm/fence_zvm.c | 1 + + fence/agents/zvm/fence_zvmip.c | 1 + + 3 files changed, 9 insertions(+) + +diff --git a/fence/agents/zvm/Makefile.am b/fence/agents/zvm/Makefile.am +index 2439985..62eb862 100644 +--- a/fence/agents/zvm/Makefile.am ++++ b/fence/agents/zvm/Makefile.am +@@ -1,5 +1,7 @@ + MAINTAINERCLEANFILES = Makefile.in + ++TARGET = fence_zvmip ++ + sbin_PROGRAMS = fence_zvm fence_zvmip + + noinst_HEADERS = fence_zvm.h +@@ -12,6 +14,11 @@ fence_zvmip_CFLAGS = -D_GNU_SOURCE + + dist_man_MANS = fence_zvm.8 fence_zvmip.8 + ++#include $(top_srcdir)/make/fencemanc.mk ++ ++clean-local: ++ rm -f $(sbin_PROGRAMS) ++ + FENCE_TEST_ARGS = -n test -a test -p test -u test + + include $(top_srcdir)/make/agentccheck.mk +diff --git a/fence/agents/zvm/fence_zvm.c b/fence/agents/zvm/fence_zvm.c +index 2ec4be9..e5a7c2b 100644 +--- a/fence/agents/zvm/fence_zvm.c ++++ b/fence/agents/zvm/fence_zvm.c +@@ -599,6 +599,7 @@ zvm_metadata() + fprintf (stdout, ""); + fprintf (stdout, "The fence_zvm agent is intended to be used with with z/VM SMAPI service."); + fprintf (stdout, "\n"); ++ fprintf (stdout, "http://www.ibm.com\n"); + + fprintf (stdout, "\n"); + +diff --git a/fence/agents/zvm/fence_zvmip.c b/fence/agents/zvm/fence_zvmip.c +index 94c9e2e..3342bc6 100644 +--- a/fence/agents/zvm/fence_zvmip.c ++++ b/fence/agents/zvm/fence_zvmip.c +@@ -804,6 +804,7 @@ zvm_metadata() + fprintf (stdout, ""); + fprintf (stdout, "The fence_zvm agent is intended to be used with with z/VM SMAPI service via TCP/IP"); + fprintf (stdout, "\n"); ++ fprintf (stdout, "http://www.ibm.com\n"); + + fprintf (stdout, "\n"); + +-- +1.9.3 + diff --git a/SOURCES/bz1140921-2-fence_zvm.patch b/SOURCES/bz1140921-2-fence_zvm.patch new file mode 100644 index 0000000..4f25bc3 --- /dev/null +++ b/SOURCES/bz1140921-2-fence_zvm.patch @@ -0,0 +1,226 @@ +commit 004ce512d61867bcc981ae49c5fbf5ffb30172fa +Author: Marek 'marx' Grac +Date: Mon Sep 15 15:05:25 2014 +0200 + + fence_zvm: Add support for 'on', improve documentation + + Author: Neale Ferguson + +diff --git a/fence/agents/zvm/fence_zvm.8 b/fence/agents/zvm/fence_zvm.8 +index 359436e..8c0d35a 100644 +--- a/fence/agents/zvm/fence_zvm.8 ++++ b/fence/agents/zvm/fence_zvm.8 +@@ -52,7 +52,7 @@ forcibly terminated. Currently, this option is ignored. + This option is used by fence_node(8) and is ignored by fence_zvm. + .TP + \fIaction = < action >\fP +-Fencing action: "off" - fence off device; "metadata" - display device metadata; "status" - state of device ++Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine + .TP + \fIport = < target >\fP + Name of virtual machine to recycle. +diff --git a/fence/agents/zvm/fence_zvm.c b/fence/agents/zvm/fence_zvm.c +index e5a7c2b..524e21e 100644 +--- a/fence/agents/zvm/fence_zvm.c ++++ b/fence/agents/zvm/fence_zvm.c +@@ -699,15 +699,15 @@ get_options_stdin (zvm_driver_t *zvm) + + if (!strcasecmp (opt, "action")) { + if (strcasecmp(arg, "off") == 0) { +- fence = 0; +- } else if (strcasecmp(arg, "on") == 0) { + fence = 1; +- } else if (strcasecmp(arg, "metadata") == 0) { ++ } else if (strcasecmp(arg, "on") == 0) { + fence = 2; +- } else if (strcasecmp(arg, "status") == 0) { ++ } else if (strcasecmp(arg, "metadata") == 0) { + fence = 3; +- } else { ++ } else if (strcasecmp(arg, "status") == 0) { + fence = 4; ++ } else { ++ fence = 5; + } + } else if (!strcasecmp (opt, "ipaddr")) { + lSrvName = MIN(strlen(arg), sizeof(zvm->smapiSrv)); +@@ -738,7 +738,7 @@ get_options_stdin (zvm_driver_t *zvm) + zvm->delay = DEFAULT_DELAY; + } + } else if (!strcasecmp (opt, "help")) { +- fence = 4; ++ fence = 5; + } + } + return(fence); +@@ -769,15 +769,15 @@ get_options(int argc, char **argv, zvm_driver_t *zvm) + break; + case 'o' : + if (strcasecmp(optarg, "off") == 0) { +- fence = 0; +- } else if (strcasecmp(optarg, "on") == 0) { + fence = 1; +- } else if (strcasecmp(optarg, "metadata") == 0) { ++ } else if (strcasecmp(optarg, "on") == 0) { + fence = 2; +- } else if (strcasecmp(optarg, "status") == 0) { ++ } else if (strcasecmp(optarg, "metadata") == 0) { + fence = 3; +- } else { ++ } else if (strcasecmp(optarg, "status") == 0) { + fence = 4; ++ } else { ++ fence = 5; + } + break; + case 'a' : +@@ -807,7 +807,7 @@ get_options(int argc, char **argv, zvm_driver_t *zvm) + memcpy(zvm->node, optarg, lSrvNode); + break; + default : +- fence = 4; ++ fence = 5; + } + } + return(fence); +@@ -874,22 +874,26 @@ main(int argc, char **argv) + fence = get_options_stdin(&zvm); + + switch(fence) { +- case 0 : // OFF ++ case 0 : // OFFON ++ if ((rc = check_parm(&zvm)) == 0) ++ rc = zvm_smapi_imageRecycle(&zvm); ++ break; ++ case 1 : // OFF + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageDeactivate(&zvm); + break; +- case 1 : // ON ++ case 2 : // ON + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageActivate(&zvm); + break; +- case 2 : // METADATA ++ case 3 : // METADATA + rc = zvm_metadata(); + break; +- case 3 : // STATUS ++ case 4 : // STATUS + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageQuery(&zvm); + break; +- case 4 : ++ case 5 : + rc = usage(); + } + closelog(); +diff --git a/fence/agents/zvm/fence_zvmip.8 b/fence/agents/zvm/fence_zvmip.8 +index 8217d61..6b01425 100644 +--- a/fence/agents/zvm/fence_zvmip.8 ++++ b/fence/agents/zvm/fence_zvmip.8 +@@ -55,7 +55,7 @@ Display usage information + This option is used by fence_node(8) and is ignored by fence_zvmip. + .TP + \fIaction = < action >\fP +-Fencing action: "off" - fence off device; "metadata" - display device metadata; "status" - state of device ++Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine + .TP + \fIplug = < plug >\fP + Name of virtual machine to recycle. +diff --git a/fence/agents/zvm/fence_zvmip.c b/fence/agents/zvm/fence_zvmip.c +index 3342bc6..bd7c536 100644 +--- a/fence/agents/zvm/fence_zvmip.c ++++ b/fence/agents/zvm/fence_zvmip.c +@@ -677,15 +677,15 @@ get_options_stdin (zvm_driver_t *zvm) + + if (!strcasecmp (opt, "action")) { + if (strcasecmp(arg, "off") == 0) { +- fence = 0; +- } else if (strcasecmp(arg, "on") == 0) { + fence = 1; +- } else if (strcasecmp(arg, "metadata") == 0) { ++ } else if (strcasecmp(arg, "on") == 0) { + fence = 2; +- } else if (strcasecmp(arg, "status") == 0) { ++ } else if (strcasecmp(arg, "metadata") == 0) { + fence = 3; +- } else { ++ } else if (strcasecmp(arg, "status") == 0) { + fence = 4; ++ } else { ++ fence = 5; + } + } else if (!strcasecmp (opt, "ipaddr")) { + lSrvName = MIN(strlen(arg), sizeof(zvm->smapiSrv)-1); +@@ -712,7 +712,7 @@ get_options_stdin (zvm_driver_t *zvm) + zvm->timeOut = DEFAULT_TIMEOUT; + } + } else if (!strcasecmp (opt, "help")) { +- fence = 2; ++ fence = 5; + } + } + return(fence); +@@ -746,15 +746,15 @@ get_options(int argc, char **argv, zvm_driver_t *zvm) + break; + case 'o' : + if (strcasecmp(optarg, "off") == 0) { +- fence = 0; +- } else if (strcasecmp(optarg, "on") == 0) { + fence = 1; +- } else if (strcasecmp(optarg, "metadata") == 0) { ++ } else if (strcasecmp(optarg, "on") == 0) { + fence = 2; +- } else if (strcasecmp(optarg, "status") == 0) { ++ } else if (strcasecmp(optarg, "metadata") == 0) { + fence = 3; +- } else { ++ } else if (strcasecmp(optarg, "status") == 0) { + fence = 4; ++ } else { ++ fence = 5; + } + break; + case 'p' : +@@ -784,7 +784,7 @@ get_options(int argc, char **argv, zvm_driver_t *zvm) + } + break; + default : +- fence = 4; ++ fence = 5; + } + } + return(fence); +@@ -944,22 +944,26 @@ main(int argc, char **argv) + fence = get_options_stdin(&zvm); + + switch(fence) { +- case 0 : // OFF ++ case 0 : // OFFON ++ if ((rc = check_parm(&zvm)) == 0) ++ rc = zvm_smapi_imageRecycle(&zvm); ++ break; ++ case 1 : // OFF + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageDeactivate(&zvm); + break; +- case 1 : // ON ++ case 2 : // ON + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageActivate(&zvm); + break; +- case 2 : // METADATA ++ case 3 : // METADATA + rc = zvm_metadata(); + break; +- case 3 : // STATUS ++ case 4 : // STATUS + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageQuery(&zvm); + break; +- case 4 : ++ case 5 : + rc = usage(); + } + closelog(); diff --git a/SOURCES/bz1140921-3-fence_zvm.patch b/SOURCES/bz1140921-3-fence_zvm.patch new file mode 100644 index 0000000..dc28a48 --- /dev/null +++ b/SOURCES/bz1140921-3-fence_zvm.patch @@ -0,0 +1,417 @@ +commit c5ed2256e572bd06e8bf4ca00d6c891424ae4b00 +Author: Marek 'marx' Grac +Date: Thu Oct 23 16:33:26 2014 +0200 + + fence_zvm: Add support for 'monitor' + + Author: Neale Ferguson + +diff --git a/fence/agents/zvm/fence_zvm.c b/fence/agents/zvm/fence_zvm.c +index 524e21e..2f82e25 100644 +--- a/fence/agents/zvm/fence_zvm.c ++++ b/fence/agents/zvm/fence_zvm.c +@@ -51,6 +51,15 @@ + #define DEFAULT_TIMEOUT 300 + #define DEFAULT_DELAY 0 + ++#define ACT_OFFON 0 ++#define ACT_OFF 1 ++#define ACT_ON 2 ++#define ACT_METADATA 3 ++#define ACT_STATUS 4 ++#define ACT_MONITOR 5 ++#define ACT_LIST 6 ++#define ACT_HELP 7 ++ + static int zvm_smapi_reportError(void *, void *); + + static struct option longopts[] = { +@@ -64,7 +73,7 @@ static struct option longopts[] = { + {NULL, 0, NULL, 0} + }; + +-static char *optString = "a:ho:n:T:"; ++static const char *optString = "a:ho:n:T:"; + + static int zvm_metadata(void); + static int usage(void); +@@ -323,8 +332,7 @@ zvm_smapi_imageActivate(zvm_driver_t *zvm) + rc = 0; + } else { + if ((outPlist->hdr.rc == RCERR_IMAGEOP) & +- ((outPlist->hdr.reason == RS_NOT_ACTIVE) | +- (outPlist->hdr.reason == RS_BEING_DEACT))) { ++ (outPlist->hdr.reason == RS_ALREADY_ACTIVE)) { + syslog(LOG_INFO, "Activation of %s successful", + zvm->target); + rc = 0; +@@ -649,8 +657,11 @@ zvm_metadata() + + fprintf (stdout, "\n"); + fprintf (stdout, "\t\n"); +- fprintf (stdout, "\t\n"); ++ fprintf (stdout, "\t\n"); ++ fprintf (stdout, "\t\n"); + fprintf (stdout, "\t\n"); ++ fprintf (stdout, "\t\n"); ++ fprintf (stdout, "\t\n"); + fprintf (stdout, "\t\n"); + fprintf (stdout, "\n"); + +@@ -675,7 +686,7 @@ get_options_stdin (zvm_driver_t *zvm) + int32_t lSrvName, + lSrvNode, + lTarget; +- int fence = 0; ++ int fence = ACT_OFFON; + + while (fgets (buf, sizeof (buf), stdin) != 0) { + if (trim(buf) == 0) { +@@ -698,16 +709,22 @@ get_options_stdin (zvm_driver_t *zvm) + continue; + + if (!strcasecmp (opt, "action")) { +- if (strcasecmp(arg, "off") == 0) { +- fence = 1; ++ if (strcasecmp(arg, "reboot") == 0) { ++ fence = ACT_OFFON; ++ } else if (strcasecmp(arg, "off") == 0) { ++ fence = ACT_OFF; + } else if (strcasecmp(arg, "on") == 0) { +- fence = 2; ++ fence = ACT_ON; + } else if (strcasecmp(arg, "metadata") == 0) { +- fence = 3; ++ fence = ACT_METADATA; + } else if (strcasecmp(arg, "status") == 0) { +- fence = 4; ++ fence = ACT_STATUS; ++ } else if (strcasecmp(arg, "monitor") == 0) { ++ fence = ACT_MONITOR; ++ } else if (strcasecmp(arg, "list") == 0) { ++ fence = ACT_LIST; + } else { +- fence = 5; ++ fence = ACT_HELP; + } + } else if (!strcasecmp (opt, "ipaddr")) { + lSrvName = MIN(strlen(arg), sizeof(zvm->smapiSrv)); +@@ -738,7 +755,7 @@ get_options_stdin (zvm_driver_t *zvm) + zvm->delay = DEFAULT_DELAY; + } + } else if (!strcasecmp (opt, "help")) { +- fence = 5; ++ fence = ACT_HELP; + } + } + return(fence); +@@ -755,7 +772,7 @@ static int + get_options(int argc, char **argv, zvm_driver_t *zvm) + { + int c, +- fence = 0; ++ fence = ACT_OFFON; + int32_t lSrvName, + lSrvNode, + lTarget; +@@ -768,16 +785,22 @@ get_options(int argc, char **argv, zvm_driver_t *zvm) + memcpy(zvm->target, optarg, lTarget); + break; + case 'o' : +- if (strcasecmp(optarg, "off") == 0) { +- fence = 1; ++ if (strcasecmp(optarg, "reboot") == 0) { ++ fence = ACT_OFFON; ++ } else if (strcasecmp(optarg, "off") == 0) { ++ fence = ACT_OFF; + } else if (strcasecmp(optarg, "on") == 0) { +- fence = 2; ++ fence = ACT_ON; + } else if (strcasecmp(optarg, "metadata") == 0) { +- fence = 3; ++ fence = ACT_METADATA; + } else if (strcasecmp(optarg, "status") == 0) { +- fence = 4; ++ fence = ACT_STATUS; ++ } else if (strcasecmp(optarg, "monitor") == 0) { ++ fence = ACT_MONITOR; ++ } else if (strcasecmp(optarg, "list") == 0) { ++ fence = ACT_LIST; + } else { +- fence = 5; ++ fence = ACT_HELP; + } + break; + case 'a' : +@@ -807,7 +830,7 @@ get_options(int argc, char **argv, zvm_driver_t *zvm) + memcpy(zvm->node, optarg, lSrvNode); + break; + default : +- fence = 5; ++ fence = ACT_HELP; + } + } + return(fence); +@@ -822,7 +845,8 @@ usage() + { + fprintf(stderr,"Usage: fence_zvm [options]\n\n" + "\tWhere [options] =\n" +- "\t-o --action [action] - \"off\", \"on\", \"metadata\", \"status\"\n" ++ "\t-o --action [action] - \"off\", \"on\", \"list\", \"metadata\", " ++ "\"monitor\", \"reboot\", \"status\"\n" + "\t--delay [seconds] - Time to delay fencing action in seconds\n" + "\t-n --plug [target] - Name of virtual machine to fence\n" + "\t-a --ip [server] - Name of SMAPI IUCV Request server\n" +@@ -874,26 +898,33 @@ main(int argc, char **argv) + fence = get_options_stdin(&zvm); + + switch(fence) { +- case 0 : // OFFON ++ case ACT_OFFON : // OFFON + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageRecycle(&zvm); + break; +- case 1 : // OFF ++ case ACT_OFF : // OFF + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageDeactivate(&zvm); + break; +- case 2 : // ON ++ case ACT_ON : // ON + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageActivate(&zvm); + break; +- case 3 : // METADATA ++ case ACT_METADATA : // METADATA + rc = zvm_metadata(); + break; +- case 4 : // STATUS ++ case ACT_STATUS : // STATUS + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageQuery(&zvm); + break; +- case 5 : ++ case ACT_MONITOR : // MONITOR ++ rc = 0; ++ break; ++ case ACT_LIST : // LIST ++ printf("N/A"); ++ rc = 0; ++ break; ++ case ACT_HELP : + rc = usage(); + } + closelog(); +diff --git a/fence/agents/zvm/fence_zvmip.c b/fence/agents/zvm/fence_zvmip.c +index bd7c536..b16de48 100644 +--- a/fence/agents/zvm/fence_zvmip.c ++++ b/fence/agents/zvm/fence_zvmip.c +@@ -50,6 +50,15 @@ + #define DEFAULT_TIMEOUT 300 + #define DEFAULT_DELAY 0 + ++#define ACT_OFFON 0 ++#define ACT_OFF 1 ++#define ACT_ON 2 ++#define ACT_METADATA 3 ++#define ACT_STATUS 4 ++#define ACT_MONITOR 5 ++#define ACT_LIST 6 ++#define ACT_HELP 7 ++ + static int zvm_smapi_reportError(void *, void *); + + static struct option longopts[] = { +@@ -64,7 +73,7 @@ static struct option longopts[] = { + {NULL, 0, NULL, 0} + }; + +-static char *optString = "a:o:hn:p:t:u:"; ++static const char *optString = "a:o:hn:p:t:u:"; + + static int zvm_metadata(void); + static int usage(void); +@@ -376,8 +385,7 @@ zvm_smapi_imageActivate(zvm_driver_t *zvm) + rc = 0; + } else { + if ((outPlist->hdr.rc == RCERR_IMAGEOP) & +- ((outPlist->hdr.reason == RS_NOT_ACTIVE) | +- (outPlist->hdr.reason == RS_BEING_DEACT))) { ++ (outPlist->hdr.reason == RS_ALREADY_ACTIVE)) { + syslog(LOG_INFO, "Activation of %s successful", + zvm->target); + rc = 0; +@@ -653,7 +661,7 @@ get_options_stdin (zvm_driver_t *zvm) + *arg; + int32_t lSrvName, + lTarget; +- int fence = 0; ++ int fence = ACT_OFFON; + + while (fgets (buf, sizeof (buf), stdin) != 0) { + if (trim(buf) == 0) { +@@ -676,16 +684,22 @@ get_options_stdin (zvm_driver_t *zvm) + continue; + + if (!strcasecmp (opt, "action")) { +- if (strcasecmp(arg, "off") == 0) { +- fence = 1; ++ if (strcasecmp(arg, "reboot") == 0) { ++ fence = ACT_OFFON; ++ } else if (strcasecmp(arg, "off") == 0) { ++ fence = ACT_OFF; + } else if (strcasecmp(arg, "on") == 0) { +- fence = 2; ++ fence = ACT_ON; + } else if (strcasecmp(arg, "metadata") == 0) { +- fence = 3; ++ fence = ACT_METADATA; + } else if (strcasecmp(arg, "status") == 0) { +- fence = 4; ++ fence = ACT_STATUS; ++ } else if (strcasecmp(arg, "monitor") == 0) { ++ fence = ACT_MONITOR; ++ } else if (strcasecmp(arg, "list") == 0) { ++ fence = ACT_LIST; + } else { +- fence = 5; ++ fence = ACT_HELP; + } + } else if (!strcasecmp (opt, "ipaddr")) { + lSrvName = MIN(strlen(arg), sizeof(zvm->smapiSrv)-1); +@@ -712,7 +726,7 @@ get_options_stdin (zvm_driver_t *zvm) + zvm->timeOut = DEFAULT_TIMEOUT; + } + } else if (!strcasecmp (opt, "help")) { +- fence = 5; ++ fence = ACT_HELP; + } + } + return(fence); +@@ -729,7 +743,7 @@ static int + get_options(int argc, char **argv, zvm_driver_t *zvm) + { + int c, +- fence = 0; ++ fence = ACT_OFFON; + int32_t lSrvName, + lTarget; + char *endPtr; +@@ -745,16 +759,22 @@ get_options(int argc, char **argv, zvm_driver_t *zvm) + memcpy(zvm->target, optarg, lTarget); + break; + case 'o' : +- if (strcasecmp(optarg, "off") == 0) { +- fence = 1; ++ if (strcasecmp(optarg, "reboot") == 0) { ++ fence = ACT_OFFON; ++ } else if (strcasecmp(optarg, "off") == 0) { ++ fence = ACT_OFF; + } else if (strcasecmp(optarg, "on") == 0) { +- fence = 2; ++ fence = ACT_ON; + } else if (strcasecmp(optarg, "metadata") == 0) { +- fence = 3; ++ fence = ACT_METADATA; + } else if (strcasecmp(optarg, "status") == 0) { +- fence = 4; ++ fence = ACT_STATUS; ++ } else if (strcasecmp(optarg, "monitor") == 0) { ++ fence = ACT_MONITOR; ++ } else if (strcasecmp(optarg, "list") == 0) { ++ fence = ACT_LIST; + } else { +- fence = 5; ++ fence = ACT_HELP; + } + break; + case 'p' : +@@ -784,7 +804,7 @@ get_options(int argc, char **argv, zvm_driver_t *zvm) + } + break; + default : +- fence = 5; ++ fence = ACT_HELP; + } + } + return(fence); +@@ -861,9 +881,12 @@ zvm_metadata() + + fprintf (stdout, "\n"); + fprintf (stdout, "\t\n"); +- fprintf (stdout, "\t\n"); ++ fprintf (stdout, "\t\n"); ++ fprintf (stdout, "\t\n"); + fprintf (stdout, "\t\n"); ++ fprintf (stdout, "\t\n"); + fprintf (stdout, "\t\n"); ++ fprintf (stdout, "\t\n"); + fprintf (stdout, "\n"); + + fprintf (stdout, "\n"); +@@ -881,7 +904,8 @@ usage() + { + fprintf(stderr,"Usage: fence_zvmip [options]\n\n" + "\tWhere [options] =\n" +- "\t-o --action [action] - \"off\", \"on\", \"metadata\", \"status\"\n" ++ "\t-o --action [action] - \"off\", \"on\", \"list\", \"metadata\", " ++ "\"monitor\", \"reboot\", \"status\"\n" + "\t--delay [seconds] - Time to delay fencing action in seconds\n" + "\t-n --plug [target] - Name of virtual machine to fence\n" + "\t-a --ip [server] - IP Name/Address of SMAPI Server\n" +@@ -944,26 +968,32 @@ main(int argc, char **argv) + fence = get_options_stdin(&zvm); + + switch(fence) { +- case 0 : // OFFON ++ case ACT_OFFON : // OFFON + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageRecycle(&zvm); + break; +- case 1 : // OFF ++ case ACT_OFF : // OFF + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageDeactivate(&zvm); + break; +- case 2 : // ON ++ case ACT_ON : // ON + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageActivate(&zvm); + break; +- case 3 : // METADATA ++ case ACT_METADATA : // METADATA + rc = zvm_metadata(); + break; +- case 4 : // STATUS ++ case ACT_STATUS : // STATUS + if ((rc = check_parm(&zvm)) == 0) + rc = zvm_smapi_imageQuery(&zvm); + break; +- case 5 : ++ case ACT_MONITOR : // MONITOR ++ rc = 0; ++ break; ++ case ACT_LIST : ++ printf("N/A"); ++ break; ++ case ACT_HELP : + rc = usage(); + } + closelog(); +diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml +index 1e098d1..7791303 100644 +--- a/tests/data/metadata/fence_zvmip.xml ++++ b/tests/data/metadata/fence_zvmip.xml +@@ -41,8 +41,11 @@ + + + +- ++ ++ + ++ + ++ + + diff --git a/SOURCES/bz1148762-1-fence_wti_eol.patch b/SOURCES/bz1148762-1-fence_wti_eol.patch new file mode 100644 index 0000000..a9362f6 --- /dev/null +++ b/SOURCES/bz1148762-1-fence_wti_eol.patch @@ -0,0 +1,83 @@ +From d3d73eaa39dd49cc7fbc93b267daa7f51b1c5fff Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Thu, 2 Oct 2014 16:20:59 +0200 +Subject: [PATCH 2/2] fence_wti: Fix invalid "eol" + +Fence agent for WTI does not use standard telnet login because it is possible that username/password are not +required. EOL is set by fence_login() function that is not used, so we set it manually and replace +obsolete combination of send (+eol) to correct send_eol() + +Resolves: rhbz#1148762 +--- + fence/agents/wti/fence_wti.py | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py +index 78cd4e1..86f9a4d 100644 +--- a/fence/agents/wti/fence_wti.py ++++ b/fence/agents/wti/fence_wti.py +@@ -27,7 +27,7 @@ BUILD_DATE="March, 2008" + def get_listing(conn, options, listing_command): + listing = "" + +- conn.send(listing_command + "\r\n") ++ conn.send_eol(listing_command) + + if isinstance(options["--command-prompt"], list): + re_all = list(options["--command-prompt"]) +@@ -39,7 +39,7 @@ def get_listing(conn, options, listing_command): + result = conn.log_expect(options, re_all, int(options["--shell-timeout"])) + listing = conn.before + if result == (len(re_all) - 1): +- conn.send("\r\n") ++ conn.send_eol("") + conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + listing += conn.before + +@@ -174,7 +174,7 @@ def set_power_status(conn, options): + 'off': "/off" + }[options["--action"]] + +- conn.send(action + " " + options["--plug"] + ",y\r\n") ++ conn.send_eol(action + " " + options["--plug"] + ",y") + conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) + + def main(): +@@ -207,6 +207,8 @@ is running because the connection will block any necessary fencing actions." + if options["--action"] in ["off", "reboot"]: + time.sleep(int(options["--delay"])) + ++ options["eol"] = "\r\n" ++ + conn = fspawn(options, TELNET_PATH) + conn.send("set binary\n") + conn.send("open %s -%s\n"%(options["--ip"], options["--ipport"])) +@@ -217,14 +219,14 @@ is running because the connection will block any necessary fencing actions." + result = conn.log_expect(options, [re_login, "Password: ", re_prompt], int(options["--shell-timeout"])) + if result == 0: + if options.has_key("--username"): +- conn.send(options["--username"]+"\r\n") ++ conn.send_eol(options["--username"]) + result = conn.log_expect(options, [re_login, "Password: ", re_prompt], int(options["--shell-timeout"])) + else: + fail_usage("Failed: You have to set login name") + + if result == 1: + if options.has_key("--password"): +- conn.send(options["--password"]+"\r\n") ++ conn.send_eol(options["--password"]) + conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + else: + fail_usage("Failed: You have to enter password or password script") +@@ -236,7 +238,7 @@ is running because the connection will block any necessary fencing actions." + conn = fence_login(options) + + result = fence_action(conn, options, set_power_status, get_power_status, get_power_status) +- fence_logout(conn, "/X\r\n") ++ fence_logout(conn, "/X") + sys.exit(result) + + if __name__ == "__main__": +-- +1.9.3 + diff --git a/SOURCES/bz1153059-1-fence_vmware_soap-fail_usage.patch b/SOURCES/bz1153059-1-fence_vmware_soap-fail_usage.patch new file mode 100644 index 0000000..37c5833 --- /dev/null +++ b/SOURCES/bz1153059-1-fence_vmware_soap-fail_usage.patch @@ -0,0 +1,60 @@ +commit a4cbf5ba86d196b236cc58ad2dee2f3317e1ee10 +Author: Marek 'marx' Grac +Date: Mon Sep 8 15:02:53 2014 +0200 + + [clenaup] Fix whitespace convention issues + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 557358a..640f81a 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -719,7 +719,6 @@ def check_input(device_opt, opt): + logging.getLogger().addHandler(SyslogLibHandler()) + ## add loggint to stderr + logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stderr)) +- + + acceptable_actions = ["on", "off", "status", "list", "monitor"] + if 1 == device_opt.count("fabric_fencing"): +@@ -1159,9 +1158,8 @@ def fence_logout(conn, logout_string, sleep=0): + def array_to_dict(ar): + return dict([[x[0].split(".")[-1], x[1]] for x in ar]) + +- + ## Own logger handler that uses old-style syslog handler as otherwise everything is sourced +-## from /dev/syslog ++## from /dev/syslog + class SyslogLibHandler(logging.StreamHandler): + """ + A handler class that correctly push messages into syslog +diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py +index 2cea105..e47f11e 100644 +--- a/fence/agents/vmware_soap/fence_vmware_soap.py ++++ b/fence/agents/vmware_soap/fence_vmware_soap.py +@@ -11,7 +11,7 @@ from suds.sudsobject import Property + from suds.transport.http import HttpAuthenticated + from suds.transport import Reply, TransportError + from fencing import * +-from fencing import fail, EC_STATUS, EC_LOGIN_DENIED, EC_INVALID_PRIVILEGES, EC_WAITING_ON, EC_WAITING_OFF ++from fencing import fail, fail_usage, EC_STATUS, EC_LOGIN_DENIED, EC_INVALID_PRIVILEGES, EC_WAITING_ON, EC_WAITING_OFF + from fencing import run_delay + + #BEGIN_VERSION_GENERATION +@@ -33,7 +33,7 @@ class RequestsTransport(HttpAuthenticated): + + def send(self, request): + self.addcredentials(request) +- resp = self.session.post(request.url, data = request.message, headers = request.headers, cert = self.cert, verify = self.verify) ++ resp = self.session.post(request.url, data=request.message, headers=request.headers, cert=self.cert, verify=self.verify) + result = Reply(resp.status_code, resp.headers, resp.content) + return result + +@@ -58,7 +58,7 @@ def soap_login(options): + + try: + headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : ""} +- conn = Client(url + "/vimService.wsdl", location = url, transport = RequestsTransport(verify = verify), headers = headers) ++ conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers) + + mo_ServiceInstance = Property('ServiceInstance') + mo_ServiceInstance._type = 'ServiceInstance' diff --git a/SOURCES/bz1162092-1-fix_ssl_secure.patch b/SOURCES/bz1162092-1-fix_ssl_secure.patch new file mode 100644 index 0000000..88b5246 --- /dev/null +++ b/SOURCES/bz1162092-1-fix_ssl_secure.patch @@ -0,0 +1,24 @@ +commit 83add70a8ef7690661d4d6d54500d85cc10d00ba +Author: Marek 'marx' Grac +Date: Mon Nov 10 10:58:54 2014 +0100 + + fencing: Fix problem with not validating SSL certificates + + In commit 809b909651118c06d2ab48d7911bbee2e512e478, --ssl-(in)secure options were + added. With --ssl be equal to --ssl-secure this was not implemented properly. + + Resolves: rhbz#1162092 + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 23270a7..29c0e47 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -996,7 +996,7 @@ def fence_login(options, re_login_string=r"(login\s*: )|(Login Name: )|(usernam + if options.has_key("--ssl-insecure"): + ssl_opts = "--insecure" + +- command = '%s %s %s --insecure --crlf -p %s %s' % \ ++ command = '%s %s %s --crlf -p %s %s' % \ + (SSL_PATH, gnutls_opts, ssl_opts, options["--ipport"], options["--ip"]) + try: + conn = fspawn(options, command) diff --git a/SOURCES/bz1173178-1-rewrite_fence_zvmip.patch b/SOURCES/bz1173178-1-rewrite_fence_zvmip.patch new file mode 100644 index 0000000..ed38944 --- /dev/null +++ b/SOURCES/bz1173178-1-rewrite_fence_zvmip.patch @@ -0,0 +1,358 @@ +From f5401fc8dad9a39da0a279b7d55149dc0ebcba26 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 5 Jan 2015 10:15:36 +0100 +Subject: [PATCH] fence_zvmip: Port fence agent to fencing library + +This rewrite adds a correct result codes, support for 'list' action and +autogenerated manual page. The original code is still part of codebase as +new agent requires additional testing. +--- + fence/agents/lib/fencing.py.py | 4 + + fence/agents/zvm/Makefile.am | 26 ++---- + fence/agents/zvm/fence_zvmip.8 | 92 ------------------- + fence/agents/zvm/fence_zvmip.py | 172 ++++++++++++++++++++++++++++++++++++ + 5 files changed, 310 insertions(+), 149 deletions(-) + delete mode 100644 fence/agents/zvm/fence_zvmip.8 + create mode 100644 fence/agents/zvm/fence_zvmip.py + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index a8ea448..83bbfcd 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -7,6 +7,7 @@ import subprocess + import threading + import shlex + import exceptions ++import socket + import __main__ + + ## do not add code here. +@@ -805,6 +806,9 @@ def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_lis + except pycurl.error, ex: + logging.error("%s\n", str(ex)) + fail(EC_TIMED_OUT) ++ except socket.timeout, ex: ++ logging.error("%s\n", str(ex)) ++ fail(EC_TIMED_OUT) + + return result + +diff --git a/fence/agents/zvm/Makefile.am b/fence/agents/zvm/Makefile.am +index 62eb862..a29754d 100644 +--- a/fence/agents/zvm/Makefile.am ++++ b/fence/agents/zvm/Makefile.am +@@ -2,26 +2,16 @@ MAINTAINERCLEANFILES = Makefile.in + + TARGET = fence_zvmip + +-sbin_PROGRAMS = fence_zvm fence_zvmip ++SRC = $(TARGET).py + +-noinst_HEADERS = fence_zvm.h ++EXTRA_DIST = $(SRC) + +-fence_zvm_SOURCES = fence_zvm.c +-fence_zvm_CFLAGS = -D_GNU_SOURCE ++sbin_SCRIPTS = $(TARGET) + +-fence_zvmip_SOURCES = fence_zvmip.c +-fence_zvmip_CFLAGS = -D_GNU_SOURCE ++man_MANS = $(TARGET).8 + +-dist_man_MANS = fence_zvm.8 fence_zvmip.8 ++FENCE_TEST_ARGS = -l test -p test -a test -n 1 + +-#include $(top_srcdir)/make/fencemanc.mk +- +-clean-local: +- rm -f $(sbin_PROGRAMS) +- +-FENCE_TEST_ARGS = -n test -a test -p test -u test +- +-include $(top_srcdir)/make/agentccheck.mk +- +-# we do not test fence_zvm because it can be compiled only on specific architecture +-check: xml-check.fence_zvmip delay-check.fence_zvmip +\ No newline at end of file ++include $(top_srcdir)/make/fencebuild.mk ++include $(top_srcdir)/make/fenceman.mk ++include $(top_srcdir)/make/agentpycheck.mk +diff --git a/fence/agents/zvm/fence_zvmip.8 b/fence/agents/zvm/fence_zvmip.8 +deleted file mode 100644 +index 6b01425..0000000 +--- a/fence/agents/zvm/fence_zvmip.8 ++++ /dev/null +@@ -1,92 +0,0 @@ +-.TH fence_zvmip 8 +- +-.SH NAME +-fence_zvmip - Power Fencing agent for GFS on System z z/VM Clusters using IP interface to SMAPI +- +-.SH SYNOPSIS +-.B +-fence_zvmip +-[\fIOPTION\fR]... +- +-.SH DESCRIPTION +-fence_zvmip is a Power Fencing agent used on a GFS virtual machine in a System z z/VM cluster. +-It uses the TCP/IP SMAPI interface to recycle an active image. +- +-fence_zvmip accepts options on the command line as well as from stdin. +-fence_node sends the options through stdin when it execs the agent. +-fence_zvmip can be run by itself with command line options which is useful +-for testing. +- +-Vendor URL: http://www.sinenomine.net +- +-.SH OPTIONS +-.TP +-\fB-o --action\fP +-Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine +-.TP +-\fB--delay\fP \fIseconds\fP +-Time to delay fencing action in seconds +-.TP +-\fB-n --plug\fP \fItarget\fP +-Name of target virtual machine to fence +-.TP +-\fB-h --help\fP +-Print out a help message describing available options, then exit. +-.TP +-\fB-a --ip\fP \fIsmapi Server\fP +-Host name or IP address of SMAPI server +-.TP +-\fB-u --username\fP \fISMAPI authorized user\fP +-Name of an authorized SMAPI user +-.TP +-\fB-p --password\fP \fISMAPI authorized user's password\fP +-Password of the authorized SMAPI user +-.TP +-\fB-t --timeout\fP \fIRecycle timeout\fP +-Amount of \fIgrace\fP time to give the virtual machine to shutdown cleanly before being +-forcibly terminated. Currently this is ignored. +-.TP +-\fB-h --help\fP +-Display usage information +- +-.SH STDIN PARAMETERS +-.TP +-\fIagent = < param >\fP +-This option is used by fence_node(8) and is ignored by fence_zvmip. +-.TP +-\fIaction = < action >\fP +-Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine +-.TP +-\fIplug = < plug >\fP +-Name of virtual machine to recycle. +-.TP +-\fIipaddr = < server host name or IP address >\fP +-Host name or IP address of SMAPI server +-.TP +-\fIlogin = < SMAPI authorized user >\fP +-Name of an authorized SMAPI user +-.TP +-\fIpasswd = < SMAPI authorized user's password >\fP +-Password of the authorized SMAPI user +-.TP +-\fItimeout = < shutdown timeout >\fP +-Amount of \fIgrace\fP time to give the virtual machine to shutdown cleanly before being +-forcibly terminated. Currently this is ignored. +- +-.SH SEE ALSO +-fence(8), fenced(8), fence_node(8) +- +-.SH NOTES +-To use this agent the z/VM SMAPI service needs to be configured to allow the virtual +-machine running this agent to connect to it and issue the image_recycle operation. +-This involves updating the VSMWORK1 AUTHLIST VMSYS:VSMWORK1. file. The entry should look +-something similar to this: +- +-.nf +-Column 1 Column 66 Column 131 +-| | | +-V V V +-XXXXXXXX ALL IMAGE_OPERATIONS +-.fi +- +-Where XXXXXXX is the name of the virtual machine used in the authuser field of the request. +diff --git a/fence/agents/zvm/fence_zvmip.py b/fence/agents/zvm/fence_zvmip.py +new file mode 100644 +index 0000000..63f7fa7 +--- /dev/null ++++ b/fence/agents/zvm/fence_zvmip.py +@@ -0,0 +1,172 @@ ++#!/usr/bin/python -tt ++ ++import sys ++import atexit ++import socket ++import struct ++import logging ++sys.path.append("@FENCEAGENTSLIBDIR@") ++from fencing import * ++from fencing import fail, fail_usage, run_delay, EC_LOGIN_DENIED, EC_TIMED_OUT ++ ++#BEGIN_VERSION_GENERATION ++RELEASE_VERSION="" ++REDHAT_COPYRIGHT="" ++BUILD_DATE="" ++#END_VERSION_GENERATION ++ ++INT4 = 4 ++ ++def open_socket(options): ++ try: ++ if "--inet6-only" in options: ++ protocol = socket.AF_INET6 ++ elif "--inet4-only" in options: ++ protocol = socket.AF_INET ++ else: ++ protocol = 0 ++ (_, _, _, _, addr) = socket.getaddrinfo( \ ++ options["--ip"], options["--ipport"], protocol, ++ 0, socket.IPPROTO_TCP, socket.AI_PASSIVE ++ )[0] ++ except socket.gaierror: ++ fail(EC_LOGIN_DENIED) ++ ++ conn = socket.socket() ++ conn.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) ++ conn.settimeout(float(options["--shell-timeout"])) ++ try: ++ conn.connect(addr) ++ except socket.error: ++ fail(EC_LOGIN_DENIED) ++ ++ return conn ++ ++def smapi_pack_string(string): ++ return struct.pack("!i%ds" % (len(string)), len(string), string) ++ ++def prepare_smapi_command(options, smapi_function, additional_args): ++ packet_size = 3*INT4 + len(smapi_function) + len(options["--username"]) + len(options["--password"]) ++ for arg in additional_args: ++ packet_size += INT4 + len(arg) ++ ++ command = struct.pack("!i", packet_size) ++ command += smapi_pack_string(smapi_function) ++ command += smapi_pack_string(options["--username"]) ++ command += smapi_pack_string(options["--password"]) ++ for arg in additional_args: ++ command += smapi_pack_string(arg) ++ ++ return command ++ ++def get_power_status(conn, options): ++ del conn ++ ++ # '*' = list all active images ++ (return_code, reason_code, images_active) = \ ++ get_list_of_images(options, "Image_Status_Query", "*") ++ logging.debug("Image_Status_Query results are (%d,%d)", return_code, reason_code) ++ (return_code, reason_code, images_defined) = \ ++ get_list_of_images(options, "Image_Name_Query_DM", options["--username"]) ++ logging.debug("Image_Name_Query_DM results are (%d,%d)", return_code, reason_code) ++ ++ if ["list", "monitor"].count(options["--action"]) == 1: ++ return dict([(i, ("", "on" if i in images_active else "off")) for i in images_defined]) ++ else: ++ status = "error" ++ if options["--plug"].upper() in images_defined: ++ if options["--plug"].upper() in images_active: ++ status = "on" ++ else: ++ status = "off" ++ return status ++ ++def set_power_status(conn, options): ++ conn = open_socket(options) ++ ++ packet = None ++ if options["--action"] == "on": ++ packet = prepare_smapi_command(options, "Image_Activate", [options["--plug"]]) ++ elif options["--action"] == "off": ++ packet = prepare_smapi_command(options, "Image_Deactivate", [options["--plug"], "IMMED"]) ++ conn.send(packet) ++ ++ request_id = struct.unpack("!i", conn.recv(INT4))[0] ++ (output_len, request_id, return_code, reason_code) = struct.unpack("!iiii", conn.recv(INT4 * 4)) ++ logging.debug("Image_(De)Activate results are (%d,%d)", return_code, reason_code) ++ ++ conn.close() ++ return ++ ++def get_list_of_images(options, command, data_as_plug): ++ conn = open_socket(options) ++ ++ packet = prepare_smapi_command(options, command, [data_as_plug]) ++ conn.send(packet) ++ ++ request_id = struct.unpack("!i", conn.recv(INT4))[0] ++ (output_len, request_id, return_code, reason_code) = struct.unpack("!iiii", conn.recv(INT4 * 4)) ++ images = set() ++ ++ if output_len > 3*INT4: ++ array_len = struct.unpack("!i", conn.recv(INT4))[0] ++ data = "" ++ ++ while True: ++ read_data = conn.recv(1024, socket.MSG_WAITALL) ++ data += read_data ++ if array_len == len(data): ++ break ++ elif not read_data: ++ logging.error("Failed: Not enough data read from socket") ++ fail(EC_TIMED_OUT) ++ ++ parsed_len = 0 ++ while parsed_len < array_len: ++ string_len = struct.unpack("!i", data[parsed_len:parsed_len+INT4])[0] ++ parsed_len += INT4 ++ image_name = struct.unpack("!%ds" % (string_len), data[parsed_len:parsed_len+string_len])[0] ++ parsed_len += string_len ++ images.add(image_name) ++ ++ conn.close() ++ return (return_code, reason_code, images) ++ ++def main(): ++ device_opt = ["ipaddr", "login", "passwd", "port", "method"] ++ ++ atexit.register(atexit_handler) ++ ++ all_opt["ipport"]["default"] = "44444" ++ all_opt["shell_timeout"]["default"] = "5.0" ++ options = check_input(device_opt, process_input(device_opt)) ++ ++ if len(options.get("--plug", "")) > 8: ++ fail_usage("Failed: Name of image can not be longer than 8 characters") ++ ++ docs = {} ++ docs["shortdesc"] = "Fence agent for use with z/VM Virtual Machines" ++ docs["longdesc"] = """The fence_zvm agent is intended to be used with with z/VM SMAPI service via TCP/IP ++ ++To use this agent the z/VM SMAPI service needs to be configured to allow the virtual machine running this agent to connect to it and issue ++the image_recycle operation. This involves updating the VSMWORK1 AUTHLIST VMSYS:VSMWORK1. file. The entry should look something similar to ++this: ++ ++Column 1 Column 66 Column 131 ++ ++ | | | ++ V V V ++ ++XXXXXXXX ALL IMAGE_OPERATIONS ++ ++Where XXXXXXX is the name of the virtual machine used in the authuser field of the request. ++""" ++ docs["vendorurl"] = "http://www.ibm.com" ++ show_docs(options, docs) ++ ++ run_delay(options) ++ result = fence_action(None, options, set_power_status, get_power_status, get_power_status) ++ sys.exit(result) ++ ++if __name__ == "__main__": ++ main() +-- +1.9.3 + diff --git a/SOURCES/bz990539-1-replacing_nss_wrapperr.patch b/SOURCES/bz990539-1-replacing_nss_wrapperr.patch deleted file mode 100644 index 43188d8..0000000 --- a/SOURCES/bz990539-1-replacing_nss_wrapperr.patch +++ /dev/null @@ -1,550 +0,0 @@ -From 52ed50a1bd4b4bfe632bd560de27195fcea65802 Mon Sep 17 00:00:00 2001 -From: Marek 'marx' Grac -Date: Mon, 17 Feb 2014 14:20:24 +0100 -Subject: [PATCH] fence_ilo: Replacing nss_wrapper with gnutls-cli - -SSLv2 was disabled in nss package (rhbz#1001841), ilo2 now supports also SSLv3 -and it is possible to use standard tool for communication. ---- - configure.ac | 2 +- - fence/agents/Makefile.am | 1 - - fence/agents/lib/fencing.py.py | 5 +- - fence/agents/nss_wrapper/Makefile.am | 7 - - fence/agents/nss_wrapper/fence_nss_wrapper.c | 484 -------------------------- - make/fencebuild.mk | 1 + - 6 files changed, 4 insertions(+), 496 deletions(-) - delete mode 100644 fence/agents/nss_wrapper/Makefile.am - delete mode 100644 fence/agents/nss_wrapper/fence_nss_wrapper.c - -diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py -index fd21c69..798f855 100644 ---- a/fence/agents/lib/fencing.py.py -+++ b/fence/agents/lib/fencing.py.py -@@ -28,7 +28,7 @@ EC_INVALID_PRIVILEGES = 11 - - TELNET_PATH = "/usr/bin/telnet" - SSH_PATH = "/usr/bin/ssh" --SSL_PATH = "@LIBEXECDIR@/fence_nss_wrapper" -+SSL_PATH = "@GNUTLSCLI_PATH@" - SUDO_PATH = "/usr/bin/sudo" - - all_opt = { -@@ -960,11 +960,10 @@ def fence_login(options, re_login_string = "(login\s*: )|(Login Name: )|(userna - re_pass = re.compile("(password)|(pass phrase)", re.IGNORECASE) - - if options.has_key("--ssl"): -- command = '%s %s %s %s' % (SSL_PATH, force_ipvx, options["--ip"], options["--ipport"]) -+ command = '%s --insecure --crlf -p %s %s' % (SSL_PATH, options["--ipport"], options["--ip"]) - try: - conn = fspawn(options, command) - except pexpect.ExceptionPexpect, ex: -- ## SSL telnet is part of the fencing package - sys.stderr.write(str(ex) + "\n") - syslog.syslog(syslog.LOG_ERR, str(ex)) - sys.exit(EC_GENERIC_ERROR) -diff --git a/fence/agents/nss_wrapper/Makefile.am b/fence/agents/nss_wrapper/Makefile.am -deleted file mode 100644 -index 16273ed..0000000 ---- a/fence/agents/nss_wrapper/Makefile.am -+++ /dev/null -@@ -1,7 +0,0 @@ --MAINTAINERCLEANFILES = Makefile.in -- --libexec_PROGRAMS = fence_nss_wrapper -- --fence_nss_wrapper_CFLAGS = $(nss_CFLAGS) $(nspr_CFLAGS) -- --fence_nss_wrapper_LDFLAGS = $(nss_LIBS) $(nspr_LIBS) -diff --git a/fence/agents/nss_wrapper/fence_nss_wrapper.c b/fence/agents/nss_wrapper/fence_nss_wrapper.c -deleted file mode 100644 -index b960cf0..0000000 ---- a/fence/agents/nss_wrapper/fence_nss_wrapper.c -+++ /dev/null -@@ -1,484 +0,0 @@ --/** @file fence_nss_wrapper.c - Main source code of hobbit like tool with -- support for NSS (SSL) connection. --*/ --#include "clusterautoconfig.h" -- --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --/*---- CONSTANTS -------------*/ -- --/** Default operation = connect and telnet*/ --#define OPERATION_DEFAULT 0 --/** Operation display help*/ --#define OPERATION_HELP 1 -- --/** Default mode of connection. Try first found working address*/ --#define MODE_DEFAULT 3 --/** Use only IPv4*/ --#define MODE_IP4MODE 1 --/** Use only IPv6*/ --#define MODE_IP6MODE 2 --/** Use RAW mode - no change of \r and \n to \r\n*/ --#define MODE_RAW 4 --/** Use non-secure mode (without SSL, only pure socket)*/ --#define MODE_NO_SSL 8 -- --/*------ Functions ---------------*/ -- --/** Return port inserted in string. Fuction tests, if port is integer, and than return -- integer value of string. Otherwise, it will use /etc/services. On fail, it returns -- port -1. -- @param port_s Input port or service name -- @return port number (converted with ntohs) on success, otherwise -1. --*/ --static int return_port(char *port_s) { -- char *end_c; -- int res; -- struct servent *serv; -- -- res=strtol(port_s,&end_c,10); -- -- if (*end_c=='\0') return res; -- -- /*It's not number, so try service name*/ -- serv=getservbyname(port_s,NULL); -- -- if (serv==NULL) return -1; -- -- return ntohs(serv->s_port); --} -- --/** Hook handler for bad certificate (because we have no DB, EVERY certificate is bad). -- Returned value is always SECSuccess = it's ok certificate. -- @param arg NULL value -- @param fd socket cased error -- @return SECSuccess. --*/ --static SECStatus nss_bad_cert_hook(void *arg,PRFileDesc *fd) { -- return SECSuccess; --} -- --/** Display last NSPR/NSS error code and user readable message. --*/ --static void print_nspr_error(void) { -- fprintf(stderr,"Error (%d): %s\n",PR_GetError(),PR_ErrorToString(PR_GetError(),PR_LANGUAGE_I_DEFAULT)); --} -- --/** Initialize NSS. NSS is initialized without DB and with -- domnestic policy. -- @return 1 on success, otherwise 0. --*/ --static int init_nss(void) { -- if ((NSS_NoDB_Init(NULL)!=SECSuccess) || -- (NSS_SetDomesticPolicy()!=SECSuccess)) { -- print_nspr_error(); -- -- return 0; -- } -- -- SSL_ClearSessionCache(); -- -- return 1; --} -- --/** Create socket. If ssl is >0, socket is ssl enabled. -- @param ssl Enable ssl (Client, SSL2+3, no TLS, compatible hello) if PR_TRUE, otherwise no. -- @param ipv6 New socket will be IPv4 if this value is 0, otherwise it will be ipv6 -- @return NULL on error, otherwise socket. --*/ --static PRFileDesc *create_socket(int ssl,int ipv6) { -- PRFileDesc *res_socket; -- -- res_socket=PR_OpenTCPSocket((ipv6?PR_AF_INET6:PR_AF_INET)); -- if (res_socket==NULL) { -- print_nspr_error(); -- -- return NULL; -- } -- -- if (!ssl) return res_socket; -- -- if (!(res_socket=SSL_ImportFD(NULL,res_socket))) { -- print_nspr_error(); -- -- return NULL; -- } -- -- if ((SSL_OptionSet(res_socket,SSL_SECURITY,ssl)!=SECSuccess) || -- (SSL_OptionSet(res_socket,SSL_HANDSHAKE_AS_SERVER,PR_FALSE)!=SECSuccess) || -- (SSL_OptionSet(res_socket,SSL_HANDSHAKE_AS_CLIENT,PR_TRUE)!=SECSuccess) || -- (SSL_OptionSet(res_socket,SSL_ENABLE_SSL2,ssl)!=SECSuccess) || -- (SSL_OptionSet(res_socket,SSL_ENABLE_SSL3,ssl)!=SECSuccess) || -- (SSL_OptionSet(res_socket,SSL_ENABLE_TLS,PR_FALSE)!=SECSuccess) || -- (SSL_OptionSet(res_socket,SSL_V2_COMPATIBLE_HELLO,ssl)!=SECSuccess) || -- (SSL_SetPKCS11PinArg(res_socket,NULL)==-1) || -- (SSL_AuthCertificateHook(res_socket,SSL_AuthCertificate,CERT_GetDefaultCertDB())!=SECSuccess) || -- (SSL_BadCertHook(res_socket,nss_bad_cert_hook,NULL)!=SECSuccess)) { -- print_nspr_error(); -- -- if (PR_Close(res_socket)!=PR_SUCCESS) { -- print_nspr_error(); -- } -- -- return NULL; -- } -- -- return res_socket; --} -- --/** Create socket and connect to it. -- @param hostname Hostname to connect -- @param port Port name/number to connect -- @param mode Connection mode. Bit-array of MODE_NO_SSL, MODE_IP6MODE, MODE_IP4MODE. -- @return NULL on error, otherwise connected socket. --*/ --static PRFileDesc *create_connected_socket(char *hostname,int port,int mode) { -- PRAddrInfo *addr_info; -- void *addr_iter; -- PRNetAddr addr; -- PRFileDesc *localsocket; -- int can_exit,valid_socket; -- PRUint16 af_spec; -- -- localsocket=NULL; -- -- addr_info=NULL; -- -- af_spec=PR_AF_UNSPEC; -- -- if (!(mode&MODE_IP6MODE)) af_spec=PR_AF_INET; -- -- addr_info=PR_GetAddrInfoByName(hostname,af_spec,PR_AI_ADDRCONFIG); -- -- if (addr_info == NULL) { -- print_nspr_error(); -- return NULL; -- } -- -- /*We have socket -> enumerate and try to connect*/ -- addr_iter=NULL; -- can_exit=0; -- valid_socket=0; -- -- while (!can_exit) { -- addr_iter=PR_EnumerateAddrInfo(addr_iter,addr_info,port,&addr); -- -- if (addr_iter==NULL) { -- can_exit=1; -- } else { -- if ((PR_NetAddrFamily(&addr)==PR_AF_INET && (mode&MODE_IP4MODE)) || -- (PR_NetAddrFamily(&addr)==PR_AF_INET6 && (mode&MODE_IP6MODE))) { -- /*Type of address is what user want, try to create socket and make connection*/ -- -- /*Create socket*/ -- localsocket=create_socket(!(mode&MODE_NO_SSL),(PR_NetAddrFamily(&addr)==PR_AF_INET6)); -- -- if (localsocket) { -- /*Try to connect*/ -- if (PR_Connect(localsocket,&addr,PR_INTERVAL_NO_TIMEOUT)==PR_SUCCESS) { -- /*Force handshake*/ -- if ((!(mode&MODE_NO_SSL)) && SSL_ForceHandshake(localsocket)!=SECSuccess) { -- /*Handhake failure -> fail*/ -- print_nspr_error(); -- if (PR_Close(localsocket)!=PR_SUCCESS) { -- print_nspr_error(); -- can_exit=1; -- } -- localsocket=NULL; -- } -- -- /*Socket is connected -> we can return it*/ -- can_exit=1; -- } else { -- /*Try another address*/ -- if (PR_Close(localsocket)!=PR_SUCCESS) { -- print_nspr_error(); -- can_exit=1; -- } -- localsocket=NULL; -- } -- } -- } -- } -- } -- -- if (!localsocket) { -- /*Socket is unvalid -> we don't found any usable address*/ -- fprintf(stderr,"Can't connect to host %s on port %d!\n",hostname,port); -- } -- -- PR_FreeAddrInfo(addr_info); -- -- return localsocket; --} -- --/** Parse arguments from command line. -- @param argc Number of arguments in argv -- @param argv Array of arguments -- @param mode Pointer to int will be filled with OPERATION_DEFAULT or OPERATION_HELP. -- @param mode Pointer to int will be filled with MODE_DEFAULT, MODE_IP4MODE or MODE_IP4MODE. -- @return 1 on success, otherwise 0. --*/ --static int parse_cli(int argc,char *argv[],int *operation,int *mode,char **hostname,char **port) { -- int opt; -- -- *operation=OPERATION_DEFAULT; -- *mode=MODE_DEFAULT; -- *port=NULL; -- *hostname=NULL; -- -- while ((opt=getopt(argc,argv,"h46rz"))!=-1) { -- switch (opt) { -- case 'h': -- *operation=OPERATION_HELP; -- -- return 0; -- break; -- -- case '4': -- (*mode)&=~MODE_IP6MODE; -- (*mode)|=MODE_IP4MODE; -- break; -- -- case '6': -- (*mode)&=~MODE_IP4MODE; -- (*mode)|=MODE_IP6MODE; -- break; -- -- case 'r': -- (*mode)|=MODE_RAW; -- break; -- -- case 'z': -- (*mode)|=MODE_NO_SSL; -- break; -- -- default: -- return 0; -- break; -- } -- } -- -- if (argc-optind<2) { -- fprintf(stderr,"Hostname and port is expected!\n"); -- -- return 0; -- } -- -- *hostname=argv[optind]; -- *port=argv[optind+1]; -- -- return 1; --} -- --/** Show usage of application. -- @param pname Name of program (usually basename of argv[0]) --*/ --static void show_usage(char *pname) { -- printf("usage: %s [options] hostname port\n", pname); -- printf(" -4 Force to use IPv4\n"); -- printf(" -6 Force to use IPv6\n"); -- printf(" -r Use RAW connection (don't convert \\r and \\n characters)\n"); -- printf(" -z Don't use SSL connection (use pure socket)\n"); -- printf(" -h Show this help\n"); --} -- --/** Convert End Of Lines (Unix \n, Macs \r or DOS/Win \r\n) to \r\n. -- @param in_buffer Input buffer -- @param in_size Input buffer size -- @param out_buffer Output buffer (must be prealocated). Should be (2*in_size) (in worst case) -- @param out_size There will be size of out_buffer -- @param in_state Internal state of finite automata. First call should have this 0, other calls -- shouldn't change this value. After end of file, you may add to this value +100 and call this -- again, to make sure of proper end (in_buffer can be in this case everything, including NULL). --*/ --static void convert_eols(char *in_buffer,int in_size,char *out_buffer,int *out_size,int *in_state) { -- int in_pos,out_pos; -- int status; -- char in_char; -- -- out_pos=0; -- status=*in_state; -- -- if (status==100 || status==101) { -- if (status==101) { -- out_buffer[out_pos++]='\r'; -- out_buffer[out_pos++]='\n'; -- } -- } else { -- for (in_pos=0;in_pos0) { -- if (PR_Write(PR_STDOUT,buffer,readed_bytes)!=readed_bytes) { -- print_nspr_error(); -- -- return 0; -- } -- } else { -- /*End of stream -> quit*/ -- can_exit=1; -- } -- } -- -- if (pool[0].out_flags&(PR_POLL_READ|PR_POLL_HUP)) { -- /*We have something in stdin*/ -- if ((readed_bytes=PR_Read(pool[0].fd,buffer,sizeof(buffer)))>0) { -- -- if (!(mode&MODE_RAW)) { -- convert_eols(buffer,readed_bytes,buffer_eol,&bytes_to_write,&eol_state); -- } else -- bytes_to_write=readed_bytes; -- -- if (PR_Write(pool[1].fd,(mode&MODE_RAW?buffer:buffer_eol),bytes_to_write)!=bytes_to_write) { -- print_nspr_error(); -- -- return 0; -- } -- } else { -- /*End of stream -> send EOL (if needed)*/ -- if (!(mode&MODE_RAW)) { -- eol_state+=100; -- convert_eols(NULL,0,buffer_eol,&bytes_to_write,&eol_state); -- if (PR_Write(pool[1].fd,buffer_eol,bytes_to_write)!=bytes_to_write) { -- print_nspr_error(); -- -- return 0; -- } -- } -- } -- } -- -- pool[0].out_flags=pool[1].out_flags=0; -- } /*while (!can_exit)*/ -- -- return 1; --} -- --static void atexit_handler(void) { -- if (PR_Initialized()) -- PR_Cleanup(); -- -- if (fclose(stdout)!=0) { -- fprintf(stderr,"Can't close stdout!\n"); -- -- exit(1); -- } --} -- --/** Entry point of application. -- @param argc Number of arguments on command line -- @param argv Array of strings with arguments from command line -- @return 0 on success, otherwise >0. --*/ --int main(int argc,char *argv[]) { -- int mode,operation; -- char *hostname, *port; -- char *pname; -- int port_n; -- PRFileDesc *fd_socket; -- int res; -- -- pname=basename(argv[0]); -- -- atexit(atexit_handler); -- -- if (!parse_cli(argc,argv,&operation,&mode,&hostname,&port) || operation==OPERATION_HELP) { -- show_usage(pname); -- -- if (operation!=OPERATION_HELP) return 1; -- -- return 0; -- } -- -- if ((port_n=return_port(port))==-1) { -- fprintf(stderr,"Error. Unknown port number/name %s!\n",port); -- -- return 1; -- } -- -- if (!(mode&MODE_NO_SSL)) { -- if (!init_nss()) return 1; -- } -- -- if (!(fd_socket=create_connected_socket(hostname,port_n,mode))) -- return 1; -- -- res=poll_cycle(fd_socket,mode); -- -- if (PR_Close(fd_socket)!=PR_SUCCESS) { -- print_nspr_error(); -- -- return 1; -- } -- -- return (res?0:1); --} --- -1.7.7.6 - diff --git a/SOURCES/bz990539-2-replacing_nss_wrapperr.patch b/SOURCES/bz990539-2-replacing_nss_wrapperr.patch deleted file mode 100644 index 364d2ba..0000000 --- a/SOURCES/bz990539-2-replacing_nss_wrapperr.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -urN fence-agents-4.0.2.orig/configure.ac fence-agents-4.0.2/configure.ac ---- fence-agents-4.0.2.orig/configure.ac 2014-02-17 14:55:59.768097454 +0100 -+++ fence-agents-4.0.2/configure.ac 2014-02-17 14:57:05.567548670 +0100 -@@ -243,6 +243,8 @@ - CPPFLAGS="-I\$(top_builddir)/make -I\$(top_srcdir)/make -I. $ENV_CPPFLAGS" - LDFLAGS="$ENV_LDFLAGS" - -+AC_PATH_PROG([GNUTLSCLI_PATH], [gnutlscli], [/usr/bin/gnutls-cli]) -+ - AC_CONFIG_FILES([Makefile - fence/Makefile - fence/agents/Makefile -@@ -276,7 +278,6 @@ - fence/agents/lpar/Makefile - fence/agents/manual/Makefile - fence/agents/mcdata/Makefile -- fence/agents/nss_wrapper/Makefile - fence/agents/rackswitch/Makefile - fence/agents/ovh/Makefile - fence/agents/rhevm/Makefile -diff -urN fence-agents-4.0.2.orig/fence/agents/Makefile.am fence-agents-4.0.2/fence/agents/Makefile.am ---- fence-agents-4.0.2.orig/fence/agents/Makefile.am 2014-02-17 14:55:59.774097497 +0100 -+++ fence-agents-4.0.2/fence/agents/Makefile.am 2014-02-17 14:58:09.426990207 +0100 -@@ -1,5 +1,4 @@ - MAINTAINERCLEANFILES = Makefile.in - - SUBDIRS = lib \ -- nss_wrapper \ - $(AGENTS_LIST) -diff -urN fence-agents-4.0.2.orig/make/fencebuild.mk fence-agents-4.0.2/make/fencebuild.mk ---- fence-agents-4.0.2.orig/make/fencebuild.mk 2014-02-17 14:55:59.768097454 +0100 -+++ fence-agents-4.0.2/make/fencebuild.mk 2014-02-17 14:59:06.653383134 +0100 -@@ -9,6 +9,7 @@ - -e 's#@''LOGDIR@#${LOGDIR}#g' \ - -e 's#@''SBINDIR@#${sbindir}#g' \ - -e 's#@''LIBEXECDIR@#${libexecdir}#g' \ -+ -e 's#@''GNUTLSCLI_PATH@#${GNUTLSCLI_PATH}#g' \ - > $@ - - if [ 0 -eq `echo "$(SRC)" | grep fence_ &> /dev/null; echo $$?` ]; then \ diff --git a/SOURCES/bz990539-3-remove_nss_nspr_check.patch b/SOURCES/bz990539-3-remove_nss_nspr_check.patch deleted file mode 100644 index 76b39f8..0000000 --- a/SOURCES/bz990539-3-remove_nss_nspr_check.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -urN fence-agents-4.0.2.orig/configure.ac fence-agents-4.0.2/configure.ac ---- fence-agents-4.0.2.orig/configure.ac 2014-02-18 21:26:07.091204997 +0100 -+++ fence-agents-4.0.2/configure.ac 2014-02-18 21:26:18.572286647 +0100 -@@ -83,10 +83,6 @@ - LIBS=$ac_check_lib_save_LIBS - } - --# external libs --PKG_CHECK_MODULES([nss],[nss]) --PKG_CHECK_MODULES([nspr],[nspr]) -- - # Checks for header files. - AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h netdb.h stddef.h sys/socket.h sys/time.h syslog.h]) - diff --git a/SOURCES/bz990539-4-remove_nss_nspr_check.patch b/SOURCES/bz990539-4-remove_nss_nspr_check.patch deleted file mode 100644 index 3bcba86..0000000 --- a/SOURCES/bz990539-4-remove_nss_nspr_check.patch +++ /dev/null @@ -1,426 +0,0 @@ -diff -urN fence-agents-4.0.2.orig/configure fence-agents-4.0.2/configure ---- fence-agents-4.0.2.orig/configure 2014-02-18 21:26:07.087204966 +0100 -+++ fence-agents-4.0.2/configure 2014-02-18 21:32:17.932860775 +0100 -@@ -615,6 +615,7 @@ - ac_subst_vars='am__EXEEXT_FALSE - am__EXEEXT_TRUE - LTLIBOBJS -+GNUTLSCLI_PATH - BUILD_XENAPILIB_FALSE - BUILD_XENAPILIB_TRUE - AGENTS_LIST -@@ -626,13 +627,6 @@ - DEFAULT_CONFIG_FILE - DEFAULT_CONFIG_DIR - LIBOBJS --nspr_LIBS --nspr_CFLAGS --nss_LIBS --nss_CFLAGS --PKG_CONFIG_LIBDIR --PKG_CONFIG_PATH --PKG_CONFIG - CXXCPP - am__fastdepCXX_FALSE - am__fastdepCXX_TRUE -@@ -778,14 +772,7 @@ - CXX - CXXFLAGS - CCC --CXXCPP --PKG_CONFIG --PKG_CONFIG_PATH --PKG_CONFIG_LIBDIR --nss_CFLAGS --nss_LIBS --nspr_CFLAGS --nspr_LIBS' -+CXXCPP' - - - # Initialize some variables set by options. -@@ -1446,15 +1433,6 @@ - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor -- PKG_CONFIG path to pkg-config utility -- PKG_CONFIG_PATH -- directories to add to pkg-config's search path -- PKG_CONFIG_LIBDIR -- path overriding pkg-config's built-in search path -- nss_CFLAGS C compiler flags for nss, overriding pkg-config -- nss_LIBS linker flags for nss, overriding pkg-config -- nspr_CFLAGS C compiler flags for nspr, overriding pkg-config -- nspr_LIBS linker flags for nspr, overriding pkg-config - - Use these variables to override the choices made by `configure' or to help - it to find libraries and programs with nonstandard names/locations. -@@ -16179,309 +16157,6 @@ - LIBS=$ac_check_lib_save_LIBS - } - --# external libs -- -- -- -- -- -- --if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then -- if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. --set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_path_PKG_CONFIG+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- case $PKG_CONFIG in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --PKG_CONFIG=$ac_cv_path_PKG_CONFIG --if test -n "$PKG_CONFIG"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 --$as_echo "$PKG_CONFIG" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --fi --if test -z "$ac_cv_path_PKG_CONFIG"; then -- ac_pt_PKG_CONFIG=$PKG_CONFIG -- # Extract the first word of "pkg-config", so it can be a program name with args. --set dummy pkg-config; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- case $ac_pt_PKG_CONFIG in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG --if test -n "$ac_pt_PKG_CONFIG"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 --$as_echo "$ac_pt_PKG_CONFIG" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- if test "x$ac_pt_PKG_CONFIG" = x; then -- PKG_CONFIG="" -- else -- case $cross_compiling:$ac_tool_warned in --yes:) --{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 --$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} --ac_tool_warned=yes ;; --esac -- PKG_CONFIG=$ac_pt_PKG_CONFIG -- fi --else -- PKG_CONFIG="$ac_cv_path_PKG_CONFIG" --fi -- --fi --if test -n "$PKG_CONFIG"; then -- _pkg_min_version=0.9.0 -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 --$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } -- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- PKG_CONFIG="" -- fi --fi -- --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss" >&5 --$as_echo_n "checking for nss... " >&6; } -- --if test -n "$nss_CFLAGS"; then -- pkg_cv_nss_CFLAGS="$nss_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nss\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "nss") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_nss_CFLAGS=`$PKG_CONFIG --cflags "nss" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$nss_LIBS"; then -- pkg_cv_nss_LIBS="$nss_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nss\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "nss") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_nss_LIBS=`$PKG_CONFIG --libs "nss" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- nss_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nss" 2>&1` -- else -- nss_PKG_ERRORS=`$PKG_CONFIG --print-errors "nss" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$nss_PKG_ERRORS" >&5 -- -- as_fn_error $? "Package requirements (nss) were not met: -- --$nss_PKG_ERRORS -- --Consider adjusting the PKG_CONFIG_PATH environment variable if you --installed software in a non-standard prefix. -- --Alternatively, you may set the environment variables nss_CFLAGS --and nss_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details." "$LINENO" 5 -- --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it --is in your PATH or set the PKG_CONFIG environment variable to the full --path to pkg-config. -- --Alternatively, you may set the environment variables nss_CFLAGS --and nss_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details. -- --To get pkg-config, see . --See \`config.log' for more details" "$LINENO" 5; } -- --else -- nss_CFLAGS=$pkg_cv_nss_CFLAGS -- nss_LIBS=$pkg_cv_nss_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- --fi -- --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nspr" >&5 --$as_echo_n "checking for nspr... " >&6; } -- --if test -n "$nspr_CFLAGS"; then -- pkg_cv_nspr_CFLAGS="$nspr_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nspr\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "nspr") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_nspr_CFLAGS=`$PKG_CONFIG --cflags "nspr" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$nspr_LIBS"; then -- pkg_cv_nspr_LIBS="$nspr_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nspr\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "nspr") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_nspr_LIBS=`$PKG_CONFIG --libs "nspr" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- nspr_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nspr" 2>&1` -- else -- nspr_PKG_ERRORS=`$PKG_CONFIG --print-errors "nspr" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$nspr_PKG_ERRORS" >&5 -- -- as_fn_error $? "Package requirements (nspr) were not met: -- --$nspr_PKG_ERRORS -- --Consider adjusting the PKG_CONFIG_PATH environment variable if you --installed software in a non-standard prefix. -- --Alternatively, you may set the environment variables nspr_CFLAGS --and nspr_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details." "$LINENO" 5 -- --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it --is in your PATH or set the PKG_CONFIG environment variable to the full --path to pkg-config. -- --Alternatively, you may set the environment variables nspr_CFLAGS --and nspr_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details. -- --To get pkg-config, see . --See \`config.log' for more details" "$LINENO" 5; } -- --else -- nspr_CFLAGS=$pkg_cv_nspr_CFLAGS -- nspr_LIBS=$pkg_cv_nspr_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- --fi -- - # Checks for header files. - for ac_header in arpa/inet.h fcntl.h libintl.h limits.h netdb.h stddef.h sys/socket.h sys/time.h syslog.h - do : -@@ -17064,7 +16739,49 @@ - CPPFLAGS="-I\$(top_builddir)/make -I\$(top_srcdir)/make -I. $ENV_CPPFLAGS" - LDFLAGS="$ENV_LDFLAGS" - --ac_config_files="$ac_config_files Makefile fence/Makefile fence/agents/Makefile fence/agents/alom/Makefile fence/agents/apc/Makefile fence/agents/apc_snmp/Makefile fence/agents/baytech/Makefile fence/agents/bladecenter/Makefile fence/agents/brocade/Makefile fence/agents/bullpap/Makefile fence/agents/cisco_mds/Makefile fence/agents/cisco_ucs/Makefile fence/agents/cpint/Makefile fence/agents/drac/Makefile fence/agents/drac5/Makefile fence/agents/dummy/Makefile fence/agents/eaton_snmp/Makefile fence/agents/egenera/Makefile fence/agents/eps/Makefile fence/agents/hpblade/Makefile fence/agents/ibmblade/Makefile fence/agents/ipdu/Makefile fence/agents/ifmib/Makefile fence/agents/ilo/Makefile fence/agents/ilo_mp/Makefile fence/agents/intelmodular/Makefile fence/agents/ipmilan/Makefile fence/agents/kdump/Makefile fence/agents/ldom/Makefile fence/agents/lib/Makefile fence/agents/lpar/Makefile fence/agents/manual/Makefile fence/agents/mcdata/Makefile fence/agents/nss_wrapper/Makefile fence/agents/rackswitch/Makefile fence/agents/ovh/Makefile fence/agents/rhevm/Makefile fence/agents/rsa/Makefile fence/agents/rsb/Makefile fence/agents/sanbox2/Makefile fence/agents/scsi/Makefile fence/agents/virsh/Makefile fence/agents/vixel/Makefile fence/agents/vmware/Makefile fence/agents/vmware_soap/Makefile fence/agents/wti/Makefile fence/agents/xcat/Makefile fence/agents/xenapi/Makefile fence/agents/hds_cb/Makefile fence/agents/zvm/Makefile doc/Makefile" -+# Extract the first word of "gnutlscli", so it can be a program name with args. -+set dummy gnutlscli; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_path_GNUTLSCLI_PATH+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $GNUTLSCLI_PATH in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_GNUTLSCLI_PATH="$GNUTLSCLI_PATH" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_path_GNUTLSCLI_PATH="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+ test -z "$ac_cv_path_GNUTLSCLI_PATH" && ac_cv_path_GNUTLSCLI_PATH="/usr/bin/gnutls-cli" -+ ;; -+esac -+fi -+GNUTLSCLI_PATH=$ac_cv_path_GNUTLSCLI_PATH -+if test -n "$GNUTLSCLI_PATH"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUTLSCLI_PATH" >&5 -+$as_echo "$GNUTLSCLI_PATH" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+ -+ac_config_files="$ac_config_files Makefile fence/Makefile fence/agents/Makefile fence/agents/alom/Makefile fence/agents/apc/Makefile fence/agents/apc_snmp/Makefile fence/agents/baytech/Makefile fence/agents/bladecenter/Makefile fence/agents/brocade/Makefile fence/agents/bullpap/Makefile fence/agents/cisco_mds/Makefile fence/agents/cisco_ucs/Makefile fence/agents/cpint/Makefile fence/agents/drac/Makefile fence/agents/drac5/Makefile fence/agents/dummy/Makefile fence/agents/eaton_snmp/Makefile fence/agents/egenera/Makefile fence/agents/eps/Makefile fence/agents/hpblade/Makefile fence/agents/ibmblade/Makefile fence/agents/ipdu/Makefile fence/agents/ifmib/Makefile fence/agents/ilo/Makefile fence/agents/ilo_mp/Makefile fence/agents/intelmodular/Makefile fence/agents/ipmilan/Makefile fence/agents/kdump/Makefile fence/agents/ldom/Makefile fence/agents/lib/Makefile fence/agents/lpar/Makefile fence/agents/manual/Makefile fence/agents/mcdata/Makefile fence/agents/rackswitch/Makefile fence/agents/ovh/Makefile fence/agents/rhevm/Makefile fence/agents/rsa/Makefile fence/agents/rsb/Makefile fence/agents/sanbox2/Makefile fence/agents/scsi/Makefile fence/agents/virsh/Makefile fence/agents/vixel/Makefile fence/agents/vmware/Makefile fence/agents/vmware_soap/Makefile fence/agents/wti/Makefile fence/agents/xcat/Makefile fence/agents/xenapi/Makefile fence/agents/hds_cb/Makefile fence/agents/zvm/Makefile doc/Makefile" - - - cat >confcache <<\_ACEOF -@@ -18221,7 +17938,6 @@ - "fence/agents/lpar/Makefile") CONFIG_FILES="$CONFIG_FILES fence/agents/lpar/Makefile" ;; - "fence/agents/manual/Makefile") CONFIG_FILES="$CONFIG_FILES fence/agents/manual/Makefile" ;; - "fence/agents/mcdata/Makefile") CONFIG_FILES="$CONFIG_FILES fence/agents/mcdata/Makefile" ;; -- "fence/agents/nss_wrapper/Makefile") CONFIG_FILES="$CONFIG_FILES fence/agents/nss_wrapper/Makefile" ;; - "fence/agents/rackswitch/Makefile") CONFIG_FILES="$CONFIG_FILES fence/agents/rackswitch/Makefile" ;; - "fence/agents/ovh/Makefile") CONFIG_FILES="$CONFIG_FILES fence/agents/ovh/Makefile" ;; - "fence/agents/rhevm/Makefile") CONFIG_FILES="$CONFIG_FILES fence/agents/rhevm/Makefile" ;; diff --git a/SOURCES/bz990539-5-remove_nss_nspr_check.patch b/SOURCES/bz990539-5-remove_nss_nspr_check.patch deleted file mode 100644 index 661a27c..0000000 --- a/SOURCES/bz990539-5-remove_nss_nspr_check.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -urN fence-agents-4.0.2/fence/agents/Makefile.in fence-agents-4.0.2.new/fence/agents/Makefile.in ---- fence-agents-4.0.2/fence/agents/Makefile.in 2013-07-30 12:48:53.000000000 +0200 -+++ fence-agents-4.0.2.new/fence/agents/Makefile.in 2014-02-18 21:47:59.622684528 +0100 -@@ -145,6 +145,7 @@ - EXEEXT = @EXEEXT@ - FENCEAGENTSLIBDIR = @FENCEAGENTSLIBDIR@ - FGREP = @FGREP@ -+GNUTLSCLI_PATH = @GNUTLSCLI_PATH@ - GREP = @GREP@ - INSTALL = @INSTALL@ - INSTALL_DATA = @INSTALL_DATA@ -@@ -177,9 +178,6 @@ - PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ --PKG_CONFIG = @PKG_CONFIG@ --PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ --PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ - RANLIB = @RANLIB@ - SED = @SED@ - SET_MAKE = @SET_MAKE@ -@@ -227,10 +225,6 @@ - localstatedir = @localstatedir@ - mandir = @mandir@ - mkdir_p = @mkdir_p@ --nspr_CFLAGS = @nspr_CFLAGS@ --nspr_LIBS = @nspr_LIBS@ --nss_CFLAGS = @nss_CFLAGS@ --nss_LIBS = @nss_LIBS@ - oldincludedir = @oldincludedir@ - pdfdir = @pdfdir@ - prefix = @prefix@ -@@ -246,7 +240,6 @@ - top_srcdir = @top_srcdir@ - MAINTAINERCLEANFILES = Makefile.in - SUBDIRS = lib \ -- nss_wrapper \ - $(AGENTS_LIST) - - all: all-recursive -@@ -261,9 +254,9 @@ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu fence/agents/Makefile'; \ -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fence/agents/Makefile'; \ - $(am__cd) $(top_srcdir) && \ -- $(AUTOMAKE) --gnu fence/agents/Makefile -+ $(AUTOMAKE) --foreign fence/agents/Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ diff --git a/SOURCES/bz990539-6-remove_nss_nspr_check.patch b/SOURCES/bz990539-6-remove_nss_nspr_check.patch deleted file mode 100644 index 00c347a..0000000 --- a/SOURCES/bz990539-6-remove_nss_nspr_check.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN fence-agents-4.0.2.orig/fence/agents/lib/fencing.py.py fence-agents-4.0.2/fence/agents/lib/fencing.py.py ---- fence-agents-4.0.2.orig/fence/agents/lib/fencing.py.py 2014-02-19 18:09:44.000000000 +0100 -+++ fence-agents-4.0.2/fence/agents/lib/fencing.py.py 2014-02-19 18:11:04.530890059 +0100 -@@ -28,7 +28,7 @@ - - TELNET_PATH = "/usr/bin/telnet" - SSH_PATH = "/usr/bin/ssh" --SSL_PATH = "@GNUTLSCLI_PATH@" -+SSL_PATH = "/usr/bin/gnutls-cli" - SUDO_PATH = "/usr/bin/sudo" - - all_opt = { diff --git a/SOURCES/bz990539-7-allow_notls_negotiation_with_old_devices.patch b/SOURCES/bz990539-7-allow_notls_negotiation_with_old_devices.patch deleted file mode 100644 index ef004f1..0000000 --- a/SOURCES/bz990539-7-allow_notls_negotiation_with_old_devices.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff -Naurd fence-agents-4.0.2.orig/fence/agents/cisco_ucs/fence_cisco_ucs.py fence-agents-4.0.2/fence/agents/cisco_ucs/fence_cisco_ucs.py ---- fence-agents-4.0.2.orig/fence/agents/cisco_ucs/fence_cisco_ucs.py 2013-07-30 12:46:11.000000000 +0200 -+++ fence-agents-4.0.2/fence/agents/cisco_ucs/fence_cisco_ucs.py 2014-02-20 11:53:07.576955152 +0100 -@@ -107,7 +107,7 @@ - "order" : 1 } - - def main(): -- device_opt = [ "ipaddr", "login", "passwd", "ssl", "port", "web", "suborg" ] -+ device_opt = [ "ipaddr", "login", "passwd", "ssl", "notls", "port", "web", "suborg" ] - - atexit.register(atexit_handler) - -diff -Naurd fence-agents-4.0.2.orig/fence/agents/ilo/fence_ilo.py fence-agents-4.0.2/fence/agents/ilo/fence_ilo.py ---- fence-agents-4.0.2.orig/fence/agents/ilo/fence_ilo.py 2014-02-20 11:52:28.948883919 +0100 -+++ fence-agents-4.0.2/fence/agents/ilo/fence_ilo.py 2014-02-20 11:53:07.655955297 +0100 -@@ -63,7 +63,7 @@ - "order" : 1 } - - def main(): -- device_opt = [ "ipaddr", "login", "passwd", "ssl", "ribcl" ] -+ device_opt = [ "ipaddr", "login", "passwd", "ssl", "notls", "ribcl" ] - - atexit.register(atexit_handler) - -diff -Naurd fence-agents-4.0.2.orig/fence/agents/lib/fencing.py.py fence-agents-4.0.2/fence/agents/lib/fencing.py.py ---- fence-agents-4.0.2.orig/fence/agents/lib/fencing.py.py 2014-02-20 11:52:29.345884646 +0100 -+++ fence-agents-4.0.2/fence/agents/lib/fencing.py.py 2014-02-20 11:53:07.655955297 +0100 -@@ -177,6 +177,14 @@ - "required" : "0", - "shortdesc" : "SSL connection", - "order" : 1 }, -+ "notls" : { -+ "getopt" : "t", -+ "longopt" : "notls", -+ "help" : "-t, --notls Disable TLS negotiation and force SSL3.0.\n" + -+ " This should only be used for devices that do not support TLS1.0 and up.", -+ "required" : "0", -+ "shortdesc" : "Disable TLS negotiation", -+ "order" : 1 }, - "port" : { - "getopt" : "n:", - "longopt" : "plug", -@@ -927,7 +935,11 @@ - re_pass = re.compile("(password)|(pass phrase)", re.IGNORECASE) - - if options.has_key("--ssl"): -- command = '%s --insecure --crlf -p %s %s' % (SSL_PATH, options["--ipport"], options["--ip"]) -+ gnutls_opts="" -+ if options.has_key("--notls"): -+ gnutls_opts = "--priority \"NORMAL:-VERS-TLS1.2:-VERS-TLS1.1:-VERS-TLS1.0:+VERS-SSL3.0\"" -+ -+ command = '%s %s --insecure --crlf -p %s %s' % (SSL_PATH, gnutls_opts, options["--ipport"], options["--ip"]) - try: - conn = fspawn(options, command) - except pexpect.ExceptionPexpect, ex: -diff -Naurd fence-agents-4.0.2.orig/fence/agents/rhevm/fence_rhevm.py fence-agents-4.0.2/fence/agents/rhevm/fence_rhevm.py ---- fence-agents-4.0.2.orig/fence/agents/rhevm/fence_rhevm.py 2013-07-30 12:46:12.000000000 +0200 -+++ fence-agents-4.0.2/fence/agents/rhevm/fence_rhevm.py 2014-02-20 11:53:07.655955297 +0100 -@@ -101,7 +101,7 @@ - return result - - def main(): -- device_opt = [ "ipaddr", "login", "passwd", "ssl", "web", "port" ] -+ device_opt = [ "ipaddr", "login", "passwd", "ssl", "notls", "web", "port" ] - - atexit.register(atexit_handler) - -diff -Naurd fence-agents-4.0.2.orig/fence/agents/vmware_soap/fence_vmware_soap.py fence-agents-4.0.2/fence/agents/vmware_soap/fence_vmware_soap.py ---- fence-agents-4.0.2.orig/fence/agents/vmware_soap/fence_vmware_soap.py 2014-02-20 11:52:29.000884014 +0100 -+++ fence-agents-4.0.2/fence/agents/vmware_soap/fence_vmware_soap.py 2014-02-20 11:53:07.656955299 +0100 -@@ -177,7 +177,7 @@ - shutil.rmtree(tmp_dir) - - def main(): -- device_opt = [ "ipaddr", "login", "passwd", "web", "ssl", "port" ] -+ device_opt = [ "ipaddr", "login", "passwd", "web", "ssl", "notls", "port" ] - - atexit.register(atexit_handler) - diff --git a/SOURCES/bz994466-1-fence_scsi-automatic_key_generation.patch b/SOURCES/bz994466-1-fence_scsi-automatic_key_generation.patch deleted file mode 100644 index c855179..0000000 --- a/SOURCES/bz994466-1-fence_scsi-automatic_key_generation.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 116512c174f4acef0faee4459158c45ddf6922d2 Mon Sep 17 00:00:00 2001 -From: Marek 'marx' Grac -Date: Wed, 22 Jan 2014 15:35:20 +0100 -Subject: [PATCH 2/3] fence_scsi: Replace automatic key generation to work - with corosync clusters instead of cman - -Resolves: rhbz#994466 ---- - fence/agents/scsi/fence_scsi.pl | 38 ++++++++++++++++++++++---------------- - 1 files changed, 22 insertions(+), 16 deletions(-) - -diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl -index c959417..3ad0f09 100644 ---- a/fence/agents/scsi/fence_scsi.pl -+++ b/fence/agents/scsi/fence_scsi.pl -@@ -5,6 +5,7 @@ use File::Basename; - use File::Path; - use Getopt::Std; - use POSIX; -+use B; - - #BEGIN_VERSION_GENERATION - $RELEASE_VERSION=""; -@@ -426,10 +427,10 @@ sub get_key ($) - sub get_node_id ($) - { - my $self = (caller(0))[3]; -- my $node_id; -+ my $node = $_[0]; - -- my $cmd = "cman_tool nodes -n $_[0] -F id"; -- my $out = qx { $cmd 2> /dev/null }; -+ my $cmd = "/sbin/corosync-cmapctl nodelist."; -+ my @out = qx { $cmd 2> /dev/null }; - my $err = ($?>>8); - - if ($err != 0) { -@@ -438,11 +439,14 @@ sub get_node_id ($) - - # die "[error]: $self\n" if ($?>>8); - -- chomp ($out); -- -- $node_id = $out; -- -- return ($node_id); -+ foreach my $line (@out) { -+ chomp($line); -+ if ($line =~ /.(\d+?).ring._addr \(str\) = ${node}$/) { -+ return $1; -+ } -+ } -+ -+ log_error("$self (unable to parse output of corosync-cmapctl or node does not exist)"); - } - - sub get_cluster_id () -@@ -450,8 +454,8 @@ sub get_cluster_id () - my $self = (caller(0))[3]; - my $cluster_id; - -- my $cmd = "cman_tool status"; -- my @out = qx { $cmd 2> /dev/null }; -+ my $cmd = "/sbin/corosync-cmapctl totem.cluster_name"; -+ my $out = qx { $cmd 2> /dev/null }; - my $err = ($?>>8); - - if ($err != 0) { -@@ -460,12 +464,14 @@ sub get_cluster_id () - - # die "[error]: $self\n" if ($?>>8); - -- foreach (@out) { -- chomp; -- my ($param, $value) = split (/\s*:\s*/, $_); -- if ($param =~ /^cluster\s+id/i) { -- $cluster_id = $value; -- } -+ chomp($out); -+ -+ if ($out =~ /=\s(.*?)$/) { -+ my $cluster_name = $1; -+ # tranform string to a number -+ $cluster_id = (hex B::hash($cluster_name)) % 65536; -+ } else { -+ log_error("$self (unable to parse output of corosync-cmapctl)"); - } - - return ($cluster_id); --- -1.7.7.6 - diff --git a/SOURCES/bz994466-2-fence_scsi-automatic_key_generation.patch b/SOURCES/bz994466-2-fence_scsi-automatic_key_generation.patch deleted file mode 100644 index cd2e139..0000000 --- a/SOURCES/bz994466-2-fence_scsi-automatic_key_generation.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cc04df682a343c6627c250cffc0f4d60383a7baa Mon Sep 17 00:00:00 2001 -From: Marek 'marx' Grac -Date: Thu, 23 Jan 2014 17:32:25 +0100 -Subject: [PATCH 3/3] fence_scsi: Change path to corosync from /sbin to - /usr/sbin - -/sbin is just a symlink to /usr/bin - so it does not impact functionality ---- - fence/agents/scsi/fence_scsi.pl | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl -index 3ad0f09..6808ff5 100644 ---- a/fence/agents/scsi/fence_scsi.pl -+++ b/fence/agents/scsi/fence_scsi.pl -@@ -429,7 +429,7 @@ sub get_node_id ($) - my $self = (caller(0))[3]; - my $node = $_[0]; - -- my $cmd = "/sbin/corosync-cmapctl nodelist."; -+ my $cmd = "/usr/sbin/corosync-cmapctl nodelist."; - my @out = qx { $cmd 2> /dev/null }; - my $err = ($?>>8); - -@@ -454,7 +454,7 @@ sub get_cluster_id () - my $self = (caller(0))[3]; - my $cluster_id; - -- my $cmd = "/sbin/corosync-cmapctl totem.cluster_name"; -+ my $cmd = "/usr/sbin/corosync-cmapctl totem.cluster_name"; - my $out = qx { $cmd 2> /dev/null }; - my $err = ($?>>8); - --- -1.7.7.6 - diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index f0a4b9e..fab72e9 100644 --- a/SPECS/fence-agents.spec +++ b/SPECS/fence-agents.spec @@ -15,60 +15,39 @@ Name: fence-agents Summary: Fence Agents for Red Hat Cluster -Version: 4.0.2 -Release: 21%{?alphatag:.%{alphatag}}%{?dist} +Version: 4.0.11 +Release: 10%{?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 -Patch17: bz1021392-fencing_default_action_off.patch -Patch18: bz994466-1-fence_scsi-automatic_key_generation.patch -Patch19: bz994466-2-fence_scsi-automatic_key_generation.patch -Patch20: bz1022529-ensure_validity_of_xml_metadata-3.patch -Patch21: bz1022536-2-fence_wti-named_groups.patch -Patch22: bz1057299-fence_vmware_soap-add_delay.patch -Patch23: bz1048843-fencing-do_not_use_public_keys.patch -Patch24: bz990539-1-replacing_nss_wrapperr.patch -Patch25: bz990539-2-replacing_nss_wrapperr.patch -Patch26: bz1018780-fence_vmware_soap-Unknown-exception.patch -Patch27: bz990539-3-remove_nss_nspr_check.patch -Patch28: bz990539-4-remove_nss_nspr_check.patch -Patch29: bz990539-5-remove_nss_nspr_check.patch -Patch30: bz990539-6-remove_nss_nspr_check.patch -Patch31: bz990539-7-allow_notls_negotiation_with_old_devices.patch -Patch32: bz1018780-fence_vmware_soap_suppress_suds_message.patch -Patch33: bz1018780-fence_vmware_soap_fix_option_parsing_from_stdin.patch -Patch34: bz1072564-feature_ssl-secure.patch -Patch35: bz1072564-2-feature_ssl-secure.patch -Patch36: bz1073947-ssh_login_failed.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 +Patch0: bz1072564-1-add_ssl_secure_and_ssl_insecure.patch +Patch1: bz1072564-2-add_ssl_secure_and_ssl_insecure.patch +Patch2: backward-rename_fence_scsi_check_to_pl.patch +Patch3: bz1121122-1-fence_ilo_ssh.patch +Patch4: bz1140921-1-fence_zvm.patch +Patch5: bz1111597-1-fence_rsb.patch +Patch6: bz1148762-1-fence_wti_eol.patch +Patch7: bz1153059-1-fence_vmware_soap-fail_usage.patch +Patch8: bz1111599-1-fence_cisco_and_soap_logout.patch +Patch9: bz1162092-1-fix_ssl_secure.patch +Patch10: bz1140921-2-fence_zvm.patch +Patch11: bz1140921-3-fence_zvm.patch +Patch12: bz1121122-2-broken_syslog.patch +Patch13: bz1121122-3-eol_changed.patch +Patch14: bz1121122-3.5-delay_test.patch +Patch15: bz1121122-4-symlink_ilo34_ssh.patch +Patch16: bz1121122-5-symlink_ilo34_ssh.patch +Patch17: bz1173178-1-rewrite_fence_zvmip.patch %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 supportedagents apc apc_snmp bladecenter brocade cisco_mds cisco_ucs drac5 eaton_snmp eps hpblade ibmblade ifmib ilo ilo_mp ilo_ssh intelmodular ipdu ipmilan kdump rhevm rsb scsi vmware_soap wti +%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-ilo-ssh 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 +%ifarch s390x +%global testagents virsh zvm +%else %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 %endif ## Setup/build bits @@ -76,57 +55,36 @@ Patch36: bz1073947-ssh_login_failed.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # Build dependencies -BuildRequires: perl BuildRequires: glibc-devel BuildRequires: gnutls-utils BuildRequires: libxslt BuildRequires: python pexpect python-pycurl python-suds python-requests -BuildRequires: perl(Net::Telnet) net-snmp-utils -%if 0%{?fedora} -BuildRequires: perl(Pod::MinimumVersion) -%endif +BuildRequires: net-snmp-utils +BuildRequires: autoconf automake libtool %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-1 -%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 -%patch17 -p1 -b .bz1021392 -%patch18 -p1 -b .bz994466-1 -%patch19 -p1 -b .bz994466-2 -%patch20 -p1 -b .bz1022529-3 -%patch21 -p1 -b .bz1022536-2 -%patch22 -p1 -b .bz1057299 -%patch23 -p1 -b .bz1048843 -%patch24 -p1 -b .bz990539-1 -%patch25 -p1 -b .bz990539-2 -%patch26 -p1 -b .bz1018780-2 -%patch27 -p1 -b .bz990539-3 -%patch28 -p1 -b .bz990539-4 -%patch29 -p1 -b .bz990539-5 -%patch30 -p1 -b .bz990539-6 -%patch31 -p1 -b .bz990539-7 -%patch32 -p1 -b .bz1018780-3 -%patch33 -p1 -b .bz1018780-4 -%patch34 -p1 -b .bz1072564-1 -%patch35 -p1 -b .bz1072564-2 -%patch36 -p1 -b .bz1073947-1 +%patch0 -p1 -b .bz1072564-1 +%patch1 -p1 -b .bz1072564-2 +%patch2 -p1 -b .backward-fence_scsi_check_rename +%patch3 -p1 -b .bz1121122-1 +%patch4 -p1 -b .bz1140921-1 +%patch5 -p1 -b .bz1111597-1 +%patch6 -p1 -b .bz1148762-1 +%patch7 -p1 -b .bz1153059-1 +%patch8 -p1 -b .bz1111599-1 +%patch9 -p1 -b .bz1162092-1 +%patch10 -p1 -b .bz1140921-2 +%patch11 -p1 -b .bz1140921-3 +%patch12 -p1 -b .bz1121122-2 +%patch13 -p1 -b .bz1121122-3 +%patch14 -p1 -b .bz1121122-3.5 +%patch15 -p1 -b .bz1121122-4 +%patch16 -p1 -b .bz1121122-5 +%patch17 -p1 -b .bz1173178-1 %build +./autogen.sh %{configure} --with-agents='%{supportedagents} %{testagents}' CFLAGS="$(echo '%{optflags}')" make %{_smp_mflags} @@ -389,6 +347,24 @@ The fence-agents-ilo-mp package contains a fence agent for HP iLO MP devices tha %{_sbindir}/fence_ilo_mp %{_mandir}/man8/fence_ilo_mp.8* +%package ilo-ssh +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for HP iLO devices via SSH +Requires: fence-agents-common >= %{version}-%{release} +Requires: telnet openssh-clients +Obsoletes: fence-agents +%description ilo-ssh +The fence-agents-ilo-ssh package contains a fence agent for HP iLO devices that are accessed via SSH. +%files ilo-ssh +%defattr(-,root,root,-) +%{_sbindir}/fence_ilo_ssh +%{_mandir}/man8/fence_ilo_ssh.8* +%{_sbindir}/fence_ilo3_ssh +%{_mandir}/man8/fence_ilo3_ssh.8* +%{_sbindir}/fence_ilo4_ssh +%{_mandir}/man8/fence_ilo4_ssh.8* + %package intelmodular License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -549,7 +525,7 @@ The fence-agents-sanbox2 package contains a fence agent for QLogic SANBox2 switc License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for SCSI persisent reservations -Requires: perl sg3_utils +Requires: sg3_utils fence-agents-common >= %{version}-%{release} Obsoletes: fence-agents %description scsi The fence-agents-scsi package contains fence agent for SCSI persisent reservations @@ -601,7 +577,67 @@ The fence-agents-wti package contains a fence agent for WTI network power switch %{_sbindir}/fence_wti %{_mandir}/man8/fence_wti.8* +%ifarch s390x +%package zvm +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for z/VM hypervisors +Requires: fence-agents-common >= %{version}-%{release} +Requires: telnet openssh-clients +Obsoletes: fence-agents +%description zvm +The fence-agents-zvm package contains a fence agent for z/VM hypervisors +%files zvm +%defattr(-,root,root,-) +%{_sbindir}/fence_zvmip +%{_mandir}/man8/fence_zvmip.8* +%endif + %changelog +* Mon Jan 05 2015 Marek Grac - 4.0.11-10 +- fence_zvmip: Add fence_zvmip ported to fencing library + Resolves: rhbz#1173178 + +* Mon Dec 01 2014 Marek Grac - 4.0.11-9 +- fence_ilo_ssh: Fix EOL issue, syslog problem and add fence_ilo_[34]_ssh symlink + Resolves: rhbz#1121122 + +* Wed Nov 12 2014 Marek Grac - 4.0.11-8 +- fence_zvm: Add 'monitor' support for fence_zvmip + Resolves: rhbz#1140921 + +* Mon Nov 10 2014 Marek Grac - 4.0.11-7 +- HTTPS connection do not validate certificate (introduced with rebase) + Resolves: rhbz#1162092 + +* Thu Oct 16 2014 Marek Grac - 4.0.11-6 +- fence_cisco_ucs and fence_vmware_soap should logout even in case of failure + Resolves: rhbz#1111599 +- fence_vmware_soap: Fix issue with import of fail_usage + Resolves: rhbz#1153059 + +* Thu Oct 02 2014 Marek Grac - 4.0.11-5 +- fence_wti: Fix problem with EOL introduced by rebase + Resolves: rhbz#1148762 +- fence_rsb: Fix issue with new firmware + Resolves: rhbz#1111597 + +* Sat Sep 20 2014 Fabio M. Di Nitto - 4.0.11-4 +- add initial support for IBM z/VM + Resolves: rhbz#1140921 + +* Mon Sep 15 2014 Marek Grac - 4.0.11-3 +- temporary removes fence-agents-amt because amtterm is missing + +* Wed Sep 03 2014 Marek Grac - 4.0.11-2 +- add a fence agents for AMT and iLO-ssh + Resolves: rhbz#1121122 rhbz#1107439 + +* Wed Sep 03 2014 Marek Grac - 4.0.11-1 +- rebase of fence agents + Resolves: rhbz#1120682 +- INFO: fence_scsi_check.pl is now a python script + * Wed Mar 19 2014 Marek Grac - 4.0.2-21 - fencing: Add --ssl-secure and --ssl-insecure for fence_vmware_soap Resolves: rhbz#1072564