diff --git a/SOURCES/bz1102727-2-duplicate_getopt.patch b/SOURCES/bz1102727-2-duplicate_getopt.patch new file mode 100644 index 0000000..2d685b0 --- /dev/null +++ b/SOURCES/bz1102727-2-duplicate_getopt.patch @@ -0,0 +1,36 @@ +From 4d8159cadc7e7d0acca5d3d27be1c281828a4def Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 7 Jan 2015 14:40:07 +0100 +Subject: [PATCH 4/6] fence_mpath: Fix duplicate "getopt" which was not + propagated anywhere + +Found by integrated tests. +--- + fence/agents/mpath/fence_mpath.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fence/agents/mpath/fence_mpath.py b/fence/agents/mpath/fence_mpath.py +index 8a4811c..1dc3a20 100644 +--- a/fence/agents/mpath/fence_mpath.py ++++ b/fence/agents/mpath/fence_mpath.py +@@ -181,7 +181,7 @@ be removed from the device(s).", + "order": 1 + } + all_opt["mpathpersist_path"] = { +- "getopt" : "X:", ++ "getopt" : ":", + "longopt" : "mpathpersist-path", + "help" : "--mpathpersist-path=[path] Path to mpathpersist binary", + "required" : "0", +@@ -190,7 +190,7 @@ be removed from the device(s).", + "order": 200 + } + all_opt["store_path"] = { +- "getopt" : "X:", ++ "getopt" : ":", + "longopt" : "store-path", + "help" : "--store-path=[path] Path to directory containing cached keys", + "required" : "0", +-- +1.9.3 + diff --git a/SOURCES/bz1102727-2-fence_mpath.patch b/SOURCES/bz1102727-2-fence_mpath.patch new file mode 100644 index 0000000..f46f669 --- /dev/null +++ b/SOURCES/bz1102727-2-fence_mpath.patch @@ -0,0 +1,34 @@ +From de46962a4f4204570a6d2d7d7bf70794d33ec902 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 29 Jun 2015 21:01:46 +0200 +Subject: [PATCH] fence_mpath: Fix --sudo-path + +--- + fence/agents/mpath/fence_mpath.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fence/agents/mpath/fence_mpath.py b/fence/agents/mpath/fence_mpath.py +index 1dc3a20..6992dc7 100644 +--- a/fence/agents/mpath/fence_mpath.py ++++ b/fence/agents/mpath/fence_mpath.py +@@ -8,7 +8,7 @@ import logging + import atexit + sys.path.append("@FENCEAGENTSLIBDIR@") + from fencing import fail_usage, run_command, atexit_handler, check_input, process_input, show_docs +-from fencing import fence_action, all_opt, run_delay ++from fencing import fence_action, all_opt, run_delay, SUDO_PATH + + #BEGIN_VERSION_GENERATION + RELEASE_VERSION="" +@@ -80,7 +80,7 @@ def run_cmd(options, cmd): + ret = {} + + if options.has_key("--use-sudo"): +- prefix = options["--sudo-path"] + " " ++ prefix = SUDO_PATH + " " + else: + prefix = "" + +-- +1.9.3 + diff --git a/SOURCES/bz1102727-3-fence_mpath.patch b/SOURCES/bz1102727-3-fence_mpath.patch new file mode 100644 index 0000000..395ecd6 --- /dev/null +++ b/SOURCES/bz1102727-3-fence_mpath.patch @@ -0,0 +1,50 @@ +From 39eb1ed82067d6c720bff3be5af08acedd85ef04 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 12 Aug 2015 15:08:30 +0200 +Subject: [PATCH] fence_mpath: Fix unfencing problems when /var/run/cluster is + removed and monitor these files + +This patch solves same problem as 2f1be046c0c880ec14caff2193b4daa18bcecab7 and 5b3c2b26e5dfa4784d44ac875c7780495bacdde8 +for fence_scsi. +--- + fence/agents/mpath/fence_mpath.py | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/fence/agents/mpath/fence_mpath.py b/fence/agents/mpath/fence_mpath.py +index 6992dc7..2d1e218 100644 +--- a/fence/agents/mpath/fence_mpath.py ++++ b/fence/agents/mpath/fence_mpath.py +@@ -26,6 +26,10 @@ def get_status(conn, options): + else: + logging.debug("No registration for key "\ + + options["--key"] + " on device " + dev + "\n") ++ ++ if options["--action"] == "monitor": ++ dev_read(options) ++ + return status + + +@@ -133,8 +137,8 @@ def get_registration_keys(options, dev): + def dev_write(options, dev): + file_path = options["--store-path"] + "/mpath.devices" + +- if not os.path.isdir(os.path.dirname(options["--store-path"])): +- os.makedirs(os.path.dirname(options["--store-path"])) ++ if not os.path.isdir(options["--store-path"]): ++ os.makedirs(options["--store-path"]) + + try: + store_fh = open(file_path, "a+") +@@ -203,7 +207,7 @@ def main(): + atexit.register(atexit_handler) + + device_opt = ["no_login", "no_password", "devices", "key", "sudo", \ +- "fabric_fencing", "on_target", "store_path", "mpathpersist_path"] ++ "fabric_fencing", "on_target", "store_path", "mpathpersist_path", "force_on"] + + define_new_opts() + +-- +1.9.3 + diff --git a/SOURCES/bz1102727-fence_mpath.patch b/SOURCES/bz1102727-fence_mpath.patch new file mode 100644 index 0000000..2cb54f4 --- /dev/null +++ b/SOURCES/bz1102727-fence_mpath.patch @@ -0,0 +1,443 @@ +From 1e1c7ecf7b3190e24d8e99d46c886c0b17df6bbe Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 19 Nov 2014 10:51:57 +0100 +Subject: [PATCH 3/6] fence_mpath: new fence agent for dm-multipath based on + mpathpersist + +Previously, scenario with multipath and underlying SCSI devices was solved by using +fence_scsi what works correctly but there are some limitation. The most important +is that unfencing has to be done when all paths are available as it is executed only once. +This new fence agent solve this situation properly as most of this situations are solved +by mpathpersist which is part of dm-multipath. + +Conflicts: + configure.ac + make/fencebuild.mk +--- + configure.ac | 4 + + fence/agents/mpath/Makefile.am | 17 +++ + fence/agents/mpath/fence_mpath.py | 244 ++++++++++++++++++++++++++++++++++++ + make/fencebuild.mk | 6 + + tests/data/metadata/fence_mpath.xml | 96 ++++++++++++++ + 5 files changed, 367 insertions(+) + create mode 100644 fence/agents/mpath/Makefile.am + create mode 100644 fence/agents/mpath/fence_mpath.py + create mode 100644 tests/data/metadata/fence_mpath.xml + +diff --git a/configure.ac b/configure.ac +index 7abd701..c7259da 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -168,6 +168,9 @@ AC_PATH_PROG([SG_PERSIST_PATH], [sg_persist], [/usr/bin/sg_persist]) + AC_PATH_PROG([SG_TURS_PATH], [sg_turs], [/usr/bin/sg_turs]) + AC_PATH_PROG([VGS_PATH], [vgs], [/usr/sbin/vgs]) + AC_PATH_PROG([NOVA_PATH], [nova], [/usr/bin/nova]) ++AC_PATH_PROG([MPATH_PATH], [mpathpersist], [/usr/sbin/mpathpersist]) ++AC_PATH_PROG([SUDO_PATH], [mpathpersist], [/usr/bin/sudo]) ++ + ## do subst + + AC_SUBST([DEFAULT_CONFIG_DIR]) +@@ -289,6 +292,7 @@ AC_CONFIG_FILES([Makefile + fence/agents/lib/Makefile + fence/agents/lpar/Makefile + fence/agents/manual/Makefile ++ fence/agents/mpath/Makefile + fence/agents/netio/Makefile + fence/agents/ovh/Makefile + fence/agents/pve/Makefile +diff --git a/fence/agents/mpath/Makefile.am b/fence/agents/mpath/Makefile.am +new file mode 100644 +index 0000000..fd3d8d2 +--- /dev/null ++++ b/fence/agents/mpath/Makefile.am +@@ -0,0 +1,17 @@ ++MAINTAINERCLEANFILES = Makefile.in ++ ++TARGET = fence_mpath ++ ++SRC = $(TARGET).py ++ ++EXTRA_DIST = $(SRC) ++ ++sbin_SCRIPTS = $(TARGET) ++ ++man_MANS = $(TARGET).8 ++ ++FENCE_TEST_ARGS = -k 1 ++ ++include $(top_srcdir)/make/fencebuild.mk ++include $(top_srcdir)/make/fenceman.mk ++include $(top_srcdir)/make/agentpycheck.mk +diff --git a/fence/agents/mpath/fence_mpath.py b/fence/agents/mpath/fence_mpath.py +new file mode 100644 +index 0000000..8a4811c +--- /dev/null ++++ b/fence/agents/mpath/fence_mpath.py +@@ -0,0 +1,244 @@ ++#!/usr/bin/python -tt ++ ++import sys ++import stat ++import re ++import os ++import logging ++import atexit ++sys.path.append("@FENCEAGENTSLIBDIR@") ++from fencing import fail_usage, run_command, atexit_handler, check_input, process_input, show_docs ++from fencing import fence_action, all_opt, run_delay ++ ++#BEGIN_VERSION_GENERATION ++RELEASE_VERSION="" ++REDHAT_COPYRIGHT="" ++BUILD_DATE="" ++#END_VERSION_GENERATION ++ ++def get_status(conn, options): ++ del conn ++ status = "off" ++ for dev in options["devices"]: ++ is_block_device(dev) ++ if options["--key"] in get_registration_keys(options, dev): ++ status = "on" ++ else: ++ logging.debug("No registration for key "\ ++ + options["--key"] + " on device " + dev + "\n") ++ return status ++ ++ ++def set_status(conn, options): ++ del conn ++ count = 0 ++ if options["--action"] == "on": ++ for dev in options["devices"]: ++ is_block_device(dev) ++ ++ register_dev(options, dev) ++ if options["--key"] not in get_registration_keys(options, dev): ++ count += 1 ++ logging.debug("Failed to register key "\ ++ + options["--key"] + "on device " + dev + "\n") ++ continue ++ dev_write(options, dev) ++ ++ if get_reservation_key(options, dev) is None \ ++ and not reserve_dev(options, dev) \ ++ and get_reservation_key(options, dev) is None: ++ count += 1 ++ logging.debug("Failed to create reservation (key="\ ++ + options["--key"] + ", device=" + dev + ")\n") ++ ++ else: ++ dev_keys = dev_read(options) ++ ++ for dev in options["devices"]: ++ is_block_device(dev) ++ ++ if options["--key"] in get_registration_keys(options, dev): ++ preempt_abort(options, dev_keys[dev], dev) ++ ++ for dev in options["devices"]: ++ if options["--key"] in get_registration_keys(options, dev): ++ count += 1 ++ logging.debug("Failed to remove key "\ ++ + options["--key"] + " on device " + dev + "\n") ++ continue ++ ++ if not get_reservation_key(options, dev): ++ count += 1 ++ logging.debug("No reservation exists on device " + dev + "\n") ++ if count: ++ logging.error("Failed to verify " + str(count) + " device(s)") ++ sys.exit(1) ++ ++ ++#run command, returns dict, ret["err"] = exit code; ret["out"] = output ++def run_cmd(options, cmd): ++ ret = {} ++ ++ if options.has_key("--use-sudo"): ++ prefix = options["--sudo-path"] + " " ++ else: ++ prefix = "" ++ ++ (ret["err"], ret["out"], _) = run_command(options, prefix + cmd) ++ ret["out"] = "".join([i for i in ret["out"] if i is not None]) ++ return ret ++ ++ ++# check if device exist and is block device ++def is_block_device(dev): ++ if not os.path.exists(dev): ++ fail_usage("Failed: device \"" + dev + "\" does not exist") ++ if not stat.S_ISBLK(os.stat(dev).st_mode): ++ fail_usage("Failed: device \"" + dev + "\" is not a block device") ++ ++# cancel registration ++def preempt_abort(options, host, dev): ++ cmd = options["--mpathpersist-path"] + " -o --preempt-abort --prout-type=5 --param-rk=" + host +" --param-sark=" + options["--key"] +"-d " + dev ++ return not bool(run_cmd(options, cmd)["err"]) ++ ++def register_dev(options, dev): ++ cmd = options["--mpathpersist-path"] + " -o --register --param-sark=" + options["--key"] + " -d " + dev ++ #cmd return code != 0 but registration can be successful ++ return not bool(run_cmd(options, cmd)["err"]) ++ ++def reserve_dev(options, dev): ++ cmd = options["--mpathpersist-path"] + " -o --reserv --prout-type=5 --param-rk=" + options["--key"] + " -d " + dev ++ return not bool(run_cmd(options, cmd)["err"]) ++ ++def get_reservation_key(options, dev): ++ cmd = options["--mpathpersist-path"] + " -i -r -d " + dev ++ out = run_cmd(options, cmd) ++ if out["err"]: ++ fail_usage("Cannot get reservation key") ++ match = re.search(r"\s+key\s*=\s*0x(\S+)\s+", out["out"], re.IGNORECASE) ++ return match.group(1) if match else None ++ ++def get_registration_keys(options, dev): ++ keys = [] ++ cmd = options["--mpathpersist-path"] + " -i -k -d " + dev ++ out = run_cmd(options, cmd) ++ if out["err"]: ++ fail_usage("Cannot get registration keys") ++ for line in out["out"].split("\n"): ++ match = re.search(r"\s+0x(\S+)\s*", line) ++ if match: ++ keys.append(match.group(1)) ++ return keys ++ ++def dev_write(options, dev): ++ file_path = options["--store-path"] + "/mpath.devices" ++ ++ if not os.path.isdir(os.path.dirname(options["--store-path"])): ++ os.makedirs(os.path.dirname(options["--store-path"])) ++ ++ try: ++ store_fh = open(file_path, "a+") ++ except IOError: ++ fail_usage("Failed: Cannot open file \""+ file_path + "\"") ++ out = store_fh.read() ++ if not re.search(r"^" + dev + r"\s+", out): ++ store_fh.write(dev + "\t" + options["--key"] + "\n") ++ store_fh.close() ++ ++def dev_read(options): ++ dev_key = {} ++ file_path = options["--store-path"] + "/mpath.devices" ++ try: ++ store_fh = open(file_path, "r") ++ except IOError: ++ fail_usage("Failed: Cannot open file \"" + file_path + "\"") ++ # get not empty lines from file ++ for (device, key) in [line.strip().split() for line in store_fh if line.strip()]: ++ dev_key[device] = key ++ store_fh.close() ++ return dev_key ++ ++def define_new_opts(): ++ all_opt["devices"] = { ++ "getopt" : "d:", ++ "longopt" : "devices", ++ "help" : "-d, --devices=[devices] List of devices to use for current operation", ++ "required" : "0", ++ "shortdesc" : "List of devices to use for current operation. Devices can \ ++be comma-separated list of device-mapper multipath devices (eg. /dev/dm-3). \ ++Each device must support SCSI-3 persistent reservations.", ++ "order": 1 ++ } ++ all_opt["key"] = { ++ "getopt" : "k:", ++ "longopt" : "key", ++ "help" : "-k, --key=[key] Key to use for the current operation", ++ "required" : "1", ++ "shortdesc" : "Key to use for the current operation. This key should be \ ++unique to a node and have to be written in /etc/multipath.conf. 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).", ++ "order": 1 ++ } ++ all_opt["mpathpersist_path"] = { ++ "getopt" : "X:", ++ "longopt" : "mpathpersist-path", ++ "help" : "--mpathpersist-path=[path] Path to mpathpersist binary", ++ "required" : "0", ++ "shortdesc" : "Path to mpathpersist binary", ++ "default" : "@MPATH_PATH@", ++ "order": 200 ++ } ++ all_opt["store_path"] = { ++ "getopt" : "X:", ++ "longopt" : "store-path", ++ "help" : "--store-path=[path] Path to directory containing cached keys", ++ "required" : "0", ++ "shortdesc" : "Path to directory where fence agent can store information", ++ "default" : "@STORE_PATH@", ++ "order": 200 ++ } ++ ++def main(): ++ atexit.register(atexit_handler) ++ ++ device_opt = ["no_login", "no_password", "devices", "key", "sudo", \ ++ "fabric_fencing", "on_target", "store_path", "mpathpersist_path"] ++ ++ define_new_opts() ++ ++ options = check_input(device_opt, process_input(device_opt)) ++ ++ docs = {} ++ docs["shortdesc"] = "Fence agent for multipath persistent reservation" ++ docs["longdesc"] = "fence_mpath is an I/O fencing agent that uses SCSI-3 \ ++persistent reservations to control access multipath devices. Underlying \ ++devices must support SCSI-3 persistent reservations (SPC-3 or greater) as \ ++well as the \"preempt-and-abort\" subcommand.\nThe fence_mpath agent works by \ ++having an unique key for each pair of node and device that has to be set also \ ++in /etc/multipath.conf. Once registered, a single node will become the reservation holder \ ++by creating a \"write exclusive, registrants only\" reservation on the \ ++device(s). The result is that only registered nodes may write to the \ ++device(s). When a node failure occurs, the fence_mpath agent will remove the \ ++key belonging to the failed node from the device(s). The failed node will no \ ++longer be able to write to the device(s). A manual reboot is required." ++ docs["vendorurl"] = "https://www.sourceware.org/dm/" ++ show_docs(options, docs) ++ ++ run_delay(options) ++ ++ # Input control BEGIN ++ if not "--key" in options: ++ fail_usage("Failed: key is required") ++ ++ options["devices"] = options["--devices"].split(",") ++ ++ if not options["devices"]: ++ fail_usage("Failed: No devices found") ++ # Input control END ++ ++ result = fence_action(None, options, set_status, get_status) ++ sys.exit(result) ++ ++if __name__ == "__main__": ++ main() +diff --git a/make/fencebuild.mk b/make/fencebuild.mk +index b59c069..7df0fc7 100644 +--- a/make/fencebuild.mk ++++ b/make/fencebuild.mk +@@ -17,6 +17,12 @@ $(TARGET): $(SRC) + -e 's#@''SG_TURS_PATH@#${SG_TURS_PATH}#g' \ + -e 's#@''VGS_PATH@#${VGS_PATH}#g' \ + -e 's#@''NOVA_PATH@#${NOVA_PATH}#g' \ ++ -e 's#@''SUDO_PATH@#${SUDO_PATH}#g' \ ++ -e 's#@''SSH_PATH@#${SSH_PATH}#g' \ ++ -e 's#@''TELNET_PATH@#${TELNET_PATH}#g' \ ++ -e 's#@''MPATH_PATH@#${MPATH_PATH}#g' \ ++ -e 's#@''STORE_PATH@#${CLUSTERVARRUN}#g' \ ++ -e 's#@''SUDO_PATH@#${SUDO_PATH}#g' \ + > $@ + + if [ 0 -eq `echo "$(SRC)" | grep fence_ &> /dev/null; echo $$?` ]; then \ +diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml +new file mode 100644 +index 0000000..c62dd49 +--- /dev/null ++++ b/tests/data/metadata/fence_mpath.xml +@@ -0,0 +1,96 @@ ++ ++ ++fence_mpath is an I/O fencing agent that uses SCSI-3 persistent reservations to control access multipath devices. Underlying devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. ++The fence_mpath agent works by having an unique key for each pair of node and device that has to be set also in /etc/multipath.conf. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_mpath agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. ++https://www.sourceware.org/dm/ ++ ++ ++ ++ ++ List of devices to use for current operation. Devices can be comma-separated list of device-mapper multipath devices (eg. /dev/dm-3). Each device must support SCSI-3 persistent reservations. ++ ++ ++ ++ ++ Key to use for the current operation. This key should be unique to a node and have to be written in /etc/multipath.conf. 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). ++ ++ ++ ++ ++ Fencing Action ++ ++ ++ ++ ++ Verbose mode ++ ++ ++ ++ ++ Write debug information to given file ++ ++ ++ ++ ++ Display version information and exit ++ ++ ++ ++ ++ Display help and exit ++ ++ ++ ++ ++ Wait X seconds before fencing is started ++ ++ ++ ++ ++ Wait X seconds for cmd prompt after issuing command ++ ++ ++ ++ ++ Path to directory where fence agent can store information ++ ++ ++ ++ ++ Test X seconds for status change after ON/OFF ++ ++ ++ ++ ++ Wait X seconds after issuing ON/OFF ++ ++ ++ ++ ++ Wait X seconds for cmd prompt after login ++ ++ ++ ++ ++ Path to mpathpersist binary ++ ++ ++ ++ ++ Count of attempts to retry power on ++ ++ ++ ++ ++ Use sudo (without password) when calling 3rd party sotfware. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +1.9.3 + diff --git a/SOURCES/bz1145769-fence_rhevm-cookies_auth.patch b/SOURCES/bz1145769-fence_rhevm-cookies_auth.patch new file mode 100644 index 0000000..cf11c88 --- /dev/null +++ b/SOURCES/bz1145769-fence_rhevm-cookies_auth.patch @@ -0,0 +1,89 @@ +commit 1dc12749623e3e3a06c3265260f5f049cdf6632b +Author: Marek 'marx' Grac +Date: Wed Jun 17 19:42:32 2015 +0200 + + fence_rhevm: Add support for cookies based authentication + + The first command is authenticated as usually but rest can be used without additional authentication. + This is useful only for reboot or obtaining status of several nodes at once. + + Resolves: rhbz#1145769 + +diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py +index 444fb56..bb34054 100644 +--- a/fence/agents/rhevm/fence_rhevm.py ++++ b/fence/agents/rhevm/fence_rhevm.py +@@ -87,9 +87,16 @@ def send_command(opt, command, method="GET"): + conn = pycurl.Curl() + web_buffer = StringIO.StringIO() + conn.setopt(pycurl.URL, url) +- conn.setopt(pycurl.HTTPHEADER, ["Content-type: application/xml", "Accept: application/xml"]) +- conn.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC) +- conn.setopt(pycurl.USERPWD, opt["--username"] + ":" + opt["--password"]) ++ conn.setopt(pycurl.HTTPHEADER, ["Content-type: application/xml", "Accept: application/xml", "Prefer: persistent-auth"]) ++ ++ if opt.has_key("cookie"): ++ conn.setopt(pycurl.COOKIE, opt["cookie"]) ++ else: ++ conn.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC) ++ conn.setopt(pycurl.USERPWD, opt["--username"] + ":" + opt["--password"]) ++ if opt.has_key("--use-cookies"): ++ conn.setopt(pycurl.COOKIEFILE, "") ++ + conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) + if opt.has_key("--ssl") or opt.has_key("--ssl-secure"): + conn.setopt(pycurl.SSL_VERIFYPEER, 1) +@@ -104,6 +111,15 @@ def send_command(opt, command, method="GET"): + + conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write) + conn.perform() ++ ++ if not opt.has_key("cookie") and opt.has_key("--use-cookies"): ++ cookie = "" ++ for c in conn.getinfo(pycurl.INFO_COOKIELIST): ++ tokens = c.split("\t",7) ++ cookie = cookie + tokens[5] + "=" + tokens[6] + ";" ++ ++ opt["cookie"] = cookie ++ + result = web_buffer.getvalue() + + logging.debug("%s\n", command) +@@ -111,10 +127,20 @@ def send_command(opt, command, method="GET"): + + return result + ++def define_new_opts(): ++ all_opt["use_cookies"] = { ++ "getopt" : "s", ++ "longopt" : "use-cookies", ++ "help" : "--use-cookies Reuse cookies for authentication", ++ "required" : "0", ++ "shortdesc" : "Reuse cookies for authentication", ++ "order" : 1} ++ + def main(): +- device_opt = ["ipaddr", "login", "passwd", "ssl", "notls", "web", "port"] ++ device_opt = ["ipaddr", "login", "passwd", "ssl", "notls", "web", "port", "use_cookies" ] + + atexit.register(atexit_handler) ++ define_new_opts() + + all_opt["power_wait"]["default"] = "1" + +diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml +index 1eccd26..e0c9516 100644 +--- a/tests/data/metadata/fence_rhevm.xml ++++ b/tests/data/metadata/fence_rhevm.xml +@@ -53,6 +53,11 @@ + + SSL connection + ++ ++ ++ ++ Reuse cookies for authentication ++ + + + diff --git a/SOURCES/bz1165591-fence_cisco_ucs-https.patch b/SOURCES/bz1165591-fence_cisco_ucs-https.patch new file mode 100644 index 0000000..77e24ae --- /dev/null +++ b/SOURCES/bz1165591-fence_cisco_ucs-https.patch @@ -0,0 +1,27 @@ +From e283cfbba8bd6d6def515f59db5f150e0b58f780 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 17 Jun 2015 19:47:00 +0200 +Subject: [PATCH 05/10] fence_cisco_ucs: protocol prefix of URL was not + correctly set with --ssl-(in)secure + +Resolves: rhbz#1165591 +--- + fence/agents/cisco_ucs/fence_cisco_ucs.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py +index f411433..825b5db 100644 +--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py ++++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py +@@ -77,7 +77,7 @@ def get_list(conn, options): + + def send_command(opt, command, timeout): + ## setup correct URL +- if opt.has_key("--ssl"): ++ if "--ssl" in opt or "--ssl-secure" in opt or "--ssl-insecure" in opt: + url = "https:" + else: + url = "http:" +-- +1.9.3 + diff --git a/SOURCES/bz1171732-1-fence_emerson.patch b/SOURCES/bz1171732-1-fence_emerson.patch new file mode 100644 index 0000000..6d9a7b9 --- /dev/null +++ b/SOURCES/bz1171732-1-fence_emerson.patch @@ -0,0 +1,301 @@ +From 6c0e696eb3fa74645a269e8449829aecaf41200c Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Thu, 18 Jun 2015 18:38:04 +0200 +Subject: [PATCH 1/3] fence_emerson: New fence agent for Emerson's devices MPX + and MPH2 + +Thanks to Emerson Network Power + +Resolves: rhbz#1171732 +--- + configure.ac | 1 + + fence/agents/emerson/Makefile.am | 17 ++++ + fence/agents/emerson/fence_emerson.py | 67 ++++++++++++++ + tests/data/metadata/fence_emerson.xml | 165 ++++++++++++++++++++++++++++++++++ + 4 files changed, 250 insertions(+) + create mode 100644 fence/agents/emerson/Makefile.am + create mode 100644 fence/agents/emerson/fence_emerson.py + create mode 100644 tests/data/metadata/fence_emerson.xml + +diff --git a/configure.ac b/configure.ac +index 9d996d3..7abd701 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -272,6 +272,7 @@ AC_CONFIG_FILES([Makefile + fence/agents/drac5/Makefile + fence/agents/dummy/Makefile + fence/agents/eaton_snmp/Makefile ++ fence/agents/emerson/Makefile + fence/agents/eps/Makefile + fence/agents/hpblade/Makefile + fence/agents/ibmblade/Makefile +diff --git a/fence/agents/emerson/Makefile.am b/fence/agents/emerson/Makefile.am +new file mode 100644 +index 0000000..f7e5497 +--- /dev/null ++++ b/fence/agents/emerson/Makefile.am +@@ -0,0 +1,17 @@ ++MAINTAINERCLEANFILES = Makefile.in ++ ++TARGET = fence_emerson ++ ++SRC = $(TARGET).py ++ ++EXTRA_DIST = $(SRC) ++ ++sbin_SCRIPTS = $(TARGET) ++ ++man_MANS = $(TARGET).8 ++ ++FENCE_TEST_ARGS = -l test -p test -a test -n 1 ++ ++include $(top_srcdir)/make/fencebuild.mk ++include $(top_srcdir)/make/fenceman.mk ++include $(top_srcdir)/make/agentpycheck.mk +diff --git a/fence/agents/emerson/fence_emerson.py b/fence/agents/emerson/fence_emerson.py +new file mode 100644 +index 0000000..1ef911b +--- /dev/null ++++ b/fence/agents/emerson/fence_emerson.py +@@ -0,0 +1,67 @@ ++#!/usr/bin/python -tt ++ ++import sys ++import atexit ++sys.path.append("@FENCEAGENTSLIBDIR@") ++from fencing import * ++from fencing_snmp import FencingSnmp ++ ++#BEGIN_VERSION_GENERATION ++RELEASE_VERSION="Emerson SNMP fence agent" ++REDHAT_COPYRIGHT="" ++BUILD_DATE="" ++#END_VERSION_GENERATION ++ ++### CONSTANTS ### ++STATUSES_OID = ".1.3.6.1.4.1.476.1.42.3.8.50.20.1.95" ++CONTROL_OID = ".1.3.6.1.4.1.476.1.42.3.8.50.20.1.100" ++NAMES_OID = ".1.3.6.1.4.1.476.1.42.3.8.50.20.1.10" ++ ++# Status constants returned as value from SNMP ++STATUS_DOWN = 1 ++STATUS_UP = 2 ++ ++# Status constants to set as value to SNMP ++STATUS_SET_OFF = 0 ++STATUS_SET_ON = 1 ++ ++def get_power_status(conn, options): ++ (_, status) = conn.get("%s.%s"% (STATUSES_OID, options["--plug"])) ++ return status == str(STATUS_UP) and "on" or "off" ++ ++def set_power_status(conn, options): ++ conn.set("%s.%s" % (CONTROL_OID, options["--plug"]), ++ (options["--action"] == "on" and STATUS_SET_ON or STATUS_SET_OFF)) ++ ++def get_outlets_status(conn, _): ++ result = {} ++ res_outlet = conn.walk(STATUSES_OID, 30) ++ ++ for outlet_info in res_outlet: ++ port_num = ".".join(outlet_info[0].split('.')[-3:]) ++ port_alias = conn.get("%s.%s"% (NAMES_OID, port_num))[1] ++ port_status = (outlet_info[1] == str(STATUS_UP) and "on" or "off") ++ result[port_num] = (port_alias, port_status) ++ return result ++ ++def main(): ++ device_opt = ["ipaddr", "login", "passwd", "no_login", "no_password", \ ++ "port", "snmp_version", "community"] ++ ++ atexit.register(atexit_handler) ++ ++ options = check_input(device_opt, process_input(device_opt)) ++ ++ docs = {} ++ docs["shortdesc"] = "Fence agent for Emerson over SNMP" ++ docs["longdesc"] = "fence_emerson is an I/O Fencing agent \ ++ which can be used with MPX and MPH2 managed rack PDU." ++ docs["vendorurl"] = "http://www.emersonnetworkpower.com" ++ show_docs(options, docs) ++ ++ # Operate the fencing device ++ result = fence_action(FencingSnmp(options), options, set_power_status, get_power_status, get_outlets_status) ++ ++ sys.exit(result) ++if __name__ == "__main__": ++ main() +diff --git a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml +new file mode 100644 +index 0000000..3b49b56 +--- /dev/null ++++ b/tests/data/metadata/fence_emerson.xml +@@ -0,0 +1,165 @@ ++ ++ ++fence_emerson is an I/O Fencing agent which can be used with MPX and MPH2 managed rack PDU. ++http://www.emersonnetworkpower.com ++ ++ ++ ++ ++ Fencing Action ++ ++ ++ ++ ++ Set the community string ++ ++ ++ ++ ++ Forces agent to use IPv4 addresses only ++ ++ ++ ++ ++ Forces agent to use IPv6 addresses only ++ ++ ++ ++ ++ IP Address or Hostname ++ ++ ++ ++ ++ TCP/UDP port to use for connection with device ++ ++ ++ ++ ++ Login Name ++ ++ ++ ++ ++ Login password or passphrase ++ ++ ++ ++ ++ Script to retrieve password ++ ++ ++ ++ ++ Physical plug number, name of virtual machine or UUID ++ ++ ++ ++ ++ ++ Set authentication protocol (MD5|SHA) ++ ++ ++ ++ ++ Set privacy protocol password ++ ++ ++ ++ ++ Script to run to retrieve privacy password ++ ++ ++ ++ ++ ++ Set privacy protocol (DES|AES) ++ ++ ++ ++ ++ ++ Set security level (noAuthNoPriv|authNoPriv|authPriv) ++ ++ ++ ++ ++ ++ Specifies SNMP version to use (1,2c,3) ++ ++ ++ ++ ++ Verbose mode ++ ++ ++ ++ ++ Write debug information to given file ++ ++ ++ ++ ++ Display version information and exit ++ ++ ++ ++ ++ Display help and exit ++ ++ ++ ++ ++ Separator for CSV created by operation list ++ ++ ++ ++ ++ Wait X seconds before fencing is started ++ ++ ++ ++ ++ Wait X seconds for cmd prompt after login ++ ++ ++ ++ ++ Test X seconds for status change after ON/OFF ++ ++ ++ ++ ++ Wait X seconds after issuing ON/OFF ++ ++ ++ ++ ++ Wait X seconds for cmd prompt after issuing command ++ ++ ++ ++ ++ Count of attempts to retry power on ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +1.9.3 + diff --git a/SOURCES/bz1171732-2-fence_emerson.patch b/SOURCES/bz1171732-2-fence_emerson.patch new file mode 100644 index 0000000..e77b918 --- /dev/null +++ b/SOURCES/bz1171732-2-fence_emerson.patch @@ -0,0 +1,40 @@ +From 8411a5c5ef335a22f80244c81afc1aa2430cdb53 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Thu, 18 Jun 2015 18:38:42 +0200 +Subject: [PATCH 2/3] fence_emerson: Add power-wait=5seconds because device is + too fast + +Resolves: rhbz#1171732 +--- + fence/agents/emerson/fence_emerson.py | 1 + + tests/data/metadata/fence_emerson.xml | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/fence/agents/emerson/fence_emerson.py b/fence/agents/emerson/fence_emerson.py +index 1ef911b..af7f132 100644 +--- a/fence/agents/emerson/fence_emerson.py ++++ b/fence/agents/emerson/fence_emerson.py +@@ -50,6 +50,7 @@ def main(): + + atexit.register(atexit_handler) + ++ all_opt["power_wait"]["default"] = "5" + options = check_input(device_opt, process_input(device_opt)) + + docs = {} +diff --git a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml +index 3b49b56..1aa5474 100644 +--- a/tests/data/metadata/fence_emerson.xml ++++ b/tests/data/metadata/fence_emerson.xml +@@ -139,7 +139,7 @@ + + + +- ++ + Wait X seconds after issuing ON/OFF + + +-- +1.9.3 + diff --git a/SOURCES/bz1171732-3-fence_emerson.patch b/SOURCES/bz1171732-3-fence_emerson.patch new file mode 100644 index 0000000..df9c136 --- /dev/null +++ b/SOURCES/bz1171732-3-fence_emerson.patch @@ -0,0 +1,190 @@ +From 362b0e25859c044415a88361101ff4518b2d0d11 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Thu, 18 Jun 2015 18:41:46 +0200 +Subject: [PATCH 3/3] fence_emerson: Add XML metadata + +Resolves: rhbz#1171732 +--- + tests/data/metadata/fence_emerson.xml | 120 +++++++++++++++++----------------- + 1 file changed, 60 insertions(+), 60 deletions(-) + +diff --git a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml +index 1aa5474..553fc37 100644 +--- a/tests/data/metadata/fence_emerson.xml ++++ b/tests/data/metadata/fence_emerson.xml +@@ -3,20 +3,37 @@ + fence_emerson is an I/O Fencing agent which can be used with MPX and MPH2 managed rack PDU. + http://www.emersonnetworkpower.com + +- +- +- +- Fencing Action ++ ++ ++ ++ TCP/UDP port to use for connection with device ++ ++ ++ ++ ++ ++ Specifies SNMP version to use (1,2c,3) + + + + + Set the community string + +- +- +- +- Forces agent to use IPv4 addresses only ++ ++ ++ ++ ++ Set privacy protocol (DES|AES) ++ ++ ++ ++ ++ Physical plug number, name of virtual machine or UUID + + + +@@ -28,30 +45,15 @@ + + IP Address or Hostname + +- +- +- +- TCP/UDP port to use for connection with device +- +- +- +- +- Login Name +- +- +- +- +- Login password or passphrase +- +- +- ++ ++ + +- Script to retrieve password ++ Set privacy protocol password + +- +- ++ ++ + +- Physical plug number, name of virtual machine or UUID ++ Script to run to retrieve privacy password + + + +@@ -61,23 +63,15 @@ + + Set authentication protocol (MD5|SHA) + +- +- +- +- Set privacy protocol password ++ ++ ++ ++ Forces agent to use IPv4 addresses only + +- +- ++ ++ + +- Script to run to retrieve privacy password +- +- +- +- +- +- Set privacy protocol (DES|AES) ++ Script to retrieve password + + + +@@ -88,14 +82,20 @@ + + Set security level (noAuthNoPriv|authNoPriv|authPriv) + +- +- +- +- +- Specifies SNMP version to use (1,2c,3) ++ ++ ++ ++ Login password or passphrase ++ ++ ++ ++ ++ Fencing Action ++ ++ ++ ++ ++ Login Name + + + +@@ -122,10 +122,10 @@ + + Separator for CSV created by operation list + +- +- +- +- Wait X seconds before fencing is started ++ ++ ++ ++ Wait X seconds after issuing ON/OFF + + + +@@ -137,10 +137,10 @@ + + Test X seconds for status change after ON/OFF + +- +- +- +- Wait X seconds after issuing ON/OFF ++ ++ ++ ++ Wait X seconds before fencing is started + + + +-- +1.9.3 + diff --git a/SOURCES/bz1185329-fence_rsa.patch b/SOURCES/bz1185329-fence_rsa.patch new file mode 100644 index 0000000..c60396b --- /dev/null +++ b/SOURCES/bz1185329-fence_rsa.patch @@ -0,0 +1,27 @@ +From 0a7ef22b8562539cbcff1bc68b9d6b8b65bbbbe0 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 5 Aug 2015 15:40:52 +0200 +Subject: [PATCH 4/4] fencing: Password was awaited twice in some cases when + connecting via telnet + +Resolves:rhbz#1185329 +--- + fence/agents/lib/fencing.py.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 8b14cf2..fb7b77d 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -1140,7 +1140,7 @@ def fence_login(options, re_login_string=r"(login\s*: )|(Login Name: )|(usernam + options["eol"] = "\n" + conn.send_eol(options["--username"]) + result = conn.log_expect(options, re_pass, int(options["--login-timeout"])) +- elif re_pass.search(screen) != None: ++ elif re_pass.search(screen) == None: + conn.log_expect(options, re_pass, int(options["--shell-timeout"])) + + try: +-- +1.9.3 + diff --git a/SOURCES/bz1188750-0-fence_zvmip-improve_usage_of_resources.patch b/SOURCES/bz1188750-0-fence_zvmip-improve_usage_of_resources.patch new file mode 100644 index 0000000..6151a72 --- /dev/null +++ b/SOURCES/bz1188750-0-fence_zvmip-improve_usage_of_resources.patch @@ -0,0 +1,192 @@ +commit 11627cc153c891b2e55d0d5e64d5a566516f29d8 +Author: Marek 'marx' Grac +Date: Mon Jan 5 10:15:36 2015 +0100 + + 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. + +diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml +index 0a4ede1..03220cb 100644 +--- a/tests/data/metadata/fence_zvmip.xml ++++ b/tests/data/metadata/fence_zvmip.xml +@@ -1,50 +1,138 @@ + +- +-The fence_zvm agent is intended to be used with with z/VM SMAPI service via TCP/IP ++ ++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. ++ ++http://www.ibm.com + +- +- +- +- Name of the Virtual Machine to be fenced +- +- +- +- +- IP Name or Address of SMAPI Server +- +- +- +- +- Name of authorized SMAPI user +- +- +- +- +- Password of authorized SMAPI user +- +- +- +- +- Fencing action +- +- +- +- +- Time to delay fencing action in seconds +- +- ++ ++ ++ ++ TCP/UDP port to use for connection with device ++ ++ ++ ++ ++ Physical plug number, name of virtual machine or UUID ++ ++ ++ ++ ++ Forces agent to use IPv6 addresses only ++ ++ ++ ++ ++ IP Address or Hostname ++ ++ ++ ++ ++ Forces agent to use IPv4 addresses only ++ ++ ++ ++ ++ ++ Method to fence (onoff|cycle) ++ ++ ++ ++ ++ Script to retrieve password ++ ++ ++ ++ ++ Login password or passphrase ++ ++ ++ ++ ++ Fencing Action ++ ++ ++ ++ ++ Login Name ++ ++ ++ ++ ++ Verbose mode ++ ++ ++ ++ ++ Write debug information to given file ++ ++ ++ ++ ++ Display version information and exit ++ ++ + +- +- Print usage ++ ++ Display help and exit ++ ++ ++ ++ ++ Separator for CSV created by operation list ++ ++ ++ ++ ++ Wait X seconds after issuing ON/OFF ++ ++ ++ ++ ++ Wait X seconds for cmd prompt after login ++ ++ ++ ++ ++ Test X seconds for status change after ON/OFF ++ ++ ++ ++ ++ Wait X seconds before fencing is started ++ ++ ++ ++ ++ Wait X seconds for cmd prompt after issuing command ++ ++ ++ ++ ++ Count of attempts to retry power on + + + ++ + +- ++ ++ + +- + +- +- ++ + + diff --git a/SOURCES/bz1188750-fence_zvmip-improve_usage_of_resources.patch b/SOURCES/bz1188750-fence_zvmip-improve_usage_of_resources.patch new file mode 100644 index 0000000..913fa24 --- /dev/null +++ b/SOURCES/bz1188750-fence_zvmip-improve_usage_of_resources.patch @@ -0,0 +1,133 @@ +From 4ef3bd1bc0e7bb3fcd3c3b2a7ce20e49e37d3332 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 22 Jun 2015 16:49:27 +0200 +Subject: [PATCH] fence_zvmip: Add --missing-as-off and improve usage of system + resources + +Resolves: rhbz#1188750 +--- + fence/agents/lib/fencing.py.py | 5 ++++ + fence/agents/zvm/fence_zvmip.py | 49 +++++++++++++++++++++++++------------ + tests/data/metadata/fence_zvmip.xml | 5 ++++ + 3 files changed, 44 insertions(+), 15 deletions(-) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 29b3a94..db620e8 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -902,7 +902,12 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list=None, + return + elif (options["--action"] == "list") or \ + ((options["--action"] == "monitor") and 1 == options["device_opt"].count("port")): ++ options["--original-action"] = options["--action"] ++ options["--action"] = "list" + outlets = get_outlet_list(tn, options) ++ options["--action"] = options["--original-action"] ++ del options["--original-action"] ++ + ## keys can be numbers (port numbers) or strings (names of VM) + for outlet_id in outlets.keys(): + (alias, status) = outlets[outlet_id] +diff --git a/fence/agents/zvm/fence_zvmip.py b/fence/agents/zvm/fence_zvmip.py +index 63f7fa7..3fe6f24 100644 +--- a/fence/agents/zvm/fence_zvmip.py ++++ b/fence/agents/zvm/fence_zvmip.py +@@ -62,24 +62,38 @@ def prepare_smapi_command(options, smapi_function, additional_args): + def get_power_status(conn, options): + del conn + +- # '*' = list all active images ++ if options.get("--original-action", None) == "monitor": ++ (return_code, reason_code, images_active) = \ ++ get_list_of_images(options, "Check_Authentication", None) ++ logging.debug("Check_Authenticate (%d,%d)", return_code, reason_code) ++ if return_code == 0: ++ return {} ++ else: ++ fail(EC_LOGIN_DENIED) ++ ++ if options["--action"] == "list": ++ # '*' = list all active images ++ options["--plug"] = "*" ++ + (return_code, reason_code, images_active) = \ +- get_list_of_images(options, "Image_Status_Query", "*") ++ get_list_of_images(options, "Image_Status_Query", options["--plug"]) + logging.debug("Image_Status_Query results are (%d,%d)", return_code, reason_code) +- (return_code, reason_code, images_defined) = \ ++ ++ if not options["--action"] == "list": ++ if (return_code == 0) and (reason_code == 0): ++ return "on" ++ elif (return_code == 0) and (reason_code == 12): ++ # We are running always with --missing-as-off because we can not check if image ++ # is defined or not (look at rhbz#1188750) ++ return "off" ++ else: ++ return "unknown" ++ else: ++ (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) ++ 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) +@@ -101,7 +115,11 @@ def set_power_status(conn, options): + def get_list_of_images(options, command, data_as_plug): + conn = open_socket(options) + +- packet = prepare_smapi_command(options, command, [data_as_plug]) ++ if data_as_plug is None: ++ packet = prepare_smapi_command(options, command, []) ++ else: ++ packet = prepare_smapi_command(options, command, [data_as_plug]) ++ + conn.send(packet) + + request_id = struct.unpack("!i", conn.recv(INT4))[0] +@@ -133,12 +151,13 @@ def get_list_of_images(options, command, data_as_plug): + return (return_code, reason_code, images) + + def main(): +- device_opt = ["ipaddr", "login", "passwd", "port", "method"] ++ device_opt = ["ipaddr", "login", "passwd", "port", "method", "missing_as_off"] + + atexit.register(atexit_handler) + + all_opt["ipport"]["default"] = "44444" + all_opt["shell_timeout"]["default"] = "5.0" ++ all_opt["missing_as_off"]["default"] = "1" + options = check_input(device_opt, process_input(device_opt)) + + if len(options.get("--plug", "")) > 8: +diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml +index 03220cb..993dfb3 100644 +--- a/tests/data/metadata/fence_zvmip.xml ++++ b/tests/data/metadata/fence_zvmip.xml +@@ -120,6 +120,11 @@ Where XXXXXXX is the name of the virtual machine used in the authuser field of t + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Missing port returns OFF instead of failure ++ + + + +-- +1.9.3 + diff --git a/SOURCES/bz1196068-2-fence_kdump-add_monitor.patch b/SOURCES/bz1196068-2-fence_kdump-add_monitor.patch new file mode 100644 index 0000000..c18d802 --- /dev/null +++ b/SOURCES/bz1196068-2-fence_kdump-add_monitor.patch @@ -0,0 +1,25 @@ +From 42c623ef2bb7d1114a07f880bb93c0ebf2dbab14 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 17 Jun 2015 19:49:36 +0200 +Subject: [PATCH 07/10] fence_kdump: Fix problem in metadata + +Resolves: rhbz#1196068 +--- + fence/agents/kdump/fence_kdump.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/fence/agents/kdump/fence_kdump.c b/fence/agents/kdump/fence_kdump.c +index 5cea11d..29abbda 100644 +--- a/fence/agents/kdump/fence_kdump.c ++++ b/fence/agents/kdump/fence_kdump.c +@@ -233,7 +233,6 @@ do_action_metadata (const char *self) + + fprintf (stdout, "\t\n"); + fprintf (stdout, "\t\t\n"); +- fprintf (stdout, "\t\t\n"); + fprintf (stdout, "\t\t\n"); + fprintf (stdout, "\t\t%s\n", + "Fencing action"); +-- +1.9.3 + diff --git a/SOURCES/bz1196068-3-fence_kdump-add_monitor.patch b/SOURCES/bz1196068-3-fence_kdump-add_monitor.patch new file mode 100644 index 0000000..26ee5c5 --- /dev/null +++ b/SOURCES/bz1196068-3-fence_kdump-add_monitor.patch @@ -0,0 +1,55 @@ +From 67d1a3ea5d12b1a9f6ff222b55f42b3536a8a745 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 2 Mar 2015 10:58:06 +0100 +Subject: [PATCH 08/10] fence_kdump: Fix possible problems according to + Coverity + +Previously, there was issue detected by Coverity. They do not matter too much +because we care only about return value and it will not be 0 if program crash. +But it is always better to have clean code, so fixing. + +Resolves: rhbz#1196068 +--- + fence/agents/kdump/fence_kdump.c | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) + +diff --git a/fence/agents/kdump/fence_kdump.c b/fence/agents/kdump/fence_kdump.c +index 29abbda..781df64 100644 +--- a/fence/agents/kdump/fence_kdump.c ++++ b/fence/agents/kdump/fence_kdump.c +@@ -118,21 +118,22 @@ do_action_monitor (void) + { + const char cmdline_path[] = "/proc/cmdline"; + FILE *procFile; +- size_t sz; +- char *lines; +- int result; ++ size_t sz = 0; ++ char *lines = NULL; ++ int result = 1; + + procFile = fopen(cmdline_path, "r"); +- sz = 0; + +- while (!feof (procFile)) { +- getline (&lines, &sz, procFile); ++ if (procFile == NULL) { ++ log_error (0, "Unable to open file %s (%s)\n", cmdline_path, strerror (errno)); ++ return 1; + } + +- if (strstr(lines, "crashkernel=") == NULL) { +- result = 1; +- } else { +- result = 0; ++ while (!feof (procFile)) { ++ ssize_t rv = getline (&lines, &sz, procFile); ++ if ((rv != -1) && (strstr(lines, "crashkernel=") != NULL)) { ++ result = 0; ++ } + } + + free (lines); +-- +1.9.3 + diff --git a/SOURCES/bz1196068-4-fence_kdump-add_monitor.patch b/SOURCES/bz1196068-4-fence_kdump-add_monitor.patch new file mode 100644 index 0000000..2696a99 --- /dev/null +++ b/SOURCES/bz1196068-4-fence_kdump-add_monitor.patch @@ -0,0 +1,25 @@ +From 11f7e98101574a6d3006d92558dcd1bb699a0804 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 17 Jun 2015 19:50:44 +0200 +Subject: [PATCH 09/10] testing: Update XML metadata after 'monitor' was added. + +Resolves: rhbz#1196068 +--- + tests/data/metadata/fence_kdump.xml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/data/metadata/fence_kdump.xml b/tests/data/metadata/fence_kdump.xml +index c985cac..08967fd 100644 +--- a/tests/data/metadata/fence_kdump.xml ++++ b/tests/data/metadata/fence_kdump.xml +@@ -46,6 +46,7 @@ + + + ++ + + + +-- +1.9.3 + diff --git a/SOURCES/bz1196068-fence_kdump-add_monitor.patch b/SOURCES/bz1196068-fence_kdump-add_monitor.patch new file mode 100644 index 0000000..656157d --- /dev/null +++ b/SOURCES/bz1196068-fence_kdump-add_monitor.patch @@ -0,0 +1,106 @@ +From ed0599391ab4066ec8cfa907efc58a9ce237cef2 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 17 Jun 2015 19:48:21 +0200 +Subject: [PATCH 06/10] fence_kdump: Add 'monitor' action which tests + possibility of doing kdump on local node + +In case of fence_kdump we can not test if remote 'fencing device' is working because +fence_kdump_send is started only after kernel crash. So, monitor action checks if LOCAL +node can enter kdump. The test looks if crashkernel=.. occurs between boot arguments. + +Resolves: rhbz#1196068 +--- + fence/agents/kdump/fence_kdump.c | 35 ++++++++++++++++++++++++++++++++++- + fence/agents/kdump/options.h | 2 ++ + 2 files changed, 36 insertions(+), 1 deletion(-) + +diff --git a/fence/agents/kdump/fence_kdump.c b/fence/agents/kdump/fence_kdump.c +index cae9842..5cea11d 100644 +--- a/fence/agents/kdump/fence_kdump.c ++++ b/fence/agents/kdump/fence_kdump.c +@@ -114,6 +114,34 @@ out: + } + + static int ++do_action_monitor (void) ++{ ++ const char cmdline_path[] = "/proc/cmdline"; ++ FILE *procFile; ++ size_t sz; ++ char *lines; ++ int result; ++ ++ procFile = fopen(cmdline_path, "r"); ++ sz = 0; ++ ++ while (!feof (procFile)) { ++ getline (&lines, &sz, procFile); ++ } ++ ++ if (strstr(lines, "crashkernel=") == NULL) { ++ result = 1; ++ } else { ++ result = 0; ++ } ++ ++ free (lines); ++ fclose (procFile); ++ ++ return result; ++} ++ ++static int + do_action_off (const fence_kdump_opts_t *opts) + { + int error; +@@ -205,6 +233,7 @@ do_action_metadata (const char *self) + + fprintf (stdout, "\t\n"); + fprintf (stdout, "\t\t\n"); ++ fprintf (stdout, "\t\t\n"); + fprintf (stdout, "\t\t\n"); + fprintf (stdout, "\t\t%s\n", + "Fencing action"); +@@ -242,6 +271,7 @@ do_action_metadata (const char *self) + + fprintf (stdout, "\n"); + fprintf (stdout, "\t\n"); ++ fprintf (stdout, "\t\n"); + fprintf (stdout, "\t\n"); + fprintf (stdout, "\n"); + +@@ -264,7 +294,7 @@ print_usage (const char *self) + fprintf (stdout, "%s\n", + " -f, --family=FAMILY Network family: ([auto], ipv4, ipv6)"); + fprintf (stdout, "%s\n", +- " -o, --action=ACTION Fencing action: ([off], metadata)"); ++ " -o, --action=ACTION Fencing action: ([off], monitor, metadata)"); + fprintf (stdout, "%s\n", + " -t, --timeout=TIMEOUT Timeout in seconds (default: 60)"); + fprintf (stdout, "%s\n", +@@ -501,6 +531,9 @@ main (int argc, char **argv) + case FENCE_KDUMP_ACTION_METADATA: + error = do_action_metadata (argv[0]); + break; ++ case FENCE_KDUMP_ACTION_MONITOR: ++ error = do_action_monitor (); ++ break; + default: + break; + } +diff --git a/fence/agents/kdump/options.h b/fence/agents/kdump/options.h +index 10fa2a2..22731d7 100644 +--- a/fence/agents/kdump/options.h ++++ b/fence/agents/kdump/options.h +@@ -189,6 +189,8 @@ set_option_action (fence_kdump_opts_t *opts, const char *arg) + opts->action = FENCE_KDUMP_ACTION_OFF; + } else if (!strcasecmp (arg, "metadata")) { + opts->action = FENCE_KDUMP_ACTION_METADATA; ++ } else if (!strcasecmp (arg, "monitor")) { ++ opts->action = FENCE_KDUMP_ACTION_MONITOR; + } else { + fprintf (stderr, "[error]: unsupported action '%s'\n", arg); + exit (1); +-- +1.9.3 + diff --git a/SOURCES/bz1207982-fence2rng-quotes.patch b/SOURCES/bz1207982-fence2rng-quotes.patch new file mode 100644 index 0000000..6d4532a --- /dev/null +++ b/SOURCES/bz1207982-fence2rng-quotes.patch @@ -0,0 +1,61 @@ +From 4bedbd33645d22a4da2c623ccccacb2175d49b99 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 17 Jun 2015 19:57:05 +0200 +Subject: [PATCH 10/10] fence2rng.xsl: Correctly handle quotes in description + +Resolves: rhbz#1207982 +--- + fence/agents/lib/fence2rng.xsl | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/fence/agents/lib/fence2rng.xsl b/fence/agents/lib/fence2rng.xsl +index 432bc89..f6d465e 100644 +--- a/fence/agents/lib/fence2rng.xsl ++++ b/fence/agents/lib/fence2rng.xsl +@@ -124,6 +124,12 @@ + + + ++ ++ ++ ++ ++ ++ + + + +@@ -136,7 +142,7 @@ + + ++ 'rha:description=', $Q, normalize-space($escapeddesc), $Q, $SP)"/> + + + +@@ -158,4 +164,21 @@ + + + ++ ++ ++ ++ ++ ++ ++ " ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +-- +1.9.3 + diff --git a/SOURCES/bz1214359-7-fence_compute_xml_test.patch b/SOURCES/bz1214359-7-fence_compute_xml_test.patch new file mode 100644 index 0000000..e3e5c8c --- /dev/null +++ b/SOURCES/bz1214359-7-fence_compute_xml_test.patch @@ -0,0 +1,28 @@ +From 360671cf5a78c4c02aca3ba598301fc77aa02c24 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 29 Jun 2015 15:19:28 +0200 +Subject: [PATCH 5/6] fence_compute: Update XML metadata for --record-only + +--- + tests/data/metadata/fence_compute.xml | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml +index f9b97fc..2c488c5 100644 +--- a/tests/data/metadata/fence_compute.xml ++++ b/tests/data/metadata/fence_compute.xml +@@ -53,6 +53,11 @@ + + Disable functionality for dealing with shared storage + ++ ++ ++ ++ Only record the target as needing evacuation ++ + + + +-- +1.9.3 + diff --git a/SOURCES/bz1214522-2-port_as_ip.patch b/SOURCES/bz1214522-2-port_as_ip.patch new file mode 100644 index 0000000..cc79b64 --- /dev/null +++ b/SOURCES/bz1214522-2-port_as_ip.patch @@ -0,0 +1,27 @@ +From f62091cb5d9bfd150a70fed51a98117b9e2172ab Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 5 Aug 2015 10:01:12 +0200 +Subject: [PATCH 2/4] fencing: Fix required options if --port-as-ip is used + +--- + fence/agents/lib/fencing.py.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 89c3379..f14d7e0 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -700,6 +700,10 @@ def check_input(device_opt, opt): + else: + all_opt["login"]["required"] = "0" + ++ if device_opt.count("port_as_ip"): ++ all_opt["ipaddr"]["required"] = "0" ++ all_opt["port"]["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" +-- +1.9.3 + diff --git a/SOURCES/bz1214522-3-port_as_ip.patch b/SOURCES/bz1214522-3-port_as_ip.patch new file mode 100644 index 0000000..bff1091 --- /dev/null +++ b/SOURCES/bz1214522-3-port_as_ip.patch @@ -0,0 +1,504 @@ +From 3c4651ba655a7346f4e67335229b76ed24d1c917 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 5 Aug 2015 15:29:12 +0200 +Subject: [PATCH 3/4] fencing: Fix XML metadata and their creation for + 'port_as_ip' + +--- + fence/agents/dummy/fence_dummy.py | 1 + + fence/agents/lib/fencing.py.py | 5 +++- + tests/data/metadata/fence_alom.xml | 4 +-- + tests/data/metadata/fence_amt.xml | 4 +-- + tests/data/metadata/fence_drac.xml | 4 +-- + tests/data/metadata/fence_dummy.xml | 10 ------- + tests/data/metadata/fence_idrac.xml | 4 +-- + tests/data/metadata/fence_ilo.xml | 4 +-- + tests/data/metadata/fence_ilo2.xml | 4 +-- + tests/data/metadata/fence_ilo3.xml | 4 +-- + tests/data/metadata/fence_ilo3_ssh.xml | 4 +-- + tests/data/metadata/fence_ilo4.xml | 4 +-- + tests/data/metadata/fence_ilo4_ssh.xml | 4 +-- + tests/data/metadata/fence_ilo_mp.xml | 4 +-- + tests/data/metadata/fence_ilo_ssh.xml | 4 +-- + tests/data/metadata/fence_imm.xml | 4 +-- + tests/data/metadata/fence_ipmilan.xml | 4 +-- + tests/data/metadata/fence_mpath.xml | 54 ++++++++++++++-------------------- + tests/data/metadata/fence_rsa.xml | 4 +-- + tests/data/metadata/fence_rsb.xml | 4 +-- + 20 files changed, 59 insertions(+), 75 deletions(-) + +diff --git a/fence/agents/dummy/fence_dummy.py b/fence/agents/dummy/fence_dummy.py +index 9c4c5f1..7d6bd06 100644 +--- a/fence/agents/dummy/fence_dummy.py ++++ b/fence/agents/dummy/fence_dummy.py +@@ -115,6 +115,7 @@ def main(): + if (pinput.has_key("--type") and pinput["--type"] == "file") or (pinput.has_key("--type") == False): + # hack to have fence agents that require ports 'fail' and one that do not 'file' + device_opt.remove("port") ++ device_opt.remove("separator") + + options = check_input(device_opt, process_input(device_opt)) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index f14d7e0..8b14cf2 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -463,7 +463,10 @@ def add_dependency_options(options): + if DEPENDENCY_OPT.has_key(opt): + added_opt.extend([y for y in DEPENDENCY_OPT[opt] if options.count(y) == 0]) + +- if not "port" in (options + added_opt) and not "nodename" in (options + added_opt): ++ if not "port" in (options + added_opt) and \ ++ not "nodename" in (options + added_opt) and \ ++ "ipaddr" in (options + added_opt): ++ + added_opt.append("port_as_ip") + all_opt["port"]["help"] = "-n, --plug=[ip] IP address or hostname of fencing device " \ + "(together with --port-as-ip)" +diff --git a/tests/data/metadata/fence_alom.xml b/tests/data/metadata/fence_alom.xml +index dfbe431..f7e2f36 100644 +--- a/tests/data/metadata/fence_alom.xml ++++ b/tests/data/metadata/fence_alom.xml +@@ -8,12 +8,12 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP Address or Hostname + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +diff --git a/tests/data/metadata/fence_amt.xml b/tests/data/metadata/fence_amt.xml +index 17e38fc..61b39f5 100644 +--- a/tests/data/metadata/fence_amt.xml ++++ b/tests/data/metadata/fence_amt.xml +@@ -8,7 +8,7 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +@@ -18,7 +18,7 @@ + + Forces agent to use IPv6 addresses only + +- ++ + + + IP Address or Hostname +diff --git a/tests/data/metadata/fence_drac.xml b/tests/data/metadata/fence_drac.xml +index 37697f7..1e94dbc 100644 +--- a/tests/data/metadata/fence_drac.xml ++++ b/tests/data/metadata/fence_drac.xml +@@ -8,7 +8,7 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +@@ -23,7 +23,7 @@ + + Forces agent to use IPv6 addresses only + +- ++ + + + IP Address or Hostname +diff --git a/tests/data/metadata/fence_dummy.xml b/tests/data/metadata/fence_dummy.xml +index eb31244..07ad2cc 100644 +--- a/tests/data/metadata/fence_dummy.xml ++++ b/tests/data/metadata/fence_dummy.xml +@@ -3,11 +3,6 @@ + fence_dummy + http://www.example.com + +- +- +- +- IP address or hostname of fencing device (together with --port-as-ip) +- + + + +@@ -63,11 +58,6 @@ + + Test X seconds for status change after ON/OFF + +- +- +- +- Make "port/plug" to be an alias to IP address +- + + + +diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml +index b742161..0aced2a 100644 +--- a/tests/data/metadata/fence_idrac.xml ++++ b/tests/data/metadata/fence_idrac.xml +@@ -12,7 +12,7 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +@@ -22,7 +22,7 @@ + + Forces agent to use IPv6 addresses only + +- ++ + + + IP Address or Hostname +diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml +index 891b7f1..2eead1e 100644 +--- a/tests/data/metadata/fence_ilo.xml ++++ b/tests/data/metadata/fence_ilo.xml +@@ -34,12 +34,12 @@ + + Forces agent to use IPv6 addresses only + +- ++ + + + IP Address or Hostname + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml +index 7ff697f..3be62f1 100644 +--- a/tests/data/metadata/fence_ilo2.xml ++++ b/tests/data/metadata/fence_ilo2.xml +@@ -34,12 +34,12 @@ + + Forces agent to use IPv6 addresses only + +- ++ + + + IP Address or Hostname + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml +index 05fd01c..67e869b 100644 +--- a/tests/data/metadata/fence_ilo3.xml ++++ b/tests/data/metadata/fence_ilo3.xml +@@ -12,7 +12,7 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +@@ -22,7 +22,7 @@ + + Forces agent to use IPv6 addresses only + +- ++ + + + IP Address or Hostname +diff --git a/tests/data/metadata/fence_ilo3_ssh.xml b/tests/data/metadata/fence_ilo3_ssh.xml +index ebdae65..8268daf 100644 +--- a/tests/data/metadata/fence_ilo3_ssh.xml ++++ b/tests/data/metadata/fence_ilo3_ssh.xml +@@ -10,12 +10,12 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP Address or Hostname + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml +index 4f29073..b7dd31a 100644 +--- a/tests/data/metadata/fence_ilo4.xml ++++ b/tests/data/metadata/fence_ilo4.xml +@@ -12,7 +12,7 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +@@ -22,7 +22,7 @@ + + Forces agent to use IPv6 addresses only + +- ++ + + + IP Address or Hostname +diff --git a/tests/data/metadata/fence_ilo4_ssh.xml b/tests/data/metadata/fence_ilo4_ssh.xml +index 197d627..4ca2397 100644 +--- a/tests/data/metadata/fence_ilo4_ssh.xml ++++ b/tests/data/metadata/fence_ilo4_ssh.xml +@@ -10,12 +10,12 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP Address or Hostname + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +diff --git a/tests/data/metadata/fence_ilo_mp.xml b/tests/data/metadata/fence_ilo_mp.xml +index d2396e9..14fc3c8 100644 +--- a/tests/data/metadata/fence_ilo_mp.xml ++++ b/tests/data/metadata/fence_ilo_mp.xml +@@ -8,12 +8,12 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP Address or Hostname + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +diff --git a/tests/data/metadata/fence_ilo_ssh.xml b/tests/data/metadata/fence_ilo_ssh.xml +index 1d79308..4448d2d 100644 +--- a/tests/data/metadata/fence_ilo_ssh.xml ++++ b/tests/data/metadata/fence_ilo_ssh.xml +@@ -10,12 +10,12 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP Address or Hostname + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml +index 0302f84..0e7588d 100644 +--- a/tests/data/metadata/fence_imm.xml ++++ b/tests/data/metadata/fence_imm.xml +@@ -12,7 +12,7 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +@@ -22,7 +22,7 @@ + + Forces agent to use IPv6 addresses only + +- ++ + + + IP Address or Hostname +diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml +index 4ed67eb..443365c 100644 +--- a/tests/data/metadata/fence_ipmilan.xml ++++ b/tests/data/metadata/fence_ipmilan.xml +@@ -12,7 +12,7 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +@@ -22,7 +22,7 @@ + + Forces agent to use IPv6 addresses only + +- ++ + + + IP Address or Hostname +diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml +index d3de9d5..c578f7a 100644 +--- a/tests/data/metadata/fence_mpath.xml ++++ b/tests/data/metadata/fence_mpath.xml +@@ -4,25 +4,20 @@ + The fence_mpath agent works by having an unique key for each pair of node and device that has to be set also in /etc/multipath.conf. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_mpath agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. + https://www.sourceware.org/dm/ + +- +- ++ ++ + +- IP address or hostname of fencing device (together with --port-as-ip) +- +- +- +- +- Fencing Action ++ List of devices to use for current operation. Devices can be comma-separated list of device-mapper multipath devices (eg. /dev/dm-3). Each device must support SCSI-3 persistent reservations. + + + + + Key to use for the current operation. This key should be unique to a node and have to be written in /etc/multipath.conf. 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). + +- +- +- +- List of devices to use for current operation. Devices can be comma-separated list of device-mapper multipath devices (eg. /dev/dm-3). Each device must support SCSI-3 persistent reservations. ++ ++ ++ ++ Fencing Action + + + +@@ -44,31 +39,11 @@ The fence_mpath agent works by having an unique key for each pair of node and de + + Display help and exit + +- +- +- +- Wait X seconds after issuing ON/OFF +- +- +- +- +- Wait X seconds for cmd prompt after login +- +- +- +- +- Make "port/plug" to be an alias to IP address +- + + + + Wait X seconds before fencing is started + +- +- +- +- Path to mpathpersist binary +- + + + +@@ -84,6 +59,21 @@ The fence_mpath agent works by having an unique key for each pair of node and de + + Test X seconds for status change after ON/OFF + ++ ++ ++ ++ Wait X seconds after issuing ON/OFF ++ ++ ++ ++ ++ Wait X seconds for cmd prompt after login ++ ++ ++ ++ ++ Path to mpathpersist binary ++ + + + +diff --git a/tests/data/metadata/fence_rsa.xml b/tests/data/metadata/fence_rsa.xml +index 3f3a336..2981f04 100644 +--- a/tests/data/metadata/fence_rsa.xml ++++ b/tests/data/metadata/fence_rsa.xml +@@ -8,12 +8,12 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP Address or Hostname + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +diff --git a/tests/data/metadata/fence_rsb.xml b/tests/data/metadata/fence_rsb.xml +index 36b9cdb..c27ebe4 100644 +--- a/tests/data/metadata/fence_rsb.xml ++++ b/tests/data/metadata/fence_rsb.xml +@@ -8,12 +8,12 @@ + + TCP/UDP port to use for connection with device + +- ++ + + + IP Address or Hostname + +- ++ + + + IP address or hostname of fencing device (together with --port-as-ip) +-- +1.9.3 + diff --git a/SOURCES/bz1214522-4-port_as_ip.patch b/SOURCES/bz1214522-4-port_as_ip.patch new file mode 100644 index 0000000..b600398 --- /dev/null +++ b/SOURCES/bz1214522-4-port_as_ip.patch @@ -0,0 +1,26 @@ +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 3a6e2ab..bb8e3a4 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -657,6 +657,10 @@ def process_input(avail_opt): + opt = z + ## + ##### ++ ++ # This test should NOT be used for stdin input where it should be allowed (and ignored) ++ if "port_as_ip" in device_opt and not "--port-as-ip" in options and "--plug" in options: ++ fail_usage("Parser error: option -n/--plug is not recognized") + else: + opt = {} + name = "" +@@ -788,10 +792,6 @@ def check_input(device_opt, opt): + options["--action"] = "off" + + ## automatic detection and set of valid UUID from --plug +- +- if "port_as_ip" in device_opt and not "--port-as-ip" in options and "--plug" in options: +- fail_usage("Parser error: option -n/--plug is not recognized") +- + if not options.has_key("--username") and \ + device_opt.count("login") and (device_opt.count("no_login") == 0): + fail_usage("Failed: You have to set login name") diff --git a/SOURCES/bz1214522-5-port_as_ip.patch b/SOURCES/bz1214522-5-port_as_ip.patch new file mode 100644 index 0000000..02e2ba2 --- /dev/null +++ b/SOURCES/bz1214522-5-port_as_ip.patch @@ -0,0 +1,27 @@ +From 4e4213f1aabfbb0a09f66cabd16079dc6e71e042 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Tue, 11 Aug 2015 09:29:08 +0200 +Subject: [PATCH] fencing: Move checking of --plug and --port-as-ip to run them + only on getopt + +Fix wrong backporting of patch 4442f2548543f418fc8e094c701fa27edf8e6bfa +--- + fence/agents/lib/fencing.py.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index bb8e3a4..9a16aee 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -659,7 +659,7 @@ def process_input(avail_opt): + ##### + + # This test should NOT be used for stdin input where it should be allowed (and ignored) +- if "port_as_ip" in device_opt and not "--port-as-ip" in options and "--plug" in options: ++ if "port_as_ip" in avail_opt and not "--port-as-ip" in opt and "--plug" in opt: + fail_usage("Parser error: option -n/--plug is not recognized") + else: + opt = {} +-- +1.9.3 + diff --git a/SOURCES/bz1214522-port_as_ip.patch b/SOURCES/bz1214522-port_as_ip.patch new file mode 100644 index 0000000..e2e63d8 --- /dev/null +++ b/SOURCES/bz1214522-port_as_ip.patch @@ -0,0 +1,809 @@ +From 05bfc15535f3d28af5f09a9a8fedd16ab45c24d3 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 29 Jun 2015 19:55:00 +0200 +Subject: [PATCH 6/6] fencing: Introduce option --port-as-ip (port_as_ip on + stdin) + +Pacemaker's mapping between fence devices and appropriate ports works fine. But if +fence device is used only for single device (IPMI, iLO, DRAC, ...) then configuration +is more complex. With this new option, user can use --plug/-n/port to specify IP address +what simplify configuration. + +Resolves: rhbz#1214522 +--- + fence/agents/lib/fencing.py.py | 30 +++++++++++++++- + tests/data/metadata/fence_alom.xml | 10 ++++++ + tests/data/metadata/fence_amt.xml | 10 ++++++ + tests/data/metadata/fence_drac.xml | 64 ++++++++++++++++++++-------------- + tests/data/metadata/fence_dummy.xml | 15 +++++--- + tests/data/metadata/fence_hpblade.xml | 4 +-- + tests/data/metadata/fence_idrac.xml | 10 ++++++ + tests/data/metadata/fence_ilo.xml | 10 ++++++ + tests/data/metadata/fence_ilo2.xml | 10 ++++++ + tests/data/metadata/fence_ilo3.xml | 10 ++++++ + tests/data/metadata/fence_ilo3_ssh.xml | 10 ++++++ + tests/data/metadata/fence_ilo4.xml | 10 ++++++ + tests/data/metadata/fence_ilo4_ssh.xml | 10 ++++++ + tests/data/metadata/fence_ilo_mp.xml | 10 ++++++ + tests/data/metadata/fence_ilo_ssh.xml | 10 ++++++ + tests/data/metadata/fence_imm.xml | 10 ++++++ + tests/data/metadata/fence_ipmilan.xml | 10 ++++++ + tests/data/metadata/fence_mpath.xml | 54 ++++++++++++++++------------ + tests/data/metadata/fence_rsa.xml | 10 ++++++ + tests/data/metadata/fence_rsb.xml | 10 ++++++ + 20 files changed, 260 insertions(+), 57 deletions(-) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index db620e8..2ba98b8 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -399,6 +399,13 @@ all_opt = { + "default" : "onoff", + "choices" : ["onoff", "cycle"], + "order" : 1}, ++ "port_as_ip": { ++ "getopt" : "", ++ "longopt" : "port-as-ip", ++ "help" : "--port-as-ip Make \"port/plug\" to be an alias to IP address", ++ "required" : "0", ++ "shortdesc" : "Make \"port/plug\" to be an alias to IP address", ++ "order" : 200}, + "on_target": { + "getopt" : "", + "help" : "", +@@ -451,6 +458,13 @@ def add_dependency_options(options): + for opt in options + ["default"]: + if DEPENDENCY_OPT.has_key(opt): + added_opt.extend([y for y in DEPENDENCY_OPT[opt] if options.count(y) == 0]) ++ ++ if not "port" in (options + added_opt) and not "nodename" in (options + added_opt): ++ added_opt.append("port_as_ip") ++ all_opt["port"]["help"] = "-n, --plug=[ip] IP address or hostname of fencing device " \ ++ "(together with --port-as-ip)" ++ all_opt["port"]["shortdesc"] = "IP address or hostname of fencing device (together with --port-as-ip)" ++ + return added_opt + + def fail_usage(message=""): +@@ -580,6 +594,9 @@ def process_input(avail_opt): + os.putenv("LANG", "C") + os.putenv("LC_ALL", "C") + ++ if "port_as_ip" in avail_opt: ++ avail_opt.append("port") ++ + ## + ## Prepare list of options for getopt + ##### +@@ -653,6 +670,10 @@ def process_input(avail_opt): + opt["--"+all_opt[name]["longopt"].rstrip(":")] = value + elif value.lower() in ["1", "yes", "on", "true"]: + opt["--"+all_opt[name]["longopt"]] = "1" ++ ++ if "--port-as-ip" in opt and "--plug" in opt: ++ opt["--ip"] = opt["--plug"] ++ + return opt + + ## +@@ -755,6 +776,10 @@ def check_input(device_opt, opt): + options["--action"] = "off" + + ## automatic detection and set of valid UUID from --plug ++ ++ if "port_as_ip" in device_opt and not "--port-as-ip" in options and "--plug" in options: ++ fail_usage("Parser error: option -n/--plug is not recognized") ++ + if not options.has_key("--username") and \ + device_opt.count("login") and (device_opt.count("no_login") == 0): + fail_usage("Failed: You have to set login name") +@@ -779,7 +804,8 @@ def check_input(device_opt, opt): + fail_usage("Failed: Identity file " + options["--identity-file"] + " does not exist") + + if (0 == ["list", "monitor"].count(options["--action"])) and \ +- not options.has_key("--plug") and device_opt.count("port") and device_opt.count("no_port") == 0: ++ not options.has_key("--plug") and device_opt.count("port") and \ ++ device_opt.count("no_port") == 0 and not device_opt.count("port_as_ip"): + fail_usage("Failed: You have to enter plug number or machine identification") + + if options.has_key("--password-script"): +@@ -874,6 +900,8 @@ def show_docs(options, docs=None): + sys.exit(0) + + if options.get("--action", "") == "metadata": ++ if "port_as_ip" in device_opt: ++ device_opt.remove("separator") + metadata(device_opt, options, docs) + sys.exit(0) + +diff --git a/tests/data/metadata/fence_alom.xml b/tests/data/metadata/fence_alom.xml +index 6bdefb7..32e6630 100644 +--- a/tests/data/metadata/fence_alom.xml ++++ b/tests/data/metadata/fence_alom.xml +@@ -13,6 +13,11 @@ + + IP Address or Hostname + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -108,6 +113,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_amt.xml b/tests/data/metadata/fence_amt.xml +index b967b68..8524180 100644 +--- a/tests/data/metadata/fence_amt.xml ++++ b/tests/data/metadata/fence_amt.xml +@@ -8,6 +8,11 @@ + + TCP/UDP port to use for connection with device + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -107,6 +112,11 @@ + + Path to amttool binary + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_drac.xml b/tests/data/metadata/fence_drac.xml +index d2871c5..d480669 100644 +--- a/tests/data/metadata/fence_drac.xml ++++ b/tests/data/metadata/fence_drac.xml +@@ -8,6 +8,11 @@ + + TCP/UDP port to use for connection with device + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -18,36 +23,36 @@ + + Forces agent to use IPv6 addresses only + +- +- +- +- Login password or passphrase +- + + + + IP Address or Hostname + +- +- +- +- Fencing Action +- + + + + Forces agent to use IPv4 addresses only + +- +- +- +- Login Name +- + + + + Script to retrieve password + ++ ++ ++ ++ Login password or passphrase ++ ++ ++ ++ ++ Fencing Action ++ ++ ++ ++ ++ Login Name ++ + + + +@@ -68,30 +73,35 @@ + + Display help and exit + ++ ++ ++ ++ Wait X seconds after issuing ON/OFF ++ ++ ++ ++ ++ Wait X seconds for cmd prompt after login ++ + + + + Test X seconds for status change after ON/OFF + +- +- ++ ++ + +- Wait X seconds after issuing ON/OFF ++ Wait X seconds before fencing is started + + + + + Wait X seconds for cmd prompt after issuing command + +- +- +- +- Wait X seconds before fencing is started +- +- +- +- +- Wait X seconds for cmd prompt after login ++ ++ ++ ++ Make "port/plug" to be an alias to IP address + + + +diff --git a/tests/data/metadata/fence_dummy.xml b/tests/data/metadata/fence_dummy.xml +index 61c964e..9295544 100644 +--- a/tests/data/metadata/fence_dummy.xml ++++ b/tests/data/metadata/fence_dummy.xml +@@ -3,6 +3,11 @@ + fence_dummy + http://www.example.com + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -43,11 +48,6 @@ + + Display help and exit + +- +- +- +- Separator for CSV created by operation list +- + + + +@@ -63,6 +63,11 @@ + + Test X seconds for status change after ON/OFF + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_hpblade.xml b/tests/data/metadata/fence_hpblade.xml +index 4f0976b..a8a2b3a 100644 +--- a/tests/data/metadata/fence_hpblade.xml ++++ b/tests/data/metadata/fence_hpblade.xml +@@ -1,6 +1,6 @@ + + +-fence_hpblade is an I/O Fencing agent which can be used with HP BladeSystem. It logs into an enclosure via telnet or ssh and uses the command line interface to power on and off blades. ++fence_hpblade is an I/O Fencing agent which can be used with HP BladeSystem and HP Integrity Superdome X. It logs into the onboard administrator of an enclosure via telnet or ssh and uses the command line interface to power blades or partitions on or off. + http://www.hp.com + + +@@ -100,7 +100,7 @@ + + + +- ++ + Wait X seconds for cmd prompt after login + + +diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml +index dcb3235..41ab729 100644 +--- a/tests/data/metadata/fence_idrac.xml ++++ b/tests/data/metadata/fence_idrac.xml +@@ -12,6 +12,11 @@ + + TCP/UDP port to use for connection with device + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -134,6 +139,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml +index ae7fe9c..bcb3d15 100644 +--- a/tests/data/metadata/fence_ilo.xml ++++ b/tests/data/metadata/fence_ilo.xml +@@ -39,6 +39,11 @@ + + IP Address or Hostname + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -119,6 +124,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml +index 19a31a1..95bf32a 100644 +--- a/tests/data/metadata/fence_ilo2.xml ++++ b/tests/data/metadata/fence_ilo2.xml +@@ -39,6 +39,11 @@ + + IP Address or Hostname + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -119,6 +124,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml +index e6a48bc..e09e5e1 100644 +--- a/tests/data/metadata/fence_ilo3.xml ++++ b/tests/data/metadata/fence_ilo3.xml +@@ -12,6 +12,11 @@ + + TCP/UDP port to use for connection with device + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -134,6 +139,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_ilo3_ssh.xml b/tests/data/metadata/fence_ilo3_ssh.xml +index b3531b2..1bf85e7 100644 +--- a/tests/data/metadata/fence_ilo3_ssh.xml ++++ b/tests/data/metadata/fence_ilo3_ssh.xml +@@ -15,6 +15,11 @@ + + IP Address or Hostname + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -118,6 +123,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml +index e7b0d60..9450e56 100644 +--- a/tests/data/metadata/fence_ilo4.xml ++++ b/tests/data/metadata/fence_ilo4.xml +@@ -12,6 +12,11 @@ + + TCP/UDP port to use for connection with device + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -134,6 +139,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_ilo4_ssh.xml b/tests/data/metadata/fence_ilo4_ssh.xml +index 2266ee1..3779ce7 100644 +--- a/tests/data/metadata/fence_ilo4_ssh.xml ++++ b/tests/data/metadata/fence_ilo4_ssh.xml +@@ -15,6 +15,11 @@ + + IP Address or Hostname + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -118,6 +123,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_ilo_mp.xml b/tests/data/metadata/fence_ilo_mp.xml +index 93503a0..145fb36 100644 +--- a/tests/data/metadata/fence_ilo_mp.xml ++++ b/tests/data/metadata/fence_ilo_mp.xml +@@ -13,6 +13,11 @@ + + IP Address or Hostname + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -108,6 +113,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_ilo_ssh.xml b/tests/data/metadata/fence_ilo_ssh.xml +index a9bd1d3..6eb4ae4 100644 +--- a/tests/data/metadata/fence_ilo_ssh.xml ++++ b/tests/data/metadata/fence_ilo_ssh.xml +@@ -15,6 +15,11 @@ + + IP Address or Hostname + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -118,6 +123,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml +index 8fbdddd..2e7d65c 100644 +--- a/tests/data/metadata/fence_imm.xml ++++ b/tests/data/metadata/fence_imm.xml +@@ -12,6 +12,11 @@ + + TCP/UDP port to use for connection with device + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -134,6 +139,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml +index 199490c..ae528de 100644 +--- a/tests/data/metadata/fence_ipmilan.xml ++++ b/tests/data/metadata/fence_ipmilan.xml +@@ -12,6 +12,11 @@ + + TCP/UDP port to use for connection with device + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -134,6 +139,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml +index c62dd49..ccd41ff 100644 +--- a/tests/data/metadata/fence_mpath.xml ++++ b/tests/data/metadata/fence_mpath.xml +@@ -4,20 +4,25 @@ + The fence_mpath agent works by having an unique key for each pair of node and device that has to be set also in /etc/multipath.conf. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_mpath agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. + https://www.sourceware.org/dm/ + +- +- ++ ++ + +- List of devices to use for current operation. Devices can be comma-separated list of device-mapper multipath devices (eg. /dev/dm-3). Each device must support SCSI-3 persistent reservations. ++ IP address or hostname of fencing device (together with --port-as-ip) ++ ++ ++ ++ ++ Fencing Action + + + + + Key to use for the current operation. This key should be unique to a node and have to be written in /etc/multipath.conf. 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). + +- +- +- +- Fencing Action ++ ++ ++ ++ List of devices to use for current operation. Devices can be comma-separated list of device-mapper multipath devices (eg. /dev/dm-3). Each device must support SCSI-3 persistent reservations. + + + +@@ -39,11 +44,31 @@ The fence_mpath agent works by having an unique key for each pair of node and de + + Display help and exit + ++ ++ ++ ++ Wait X seconds after issuing ON/OFF ++ ++ ++ ++ ++ Wait X seconds for cmd prompt after login ++ ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + + Wait X seconds before fencing is started + ++ ++ ++ ++ Path to mpathpersist binary ++ + + + +@@ -59,21 +84,6 @@ The fence_mpath agent works by having an unique key for each pair of node and de + + Test X seconds for status change after ON/OFF + +- +- +- +- Wait X seconds after issuing ON/OFF +- +- +- +- +- Wait X seconds for cmd prompt after login +- +- +- +- +- Path to mpathpersist binary +- + + + +diff --git a/tests/data/metadata/fence_rsa.xml b/tests/data/metadata/fence_rsa.xml +index 749b21d..aa9caaa 100644 +--- a/tests/data/metadata/fence_rsa.xml ++++ b/tests/data/metadata/fence_rsa.xml +@@ -13,6 +13,11 @@ + + IP Address or Hostname + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -108,6 +113,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +diff --git a/tests/data/metadata/fence_rsb.xml b/tests/data/metadata/fence_rsb.xml +index 56421fc..b400d7e 100644 +--- a/tests/data/metadata/fence_rsb.xml ++++ b/tests/data/metadata/fence_rsb.xml +@@ -13,6 +13,11 @@ + + IP Address or Hostname + ++ ++ ++ ++ IP address or hostname of fencing device (together with --port-as-ip) ++ + + + +@@ -108,6 +113,11 @@ + + Wait X seconds for cmd prompt after issuing command + ++ ++ ++ ++ Make "port/plug" to be an alias to IP address ++ + + + +-- +1.9.3 + diff --git a/SOURCES/bz1214919-fence_scsi-already_on.patch b/SOURCES/bz1214919-fence_scsi-already_on.patch new file mode 100644 index 0000000..6ecbcea --- /dev/null +++ b/SOURCES/bz1214919-fence_scsi-already_on.patch @@ -0,0 +1,35 @@ +From 4e338b93999996f9eae873d7aab84ef30dd0688e Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 17 Jun 2015 19:40:11 +0200 +Subject: [PATCH 03/10] fence_scsi: Status report "off" if any device is off + during "on" action + +We need status to report "on" if any device is on most of the time so +that stonith or other entities can know if a host is capable of +accessing shared resources, but during an "on" action this is +problematic because even if some devices are off, we will skip turning +them on since we reported the status as on. This changes the behavior +to report "off" if any device is off, but only during "on" actions. + +Resolves: rhbz#1214919 +--- + fence/agents/scsi/fence_scsi.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/fence/agents/scsi/fence_scsi.py b/fence/agents/scsi/fence_scsi.py +index de301a5..f373e6b 100644 +--- a/fence/agents/scsi/fence_scsi.py ++++ b/fence/agents/scsi/fence_scsi.py +@@ -32,6 +32,9 @@ def get_status(conn, options): + else: + logging.debug("No registration for key "\ + + options["--key"] + " on device " + dev + "\n") ++ if options["--action"] == "on": ++ status = "off" ++ break + return status + + +-- +1.9.3 + diff --git a/SOURCES/bz1216997-support_for_hp_superdome.patch b/SOURCES/bz1216997-support_for_hp_superdome.patch new file mode 100644 index 0000000..39b221e --- /dev/null +++ b/SOURCES/bz1216997-support_for_hp_superdome.patch @@ -0,0 +1,165 @@ +From 3d712dab6d8b1dc7c011a3d9399c3d278329387f Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 17 Jun 2015 09:30:55 +0200 +Subject: [PATCH 2/6] fence_hpblade: Add support for HP Integrity Superdome X + (BL920s) + +Resolves: rhbz#1216997 +--- + fence/agents/hpblade/fence_hpblade.py | 85 ++++++++++++++++++++++++++++------- + 1 file changed, 68 insertions(+), 17 deletions(-) + +diff --git a/fence/agents/hpblade/fence_hpblade.py b/fence/agents/hpblade/fence_hpblade.py +index e0b8866..832819c 100644 +--- a/fence/agents/hpblade/fence_hpblade.py ++++ b/fence/agents/hpblade/fence_hpblade.py +@@ -3,31 +3,62 @@ + ##### + ## + ## The Following Agent Has Been Tested On: +-## * BladeSystem c7000 Enclosure ++## * HP BladeSystem c7000 Enclosure ++## * HP Integrity Superdome X (BL920s) + ##### + + import sys, re ++import pexpect, exceptions + import atexit + sys.path.append("@FENCEAGENTSLIBDIR@") + from fencing import * + from fencing import fail, EC_STATUS + + #BEGIN_VERSION_GENERATION +-RELEASE_VERSION="New Bladecenter Agent - test release on steroids" +-REDHAT_COPYRIGHT="" +-BUILD_DATE="March, 2008" ++RELEASE_VERSION="4.0.11-HP" ++BUILD_DATE="(built Mon Mar 30 08:31:24 EDT 2015)" ++REDHAT_COPYRIGHT="Copyright (C) Red Hat, Inc. 2004-2010 All rights reserved." + #END_VERSION_GENERATION + ++def get_enclosure_type(conn, options): ++ conn.send_eol("show enclosure info") ++ conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) ++ ++ type_re=re.compile(r"^\s*Enclosure Type: (\w+)(.*?)\s*$") ++ enclosure="unknown" ++ for line in conn.before.splitlines(): ++ res = type_re.search(line) ++ if res != None: ++ enclosure=res.group(1) ++ ++ if enclosure == "unknown": ++ fail(EC_GENERIC_ERROR) ++ ++ return enclosure.lower().strip() ++ + def get_power_status(conn, options): +- conn.send_eol("show server status " + options["--plug"]) ++ if options["enc_type"] == "superdome": ++ cmd_send = "parstatus -M -p " + options["--plug"] ++ powrestr = "^partition:\\d\\s+:\\w+\\s+/(\\w+)\\s.*$" ++ else: ++ cmd_send = "show server status " + options["--plug"] ++ powrestr = "^\\s*Power: (.*?)\\s*$" ++ ++ conn.send_eol(cmd_send) + conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + +- power_re = re.compile(r"^\s*Power: (.*?)\s*$") ++ power_re = re.compile(powrestr) + status = "unknown" + for line in conn.before.splitlines(): + res = power_re.search(line) + if res != None: +- status = res.group(1) ++ if options["enc_type"] == "superdome": ++ if res.group(1) == "DOWN": ++ status = "off" ++ else: ++ status = "on" ++ else: ++ status = res.group(1) + + if status == "unknown": + if options.has_key("--missing-as-off"): +@@ -38,23 +69,37 @@ def get_power_status(conn, options): + return status.lower().strip() + + def set_power_status(conn, options): ++ if options["enc_type"] == "superdome": ++ dev="partition " ++ else: ++ dev="server " ++ + if options["--action"] == "on": +- conn.send_eol("poweron server " + options["--plug"]) ++ conn.send_eol("poweron " + dev + options["--plug"]) + elif options["--action"] == "off": +- conn.send_eol("poweroff server " + options["--plug"] + " force") ++ conn.send_eol("poweroff " + dev + options["--plug"] + " force") + conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + +-def get_blades_list(conn, options): ++def get_instances_list(conn, options): + outlets = {} +- +- conn.send_eol("show server list") ++ if options["enc_type"] == "superdome": ++ cmd_send = "parstatus -P -M" ++ listrestr = "^partition:(\\d+)\\s+:\\w+\\s+/(\\w+)\\s+:OK.*?:(\\w+)\\s*$" ++ else: ++ cmd_send = "show server list" ++ listrestr = "^\\s*(\\d+)\\s+(.*?)\\s+(.*?)\\s+OK\\s+(.*?)\\s+(.*?)\\s*$" ++ ++ conn.send_eol(cmd_send) + conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + +- list_re = re.compile(r"^\s*(.*?)\s+(.*?)\s+(.*?)\s+OK\s+(.*?)\s+(.*?)\s*$") ++ list_re = re.compile(listrestr) + for line in conn.before.splitlines(): + res = list_re.search(line) + if res != None: +- outlets[res.group(1)] = (res.group(2), res.group(4).lower()) ++ if options["enc_type"] == "superdome": ++ outlets[res.group(1)] = (res.group(3), res.group(2).lower()) ++ else: ++ outlets[res.group(1)] = (res.group(2), res.group(4).lower()) + + return outlets + +@@ -64,14 +109,17 @@ def main(): + atexit.register(atexit_handler) + + all_opt["cmd_prompt"]["default"] = ["c7000oa>"] ++ all_opt["login_timeout"]["default"] = "10" + + options = check_input(device_opt, process_input(device_opt)) + + docs = {} + docs["shortdesc"] = "Fence agent for HP BladeSystem" + docs["longdesc"] = "fence_hpblade is an I/O Fencing agent \ +-which can be used with HP BladeSystem. It logs into an enclosure via telnet or ssh \ +-and uses the command line interface to power on and off blades." ++which can be used with HP BladeSystem and HP Integrity Superdome X. \ ++It logs into the onboard administrator of an enclosure via telnet or \ ++ssh and uses the command line interface to power blades or partitions \ ++on or off." + docs["vendorurl"] = "http://www.hp.com" + show_docs(options, docs) + +@@ -80,7 +128,10 @@ and uses the command line interface to power on and off blades." + ###### + options["eol"] = "\n" + conn = fence_login(options) +- result = fence_action(conn, options, set_power_status, get_power_status, get_blades_list) ++ ++ options["enc_type"] = get_enclosure_type(conn, options) ++ ++ result = fence_action(conn, options, set_power_status, get_power_status, get_instances_list) + fence_logout(conn, "exit") + sys.exit(result) + +-- +1.9.3 + diff --git a/SOURCES/bz1241648-fence_ipmilan_password_verbose.patch b/SOURCES/bz1241648-fence_ipmilan_password_verbose.patch new file mode 100644 index 0000000..a509015 --- /dev/null +++ b/SOURCES/bz1241648-fence_ipmilan_password_verbose.patch @@ -0,0 +1,30 @@ +From 48bf31cb12ddca8df530739943744f2da7aa94c8 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Fri, 10 Jul 2015 10:55:23 +0200 +Subject: [PATCH 3/3] fence_ipmilan: Do not print password to debug info + +Resolves: rhbz#1241648 +--- + fence/agents/lib/fencing.py.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 9a16aee..7fddc47 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -1182,7 +1182,11 @@ def run_command(options, command, timeout=None, env=None): + if timeout is not None: + timeout = float(timeout) + +- logging.info("Executing: %s\n", command) ++ # For IPMI password occurs on command line, it should not be part of debug info ++ log_command = command ++ if "ipmitool" in log_command: ++ log_command = re.sub("-P (.+?) -p", "-P [set] -p", log_command) ++ logging.info("Executing: %s\n", log_command) + + try: + process = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) +-- +1.9.3 + diff --git a/SOURCES/bz1250586-2-list_status.patch b/SOURCES/bz1250586-2-list_status.patch new file mode 100644 index 0000000..e55581c --- /dev/null +++ b/SOURCES/bz1250586-2-list_status.patch @@ -0,0 +1,27 @@ +From 9df35db45f9d3e78e4c4e382e85003b02297dd75 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 12 Aug 2015 14:32:07 +0200 +Subject: [PATCH 1/2] fencing: Actions 'list-status' and 'validate-all' were + not documented in manual pages + +--- + fence/agents/lib/fence2man.xsl | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/fence/agents/lib/fence2man.xsl b/fence/agents/lib/fence2man.xsl +index 97786ea..fd923f5 100644 +--- a/fence/agents/lib/fence2man.xsl ++++ b/fence/agents/lib/fence2man.xsl +@@ -33,7 +33,9 @@ + Check the health of fence device + Display the XML metadata describing this resource. + List available plugs with aliases/virtual machines if there is support for more then one device. Returns N/A otherwise. ++List available plugs with aliases/virtual machines and their power state if it can be obtained without additional commands. + This returns the status of the plug/virtual machine. ++Validate if all required parameters are entered. + + The operational behavior of this is not known. + +-- +1.9.3 + diff --git a/SOURCES/bz1250586-list_status.patch b/SOURCES/bz1250586-list_status.patch new file mode 100644 index 0000000..5ad6881 --- /dev/null +++ b/SOURCES/bz1250586-list_status.patch @@ -0,0 +1,777 @@ +From 14d640ebddfd211c6512b5aa29df112a5fa867a4 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 5 Aug 2015 09:57:30 +0200 +Subject: [PATCH 1/4] fencing: Add suport for list-status + +--- + fence/agents/lib/fencing.py.py | 55 +++++++++++++++++------------- + fence/agents/ovh/fence_ovh.py | 3 ++ + tests/data/metadata/fence_alom.xml | 1 + + tests/data/metadata/fence_amt.xml | 1 + + tests/data/metadata/fence_apc.xml | 1 + + tests/data/metadata/fence_apc_snmp.xml | 1 + + tests/data/metadata/fence_bladecenter.xml | 1 + + tests/data/metadata/fence_brocade.xml | 1 + + tests/data/metadata/fence_cisco_mds.xml | 1 + + tests/data/metadata/fence_cisco_ucs.xml | 1 + + tests/data/metadata/fence_compute.xml | 1 + + tests/data/metadata/fence_docker.xml | 1 + + tests/data/metadata/fence_drac.xml | 1 + + tests/data/metadata/fence_drac5.xml | 1 + + tests/data/metadata/fence_dummy.xml | 1 + + tests/data/metadata/fence_eaton_snmp.xml | 1 + + tests/data/metadata/fence_emerson.xml | 1 + + tests/data/metadata/fence_eps.xml | 1 + + tests/data/metadata/fence_hds_cb.xml | 1 + + tests/data/metadata/fence_hpblade.xml | 1 + + tests/data/metadata/fence_ibmblade.xml | 1 + + tests/data/metadata/fence_idrac.xml | 1 + + tests/data/metadata/fence_ifmib.xml | 1 + + tests/data/metadata/fence_ilo.xml | 1 + + tests/data/metadata/fence_ilo2.xml | 1 + + tests/data/metadata/fence_ilo3.xml | 1 + + tests/data/metadata/fence_ilo3_ssh.xml | 1 + + tests/data/metadata/fence_ilo4.xml | 1 + + tests/data/metadata/fence_ilo4_ssh.xml | 1 + + tests/data/metadata/fence_ilo_moonshot.xml | 1 + + tests/data/metadata/fence_ilo_mp.xml | 1 + + tests/data/metadata/fence_ilo_ssh.xml | 1 + + tests/data/metadata/fence_imm.xml | 1 + + tests/data/metadata/fence_intelmodular.xml | 1 + + tests/data/metadata/fence_ipdu.xml | 1 + + tests/data/metadata/fence_ipmilan.xml | 1 + + tests/data/metadata/fence_ldom.xml | 1 + + tests/data/metadata/fence_lpar.xml | 1 + + tests/data/metadata/fence_mpath.xml | 1 + + tests/data/metadata/fence_netio.xml | 1 + + tests/data/metadata/fence_ovh.xml | 1 + + tests/data/metadata/fence_pve.xml | 1 + + tests/data/metadata/fence_raritan.xml | 1 + + tests/data/metadata/fence_rhevm.xml | 1 + + tests/data/metadata/fence_rsa.xml | 1 + + tests/data/metadata/fence_rsb.xml | 1 + + tests/data/metadata/fence_sanbox2.xml | 1 + + tests/data/metadata/fence_scsi.xml | 1 + + tests/data/metadata/fence_virsh.xml | 1 + + tests/data/metadata/fence_vmware_soap.xml | 1 + + tests/data/metadata/fence_wti.xml | 1 + + tests/data/metadata/fence_xenapi.xml | 1 + + tests/data/metadata/fence_zvmip.xml | 1 + + 53 files changed, 85 insertions(+), 24 deletions(-) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 377c63f..89c3379 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -584,6 +584,7 @@ def metadata(avail_opt, options, docs): + if avail_opt.count("no_status") == 0: + print "\t" + print "\t" ++ print "\t" + print "\t" + print "\t" + print "" +@@ -758,7 +759,7 @@ def check_input(device_opt, opt): + ## add loggint to stderr + logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stderr)) + +- acceptable_actions = ["on", "off", "status", "list", "monitor"] ++ acceptable_actions = ["on", "off", "status", "list", "list-status", "monitor"] + if 1 == device_opt.count("fabric_fencing"): + ## Compatibility layer + ##### +@@ -807,7 +808,7 @@ def check_input(device_opt, opt): + if not os.path.isfile(options["--identity-file"]): + fail_usage("Failed: Identity file " + options["--identity-file"] + " does not exist") + +- if (0 == ["list", "monitor"].count(options["--action"])) and \ ++ if (0 == ["list", "list-status", "monitor"].count(options["--action"])) and \ + not options.has_key("--plug") and device_opt.count("port") and \ + device_opt.count("no_port") == 0 and not device_opt.count("port_as_ip"): + fail_usage("Failed: You have to enter plug number or machine identification") +@@ -923,28 +924,34 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list=None, + + ## Process options that manipulate fencing device + ##### +- if options["--action"] == "list" and 0 == options["device_opt"].count("port"): +- print "N/A" +- return +- elif options["--action"] == "list" and get_outlet_list == None: +- ## @todo: exception? +- ## This is just temporal solution, we will remove default value +- ## None as soon as all existing agent will support this operation +- print "NOTICE: List option is not working on this device yet" +- return +- elif (options["--action"] == "list") or \ +- ((options["--action"] == "monitor") and 1 == options["device_opt"].count("port")): +- options["--original-action"] = options["--action"] +- options["--action"] = "list" +- outlets = get_outlet_list(tn, options) +- options["--action"] = options["--original-action"] +- del options["--original-action"] +- +- ## keys can be numbers (port numbers) or strings (names of VM) +- for outlet_id in outlets.keys(): +- (alias, status) = outlets[outlet_id] +- if options["--action"] != "monitor": +- print outlet_id + options["--separator"] + alias ++ if options["--action"] in ["list", "list-status"] or \ ++ ((options["--action"] == "monitor") and 1 == options["device_opt"].count("port")): ++ ++ if 0 == options["device_opt"].count("port"): ++ print "N/A" ++ elif get_outlet_list == None: ++ ## @todo: exception? ++ ## This is just temporal solution, we will remove default value ++ ## None as soon as all existing agent will support this operation ++ print "NOTICE: List option is not working on this device yet" ++ else: ++ options["--original-action"] = options["--action"] ++ options["--action"] = "list" ++ outlets = get_outlet_list(tn, options) ++ options["--action"] = options["--original-action"] ++ del options["--original-action"] ++ ++ ## keys can be numbers (port numbers) or strings (names of VM) ++ for outlet_id in outlets.keys(): ++ (alias, status) = outlets[outlet_id] ++ status = status.upper() ++ if not status in ["ON", "OFF"]: ++ status = "UNKNOWN" ++ ++ if options["--action"] == "list": ++ print outlet_id + options["--separator"] + alias ++ elif options["--action"] == "list-status": ++ print outlet_id + options["--separator"] + alias + options["--separator"] + status + return + + status = get_multi_power_fn(tn, options, get_power_fn) +diff --git a/fence/agents/ovh/fence_ovh.py b/fence/agents/ovh/fence_ovh.py +index 14a0706..1fef7e3 100644 +--- a/fence/agents/ovh/fence_ovh.py ++++ b/fence/agents/ovh/fence_ovh.py +@@ -97,6 +97,9 @@ Poweroff is simulated with a reboot into rescue-pro mode." + if options["--action"] == "list": + fail_usage("Action 'list' is not supported in this fence agent") + ++ if options["--action"] == "list-status": ++ fail_usage("Action 'list-status' is not supported in this fence agent") ++ + if options["--action"] != "monitor" and not options["--plug"].endswith(".ovh.net"): + options["--plug"] += ".ovh.net" + +diff --git a/tests/data/metadata/fence_alom.xml b/tests/data/metadata/fence_alom.xml +index 32e6630..dfbe431 100644 +--- a/tests/data/metadata/fence_alom.xml ++++ b/tests/data/metadata/fence_alom.xml +@@ -130,6 +130,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_amt.xml b/tests/data/metadata/fence_amt.xml +index 8524180..17e38fc 100644 +--- a/tests/data/metadata/fence_amt.xml ++++ b/tests/data/metadata/fence_amt.xml +@@ -134,6 +134,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_apc.xml b/tests/data/metadata/fence_apc.xml +index 441de61..8233101 100644 +--- a/tests/data/metadata/fence_apc.xml ++++ b/tests/data/metadata/fence_apc.xml +@@ -135,6 +135,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_apc_snmp.xml b/tests/data/metadata/fence_apc_snmp.xml +index 886f1b0..d433735 100644 +--- a/tests/data/metadata/fence_apc_snmp.xml ++++ b/tests/data/metadata/fence_apc_snmp.xml +@@ -159,6 +159,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_bladecenter.xml b/tests/data/metadata/fence_bladecenter.xml +index ec1b011..7058c18 100644 +--- a/tests/data/metadata/fence_bladecenter.xml ++++ b/tests/data/metadata/fence_bladecenter.xml +@@ -135,6 +135,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_brocade.xml b/tests/data/metadata/fence_brocade.xml +index 5373d0e..6f69230 100644 +--- a/tests/data/metadata/fence_brocade.xml ++++ b/tests/data/metadata/fence_brocade.xml +@@ -129,6 +129,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_cisco_mds.xml b/tests/data/metadata/fence_cisco_mds.xml +index add75f3..df4aa61 100644 +--- a/tests/data/metadata/fence_cisco_mds.xml ++++ b/tests/data/metadata/fence_cisco_mds.xml +@@ -158,6 +158,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml +index 66fc576..9834f5a 100644 +--- a/tests/data/metadata/fence_cisco_ucs.xml ++++ b/tests/data/metadata/fence_cisco_ucs.xml +@@ -135,6 +135,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml +index 2c488c5..846a861 100644 +--- a/tests/data/metadata/fence_compute.xml ++++ b/tests/data/metadata/fence_compute.xml +@@ -120,6 +120,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml +index d100b8c..2c2261a 100644 +--- a/tests/data/metadata/fence_docker.xml ++++ b/tests/data/metadata/fence_docker.xml +@@ -133,6 +133,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_drac.xml b/tests/data/metadata/fence_drac.xml +index d480669..37697f7 100644 +--- a/tests/data/metadata/fence_drac.xml ++++ b/tests/data/metadata/fence_drac.xml +@@ -115,6 +115,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_drac5.xml b/tests/data/metadata/fence_drac5.xml +index d96484c..c1a78aa 100644 +--- a/tests/data/metadata/fence_drac5.xml ++++ b/tests/data/metadata/fence_drac5.xml +@@ -139,6 +139,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_dummy.xml b/tests/data/metadata/fence_dummy.xml +index 9295544..eb31244 100644 +--- a/tests/data/metadata/fence_dummy.xml ++++ b/tests/data/metadata/fence_dummy.xml +@@ -90,6 +90,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_eaton_snmp.xml b/tests/data/metadata/fence_eaton_snmp.xml +index 1cf0436..7bbe054 100644 +--- a/tests/data/metadata/fence_eaton_snmp.xml ++++ b/tests/data/metadata/fence_eaton_snmp.xml +@@ -159,6 +159,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml +index 553fc37..b79186c 100644 +--- a/tests/data/metadata/fence_emerson.xml ++++ b/tests/data/metadata/fence_emerson.xml +@@ -159,6 +159,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_eps.xml b/tests/data/metadata/fence_eps.xml +index a64ce8e..fcf72b8 100644 +--- a/tests/data/metadata/fence_eps.xml ++++ b/tests/data/metadata/fence_eps.xml +@@ -117,6 +117,7 @@ Agent basically works by connecting to hidden page and pass appropriate argument + + + ++ + + + +diff --git a/tests/data/metadata/fence_hds_cb.xml b/tests/data/metadata/fence_hds_cb.xml +index 8f5279a..3230916 100644 +--- a/tests/data/metadata/fence_hds_cb.xml ++++ b/tests/data/metadata/fence_hds_cb.xml +@@ -135,6 +135,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_hpblade.xml b/tests/data/metadata/fence_hpblade.xml +index a8a2b3a..a9948c7 100644 +--- a/tests/data/metadata/fence_hpblade.xml ++++ b/tests/data/metadata/fence_hpblade.xml +@@ -135,6 +135,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ibmblade.xml b/tests/data/metadata/fence_ibmblade.xml +index 4731e5e..175df9b 100644 +--- a/tests/data/metadata/fence_ibmblade.xml ++++ b/tests/data/metadata/fence_ibmblade.xml +@@ -159,6 +159,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml +index 41ab729..b742161 100644 +--- a/tests/data/metadata/fence_idrac.xml ++++ b/tests/data/metadata/fence_idrac.xml +@@ -161,6 +161,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ifmib.xml b/tests/data/metadata/fence_ifmib.xml +index 7faf2ab..49de1b3 100644 +--- a/tests/data/metadata/fence_ifmib.xml ++++ b/tests/data/metadata/fence_ifmib.xml +@@ -160,6 +160,7 @@ It was written with managed ethernet switches in mind, in order to fence iSCSI S + + + ++ + + + +diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml +index bcb3d15..891b7f1 100644 +--- a/tests/data/metadata/fence_ilo.xml ++++ b/tests/data/metadata/fence_ilo.xml +@@ -141,6 +141,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml +index 95bf32a..7ff697f 100644 +--- a/tests/data/metadata/fence_ilo2.xml ++++ b/tests/data/metadata/fence_ilo2.xml +@@ -141,6 +141,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml +index e09e5e1..05fd01c 100644 +--- a/tests/data/metadata/fence_ilo3.xml ++++ b/tests/data/metadata/fence_ilo3.xml +@@ -161,6 +161,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ilo3_ssh.xml b/tests/data/metadata/fence_ilo3_ssh.xml +index 1bf85e7..ebdae65 100644 +--- a/tests/data/metadata/fence_ilo3_ssh.xml ++++ b/tests/data/metadata/fence_ilo3_ssh.xml +@@ -140,6 +140,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml +index 9450e56..4f29073 100644 +--- a/tests/data/metadata/fence_ilo4.xml ++++ b/tests/data/metadata/fence_ilo4.xml +@@ -161,6 +161,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ilo4_ssh.xml b/tests/data/metadata/fence_ilo4_ssh.xml +index 3779ce7..197d627 100644 +--- a/tests/data/metadata/fence_ilo4_ssh.xml ++++ b/tests/data/metadata/fence_ilo4_ssh.xml +@@ -140,6 +140,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ilo_moonshot.xml b/tests/data/metadata/fence_ilo_moonshot.xml +index d7f2bc9..41303e2 100644 +--- a/tests/data/metadata/fence_ilo_moonshot.xml ++++ b/tests/data/metadata/fence_ilo_moonshot.xml +@@ -130,6 +130,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ilo_mp.xml b/tests/data/metadata/fence_ilo_mp.xml +index 145fb36..d2396e9 100644 +--- a/tests/data/metadata/fence_ilo_mp.xml ++++ b/tests/data/metadata/fence_ilo_mp.xml +@@ -130,6 +130,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ilo_ssh.xml b/tests/data/metadata/fence_ilo_ssh.xml +index 6eb4ae4..1d79308 100644 +--- a/tests/data/metadata/fence_ilo_ssh.xml ++++ b/tests/data/metadata/fence_ilo_ssh.xml +@@ -140,6 +140,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml +index 2e7d65c..0302f84 100644 +--- a/tests/data/metadata/fence_imm.xml ++++ b/tests/data/metadata/fence_imm.xml +@@ -161,6 +161,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_intelmodular.xml b/tests/data/metadata/fence_intelmodular.xml +index 707b37a..9d33115 100644 +--- a/tests/data/metadata/fence_intelmodular.xml ++++ b/tests/data/metadata/fence_intelmodular.xml +@@ -161,6 +161,7 @@ Note: Since firmware update version 2.7, SNMP v2 write support is removed, and r + + + ++ + + + +diff --git a/tests/data/metadata/fence_ipdu.xml b/tests/data/metadata/fence_ipdu.xml +index 66fa768..f656c1c 100644 +--- a/tests/data/metadata/fence_ipdu.xml ++++ b/tests/data/metadata/fence_ipdu.xml +@@ -159,6 +159,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml +index ae528de..4ed67eb 100644 +--- a/tests/data/metadata/fence_ipmilan.xml ++++ b/tests/data/metadata/fence_ipmilan.xml +@@ -161,6 +161,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ldom.xml b/tests/data/metadata/fence_ldom.xml +index 082fd82..bab164a 100644 +--- a/tests/data/metadata/fence_ldom.xml ++++ b/tests/data/metadata/fence_ldom.xml +@@ -132,6 +132,7 @@ Very useful parameter is -c (or cmd_prompt in stdin mode). This must be set to s + + + ++ + + + +diff --git a/tests/data/metadata/fence_lpar.xml b/tests/data/metadata/fence_lpar.xml +index 9b6d62d..8c82925 100644 +--- a/tests/data/metadata/fence_lpar.xml ++++ b/tests/data/metadata/fence_lpar.xml +@@ -143,6 +143,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml +index ccd41ff..d3de9d5 100644 +--- a/tests/data/metadata/fence_mpath.xml ++++ b/tests/data/metadata/fence_mpath.xml +@@ -100,6 +100,7 @@ The fence_mpath agent works by having an unique key for each pair of node and de + + + ++ + + + +diff --git a/tests/data/metadata/fence_netio.xml b/tests/data/metadata/fence_netio.xml +index f47238c..94db07e 100644 +--- a/tests/data/metadata/fence_netio.xml ++++ b/tests/data/metadata/fence_netio.xml +@@ -110,6 +110,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_ovh.xml b/tests/data/metadata/fence_ovh.xml +index 522da6c..bf7ebfe 100644 +--- a/tests/data/metadata/fence_ovh.xml ++++ b/tests/data/metadata/fence_ovh.xml +@@ -94,6 +94,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_pve.xml b/tests/data/metadata/fence_pve.xml +index 86c3cd7..99894e5 100644 +--- a/tests/data/metadata/fence_pve.xml ++++ b/tests/data/metadata/fence_pve.xml +@@ -115,6 +115,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_raritan.xml b/tests/data/metadata/fence_raritan.xml +index e970b99..d3a0d50 100644 +--- a/tests/data/metadata/fence_raritan.xml ++++ b/tests/data/metadata/fence_raritan.xml +@@ -110,6 +110,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml +index e0c9516..aa033eb 100644 +--- a/tests/data/metadata/fence_rhevm.xml ++++ b/tests/data/metadata/fence_rhevm.xml +@@ -135,6 +135,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_rsa.xml b/tests/data/metadata/fence_rsa.xml +index aa9caaa..3f3a336 100644 +--- a/tests/data/metadata/fence_rsa.xml ++++ b/tests/data/metadata/fence_rsa.xml +@@ -130,6 +130,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_rsb.xml b/tests/data/metadata/fence_rsb.xml +index b400d7e..36b9cdb 100644 +--- a/tests/data/metadata/fence_rsb.xml ++++ b/tests/data/metadata/fence_rsb.xml +@@ -130,6 +130,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_sanbox2.xml b/tests/data/metadata/fence_sanbox2.xml +index 06826b6..950c629 100644 +--- a/tests/data/metadata/fence_sanbox2.xml ++++ b/tests/data/metadata/fence_sanbox2.xml +@@ -114,6 +114,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml +index ba80e8c..d370e36 100644 +--- a/tests/data/metadata/fence_scsi.xml ++++ b/tests/data/metadata/fence_scsi.xml +@@ -110,6 +110,7 @@ The fence_scsi agent works by having each node in the cluster register a unique + + + ++ + + + +diff --git a/tests/data/metadata/fence_virsh.xml b/tests/data/metadata/fence_virsh.xml +index 5febd77..3546a2c 100644 +--- a/tests/data/metadata/fence_virsh.xml ++++ b/tests/data/metadata/fence_virsh.xml +@@ -137,6 +137,7 @@ By default, virsh needs root account to do properly work. So you must allow ssh + + + ++ + + + +diff --git a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml +index 1308c85..fb54ef7 100644 +--- a/tests/data/metadata/fence_vmware_soap.xml ++++ b/tests/data/metadata/fence_vmware_soap.xml +@@ -132,6 +132,7 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g + + + ++ + + + +diff --git a/tests/data/metadata/fence_wti.xml b/tests/data/metadata/fence_wti.xml +index c7cb9d1..5f2566a 100644 +--- a/tests/data/metadata/fence_wti.xml ++++ b/tests/data/metadata/fence_wti.xml +@@ -130,6 +130,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_xenapi.xml b/tests/data/metadata/fence_xenapi.xml +index 0dd0a78..6040e85 100644 +--- a/tests/data/metadata/fence_xenapi.xml ++++ b/tests/data/metadata/fence_xenapi.xml +@@ -95,6 +95,7 @@ + + + ++ + + + +diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml +index 993dfb3..c688f42 100644 +--- a/tests/data/metadata/fence_zvmip.xml ++++ b/tests/data/metadata/fence_zvmip.xml +@@ -137,6 +137,7 @@ Where XXXXXXX is the name of the virtual machine used in the authuser field of t + + + ++ + + + +-- +1.9.3 + diff --git a/SOURCES/bz1251491-none_as_state.patch b/SOURCES/bz1251491-none_as_state.patch new file mode 100644 index 0000000..e8897ab --- /dev/null +++ b/SOURCES/bz1251491-none_as_state.patch @@ -0,0 +1,33 @@ +From 76ddf8b54482ef4702abc35611cf1c0250c62dcd Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 10 Aug 2015 13:17:07 +0200 +Subject: [PATCH] fencing: Fence library should work correctly also when power + state is None + +Previously, valid states ON/OFF were accepted and all other values were mapped to UNKNOWN. But if value is None then +it is not possible to do state.upper() and fencing fails. + +Resolves: rhbz#1251491 +--- + fence/agents/lib/fencing.py.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index fb7b77d..3a6e2ab 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -951,9 +951,9 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list=None, + ## keys can be numbers (port numbers) or strings (names of VM) + for outlet_id in outlets.keys(): + (alias, status) = outlets[outlet_id] +- status = status.upper() +- if not status in ["ON", "OFF"]: ++ if status is None or (not status.upper() in ["ON", "OFF"]): + status = "UNKNOWN" ++ status = status.upper() + + if options["--action"] == "list": + print outlet_id + options["--separator"] + alias +-- +1.9.3 + diff --git a/SOURCES/bz1256908-fence_ilo-tls_negotiation.patch b/SOURCES/bz1256908-fence_ilo-tls_negotiation.patch new file mode 100644 index 0000000..f173727 --- /dev/null +++ b/SOURCES/bz1256908-fence_ilo-tls_negotiation.patch @@ -0,0 +1,36 @@ +commit 1fe05064d950c24b6bb180170d314915c25331ec +Author: Marek 'marx' Grac +Date: Wed Aug 26 16:24:30 2015 +0200 + + fence_ilo: If gnutls can not open connection than --tls1.0 is tried in second attempt + + Resolves: rhbz#1256908 + +diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py +index 047040b..d52b7a7 100644 +--- a/fence/agents/ilo/fence_ilo.py ++++ b/fence/agents/ilo/fence_ilo.py +@@ -95,6 +95,23 @@ the iLO card through an XML stream." + try: + conn.send("\r\n") + conn.log_expect(options, ["", ""], int(options["--login-timeout"])) ++ except pexpect.TIMEOUT: ++ fail(EC_LOGIN_DENIED) ++ except pexpect.EOF: ++ if "--tls1.0" in options: ++ fail(EC_LOGIN_DENIED) ++ options["--tls1.0"] = "1" ++ conn.close() ++ conn = fence_login(options) ++ try: ++ conn.send("\r\n") ++ conn.log_expect(options, ["", ""], int(options["--login-timeout"])) ++ except pexpect.TIMEOUT: ++ fail(EC_LOGIN_DENIED) ++ except pexpect.EOF: ++ fail(EC_LOGIN_DENIED) ++ ++ try: + version = re.compile(" +Date: Wed, 2 Sep 2015 14:35:23 +0200 +Subject: [PATCH 1/3] fence_ipmilan: Restore deprecated option -i which is + alias to -a / --ip + +Resolves: rhbz#1257137 +--- + fence/agents/ipmilan/fence_ipmilan.py | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py +index 8490837..8224b83 100644 +--- a/fence/agents/ipmilan/fence_ipmilan.py ++++ b/fence/agents/ipmilan/fence_ipmilan.py +@@ -119,12 +119,18 @@ def define_new_opts(): + "default" : "@IPMITOOL_PATH@", + "order": 200 + } ++ all_opt["obsolete_ip"] = { ++ "getopt" : "i:", ++ "longopt" : "obsolete-ip", ++ "help" : "", ++ "order" : 1 ++ } + + def main(): + atexit.register(atexit_handler) + +- device_opt = ["ipaddr", "login", "no_login", "no_password", "passwd", +- "lanplus", "auth", "cipher", "privlvl", "sudo", "ipmitool_path", "method"] ++ device_opt = ["ipaddr", "ipport", "login", "no_login", "no_password", "passwd", ++ "lanplus", "auth", "cipher", "privlvl", "sudo", "ipmitool_path", "method", "obsolete_ip"] + define_new_opts() + + if os.path.basename(sys.argv[0]) == "fence_ilo3": +@@ -136,7 +142,11 @@ def main(): + + all_opt["ipport"]["default"] = "623" + +- options = check_input(device_opt, process_input(device_opt)) ++ pi = process_input(device_opt) ++ # Accept also deprecated option but do not propagate it at all ++ if "--obsolete-ip" in pi: ++ pi["--ip"] = pi["--obsolete-ip"] ++ options = check_input(device_opt, pi) + + docs = {} + docs["shortdesc"] = "Fence agent for IPMI" +-- +1.9.3 + diff --git a/SOURCES/bz1257137-2-fence_ipmilan_regression.patch b/SOURCES/bz1257137-2-fence_ipmilan_regression.patch new file mode 100644 index 0000000..03cd96f --- /dev/null +++ b/SOURCES/bz1257137-2-fence_ipmilan_regression.patch @@ -0,0 +1,325 @@ +From 4b06b842e57f80bda87ec57b9e0e047fe89ad25f Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 26 Aug 2015 12:54:47 +0200 +Subject: [PATCH 2/3] fence_ipmilan: Re-introduce -t / timeout option + +In the new fence agent this option was replaced by --*-timeout but old +option should work as before. It sets all *-timeout to a value 'timeout' + +Resolves: rhbz#1257137 +--- + fence/agents/ipmilan/fence_ipmilan.py | 16 +++++++++++++++- + tests/data/metadata/fence_idrac.xml | 23 ++++++++++++++--------- + tests/data/metadata/fence_ilo3.xml | 23 ++++++++++++++--------- + tests/data/metadata/fence_ilo4.xml | 23 ++++++++++++++--------- + tests/data/metadata/fence_imm.xml | 23 ++++++++++++++--------- + tests/data/metadata/fence_ipmilan.xml | 23 ++++++++++++++--------- + 6 files changed, 85 insertions(+), 46 deletions(-) + +diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py +index 8224b83..fd04110 100644 +--- a/fence/agents/ipmilan/fence_ipmilan.py ++++ b/fence/agents/ipmilan/fence_ipmilan.py +@@ -125,12 +125,21 @@ def define_new_opts(): + "help" : "", + "order" : 1 + } ++ all_opt["timeout"] = { ++ "getopt" : "t:", ++ "longopt" : "timeout", ++ "help" : "-t [seconds] Timeout (sec) for IPMI operation", ++ "required" : "0", ++ "shortdesc" : "Timeout (sec) for IPMI operation", ++ "order" : 1 ++ } + + def main(): + atexit.register(atexit_handler) + + device_opt = ["ipaddr", "ipport", "login", "no_login", "no_password", "passwd", +- "lanplus", "auth", "cipher", "privlvl", "sudo", "ipmitool_path", "method", "obsolete_ip"] ++ "lanplus", "auth", "cipher", "privlvl", "sudo", "ipmitool_path", "method", ++ "obsolete_ip", "timeout"] + define_new_opts() + + if os.path.basename(sys.argv[0]) == "fence_ilo3": +@@ -148,6 +157,11 @@ def main(): + pi["--ip"] = pi["--obsolete-ip"] + options = check_input(device_opt, pi) + ++ if "--timeout" in options: ++ options["--shell-timeout"] = options["--timeout"] ++ options["--power-timeout"] = options["--timeout"] ++ options["--login-timeout"] = options["--timeout"] ++ + docs = {} + docs["shortdesc"] = "Fence agent for IPMI" + docs["longdesc"] = "fence_ipmilan is an I/O Fencing agent\ +diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml +index 0aced2a..6e0b834 100644 +--- a/tests/data/metadata/fence_idrac.xml ++++ b/tests/data/metadata/fence_idrac.xml +@@ -64,6 +64,11 @@ + + IPMI Lan Auth type. + ++ ++ ++ ++ Fencing Action ++ + + + +@@ -79,10 +84,10 @@ + + Privilege level on IPMI device + +- +- +- +- Fencing Action ++ ++ ++ ++ Timeout (sec) for IPMI operation + + + +@@ -119,16 +124,16 @@ + + Wait X seconds for cmd prompt after login + +- +- +- +- Test X seconds for status change after ON/OFF +- + + + + Wait X seconds before fencing is started + ++ ++ ++ ++ Test X seconds for status change after ON/OFF ++ + + + +diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml +index 67e869b..1253539 100644 +--- a/tests/data/metadata/fence_ilo3.xml ++++ b/tests/data/metadata/fence_ilo3.xml +@@ -64,6 +64,11 @@ + + IPMI Lan Auth type. + ++ ++ ++ ++ Fencing Action ++ + + + +@@ -79,10 +84,10 @@ + + Privilege level on IPMI device + +- +- +- +- Fencing Action ++ ++ ++ ++ Timeout (sec) for IPMI operation + + + +@@ -119,16 +124,16 @@ + + Wait X seconds for cmd prompt after login + +- +- +- +- Test X seconds for status change after ON/OFF +- + + + + Wait X seconds before fencing is started + ++ ++ ++ ++ Test X seconds for status change after ON/OFF ++ + + + +diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml +index b7dd31a..6498be8 100644 +--- a/tests/data/metadata/fence_ilo4.xml ++++ b/tests/data/metadata/fence_ilo4.xml +@@ -64,6 +64,11 @@ + + IPMI Lan Auth type. + ++ ++ ++ ++ Fencing Action ++ + + + +@@ -79,10 +84,10 @@ + + Privilege level on IPMI device + +- +- +- +- Fencing Action ++ ++ ++ ++ Timeout (sec) for IPMI operation + + + +@@ -119,16 +124,16 @@ + + Wait X seconds for cmd prompt after login + +- +- +- +- Test X seconds for status change after ON/OFF +- + + + + Wait X seconds before fencing is started + ++ ++ ++ ++ Test X seconds for status change after ON/OFF ++ + + + +diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml +index 0e7588d..e6d67bc 100644 +--- a/tests/data/metadata/fence_imm.xml ++++ b/tests/data/metadata/fence_imm.xml +@@ -64,6 +64,11 @@ + + IPMI Lan Auth type. + ++ ++ ++ ++ Fencing Action ++ + + + +@@ -79,10 +84,10 @@ + + Privilege level on IPMI device + +- +- +- +- Fencing Action ++ ++ ++ ++ Timeout (sec) for IPMI operation + + + +@@ -119,16 +124,16 @@ + + Wait X seconds for cmd prompt after login + +- +- +- +- Test X seconds for status change after ON/OFF +- + + + + Wait X seconds before fencing is started + ++ ++ ++ ++ Test X seconds for status change after ON/OFF ++ + + + +diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml +index 443365c..97edfbb 100644 +--- a/tests/data/metadata/fence_ipmilan.xml ++++ b/tests/data/metadata/fence_ipmilan.xml +@@ -64,6 +64,11 @@ + + IPMI Lan Auth type. + ++ ++ ++ ++ Fencing Action ++ + + + +@@ -79,10 +84,10 @@ + + Privilege level on IPMI device + +- +- +- +- Fencing Action ++ ++ ++ ++ Timeout (sec) for IPMI operation + + + +@@ -119,16 +124,16 @@ + + Wait X seconds for cmd prompt after login + +- +- +- +- Test X seconds for status change after ON/OFF +- + + + + Wait X seconds before fencing is started + ++ ++ ++ ++ Test X seconds for status change after ON/OFF ++ + + + +-- +1.9.3 + diff --git a/SOURCES/bz1257137-3-fence_ipmilan_regression.patch b/SOURCES/bz1257137-3-fence_ipmilan_regression.patch new file mode 100644 index 0000000..8791b2d --- /dev/null +++ b/SOURCES/bz1257137-3-fence_ipmilan_regression.patch @@ -0,0 +1,26 @@ +From 4dfb294646685e0e920b485b1fce2c6441918c19 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Thu, 17 Sep 2015 23:24:28 +0200 +Subject: [PATCH] fence_ipmilan: -i was used twice in fence_ipmilan + +-i was not propagated as --ipmitool-path so we have removed it. +--- + fence/agents/ipmilan/fence_ipmilan.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py +index fd04110..4c9eea8 100644 +--- a/fence/agents/ipmilan/fence_ipmilan.py ++++ b/fence/agents/ipmilan/fence_ipmilan.py +@@ -111,7 +111,7 @@ def define_new_opts(): + "order": 1 + } + all_opt["ipmitool_path"] = { +- "getopt" : "i:", ++ "getopt" : ":", + "longopt" : "ipmitool-path", + "help" : "--ipmitool-path=[path] Path to ipmitool binary", + "required" : "0", +-- +1.9.3 + diff --git a/SOURCES/bz1259319-fence_apc_v6.patch b/SOURCES/bz1259319-fence_apc_v6.patch new file mode 100644 index 0000000..2fcbcdc --- /dev/null +++ b/SOURCES/bz1259319-fence_apc_v6.patch @@ -0,0 +1,44 @@ +From ea8cc4949d562b75822d9362808cf3d333fb6d92 Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Mon, 14 Sep 2015 13:27:45 +0200 +Subject: [PATCH] fence_apc: Support for v6.x firmware + +There are no changes in interface, so it is enough to accept new version number. +Login process over telnet has changed a bit and autodection of EOL did not work properly. Relevant part +of changed so it work correctly when after empty 'User Name', the device ask for it again. + +Resolves: rhbz#1259319 +--- + fence/agents/apc/fence_apc.py | 2 +- + fence/agents/lib/fencing.py.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py +index 83bfe07..b77d36e 100644 +--- a/fence/agents/apc/fence_apc.py ++++ b/fence/agents/apc/fence_apc.py +@@ -247,7 +247,7 @@ will block any necessary fencing actions." + #### + result = -1 + firmware_version = re.compile(r'\s*v(\d)*\.').search(conn.before) +- if (firmware_version != None) and (firmware_version.group(1) == "5"): ++ if (firmware_version != None) and (firmware_version.group(1) in [ "5", "6" ]): + result = fence_action(conn, options, set_power_status5, get_power_status5, get_power_status5) + else: + result = fence_action(conn, options, set_power_status, get_power_status, get_power_status) +diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py +index 7fddc47..fe602a5 100644 +--- a/fence/agents/lib/fencing.py.py ++++ b/fence/agents/lib/fencing.py.py +@@ -1153,7 +1153,7 @@ def fence_login(options, re_login_string=r"(login\s*: )|(Login Name: )|(usernam + conn.send_eol("") + screen = conn.read_nonblocking(size=100, timeout=int(options["--shell-timeout"])) + ## after sending EOL the fence device can either show 'Login' or 'Password' +- if re_login.search(screen) != None: ++ if re_login.search(conn.after + screen) != None: + conn.send_eol("") + conn.send_eol(options["--username"]) + conn.log_expect(options, re_pass, int(options["--login-timeout"])) +-- +2.4.3 + diff --git a/SOURCES/bz1274432-fence_brocade-fix_incorrect_return.patch b/SOURCES/bz1274432-fence_brocade-fix_incorrect_return.patch new file mode 100644 index 0000000..44ee2ce --- /dev/null +++ b/SOURCES/bz1274432-fence_brocade-fix_incorrect_return.patch @@ -0,0 +1,26 @@ +From 43b32a3bc37e49c9e5e4a68228e6dc845c79a2c4 Mon Sep 17 00:00:00 2001 +From: John Ruemker +Date: Thu, 22 Oct 2015 13:30:42 -0400 +Subject: [PATCH 2/2] fence_brocade: Fix incorrect return when getting status + for "on", "off" + +--- + fence/agents/brocade/fence_brocade.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py +index e5a5063..5257bcc 100644 +--- a/fence/agents/brocade/fence_brocade.py ++++ b/fence/agents/brocade/fence_brocade.py +@@ -36,7 +36,7 @@ def get_power_status(conn, options): + status = "off" if len(tokens) > 7 and tokens[7] == "Disabled" else "on" + outlets[tokens[0]] = ("", status) + +- if options["--action"] == "status": ++ if ["list", "monitor"].count(options["--action"]) == 0: + (_, status) = outlets[options["--plug"]] + return status + else: +-- +2.4.3 + diff --git a/SOURCES/test-01-fix_xml_metadata.patch b/SOURCES/test-01-fix_xml_metadata.patch new file mode 100644 index 0000000..2941a57 --- /dev/null +++ b/SOURCES/test-01-fix_xml_metadata.patch @@ -0,0 +1,82 @@ +From 7614464c6a7df9512643b62048481d66dc1f989c Mon Sep 17 00:00:00 2001 +From: Marek 'marx' Grac +Date: Wed, 17 Jun 2015 19:20:10 +0200 +Subject: [PATCH 01/10] testing: Fix XML metadata + +--- + tests/data/metadata/fence_cisco_ucs.xml | 2 +- + tests/data/metadata/fence_compute.xml | 10 +++++----- + tests/data/metadata/fence_rhevm.xml | 2 +- + tests/data/metadata/fence_vmware_soap.xml | 2 +- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml +index 75e45ce..66fc576 100644 +--- a/tests/data/metadata/fence_cisco_ucs.xml ++++ b/tests/data/metadata/fence_cisco_ucs.xml +@@ -11,7 +11,7 @@ + + + +- Disable TLS negotiation ++ Disable TLS negotiation, force SSL 3.0 + + + +diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml +index ff7c06c..f9b97fc 100644 +--- a/tests/data/metadata/fence_compute.xml ++++ b/tests/data/metadata/fence_compute.xml +@@ -23,6 +23,11 @@ + + Login password or passphrase + ++ ++ ++ ++ Nova Endpoint type ++ + + + +@@ -48,11 +53,6 @@ + + Disable functionality for dealing with shared storage + +- +- +- +- Path to nova binary +- + + + +diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml +index c9d6eeb..1eccd26 100644 +--- a/tests/data/metadata/fence_rhevm.xml ++++ b/tests/data/metadata/fence_rhevm.xml +@@ -11,7 +11,7 @@ + + + +- Disable TLS negotiation ++ Disable TLS negotiation, force SSL 3.0 + + + +diff --git a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml +index d0a465f..1308c85 100644 +--- a/tests/data/metadata/fence_vmware_soap.xml ++++ b/tests/data/metadata/fence_vmware_soap.xml +@@ -13,7 +13,7 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g + + + +- Disable TLS negotiation ++ Disable TLS negotiation, force SSL 3.0 + + + +-- +1.9.3 + diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index ade5367..7ea0dbb 100644 --- a/SPECS/fence-agents.spec +++ b/SPECS/fence-agents.spec @@ -16,7 +16,7 @@ Name: fence-agents Summary: Fence Agents for Red Hat Cluster Version: 4.0.11 -Release: 13%{?alphatag:.%{alphatag}}%{?dist}.2 +Release: 27%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: http://sourceware.org/cluster/wiki/ @@ -47,16 +47,52 @@ Patch22: bz1214359-1-fence_compute.patch Patch23: bz1214359-2-fence_compute.patch Patch24: bz1214359-3-fence_compute.patch Patch25: bz1214359-4-fence_compute.patch -Patch26: bz1214359-5-fence_compute.patch -Patch27: bz1214359-6-fence_compute.patch -Patch28: bz1213571-fence_scsi-add_monitor.patch -Patch29: bz1243485-1-fence_scsi-force-on.patch -Patch30: bz1243485-2-fence_scsi-monitor.patch -Patch31: bz1243485-3-fence_scsi_check.patch +Patch26: test-01-fix_xml_metadata.patch +Patch27: bz1213571-fence_scsi-add_monitor.patch +Patch28: bz1214919-fence_scsi-already_on.patch +Patch29: bz1145769-fence_rhevm-cookies_auth.patch +Patch30: bz1165591-fence_cisco_ucs-https.patch +Patch31: bz1196068-fence_kdump-add_monitor.patch +Patch32: bz1196068-2-fence_kdump-add_monitor.patch +Patch33: bz1196068-3-fence_kdump-add_monitor.patch +Patch34: bz1196068-4-fence_kdump-add_monitor.patch +Patch35: bz1207982-fence2rng-quotes.patch +Patch36: bz1171732-1-fence_emerson.patch +Patch37: bz1171732-2-fence_emerson.patch +Patch38: bz1171732-3-fence_emerson.patch +Patch39: bz1188750-0-fence_zvmip-improve_usage_of_resources.patch +Patch40: bz1188750-fence_zvmip-improve_usage_of_resources.patch +Patch41: bz1214359-5-fence_compute.patch +Patch42: bz1214359-6-fence_compute.patch +Patch43: bz1216997-support_for_hp_superdome.patch +Patch44: bz1102727-fence_mpath.patch +Patch45: bz1102727-2-duplicate_getopt.patch +Patch46: bz1214359-7-fence_compute_xml_test.patch +Patch47: bz1214522-port_as_ip.patch +Patch48: bz1102727-2-fence_mpath.patch +Patch49: bz1243485-1-fence_scsi-force-on.patch +Patch50: bz1243485-2-fence_scsi-monitor.patch +Patch51: bz1250586-list_status.patch +Patch52: bz1214522-2-port_as_ip.patch +Patch53: bz1214522-3-port_as_ip.patch +Patch54: bz1185329-fence_rsa.patch +Patch55: bz1251491-none_as_state.patch +Patch56: bz1214522-4-port_as_ip.patch +Patch57: bz1214522-5-port_as_ip.patch +Patch58: bz1102727-3-fence_mpath.patch +Patch59: bz1250586-2-list_status.patch +Patch60: bz1243485-3-fence_scsi_check.patch +Patch61: bz1241648-fence_ipmilan_password_verbose.patch +Patch62: bz1257137-1-fence_ipmilan_regression.patch +Patch63: bz1257137-2-fence_ipmilan_regression.patch +Patch64: bz1256908-fence_ilo-tls_negotiation.patch +Patch65: bz1259319-fence_apc_v6.patch +Patch66: bz1257137-3-fence_ipmilan_regression.patch +Patch67: bz1274432-fence_brocade-fix_incorrect_return.patch %if 0%{?rhel} -%global supportedagents apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute 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-compute 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 +%global supportedagents apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps hpblade ibmblade ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan mpath kdump rhevm rsa 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-compute fence-agents-drac5 fence-agents-eaton-snmp fence-agents-emerson fence-agents-eps fence-agents-hpblade fence-agents-ibmblade fence-agents-ifmib fence-agents-ilo2 fence-agents-ilo-moonshot fence-agents-ilo-mp fence-agents-ilo-ssh fence-agents-intelmodular fence-agents-ipdu fence-agents-ipmilan fence-agents-mpath fence-agents-kdump fence-agents-rhevm fence-agents-rsa fence-agents-rsb fence-agents-scsi fence-agents-vmware-soap fence-agents-wti %ifarch s390x %global testagents virsh zvm %else @@ -104,12 +140,48 @@ BuildRequires: autoconf automake libtool %patch23 -p1 -b .bz1214359-2 %patch24 -p1 -b .bz1214359-3 %patch25 -p1 -b .bz1214359-4 -%patch26 -p1 -b .bz1214359-5 -%patch27 -p1 -b .bz1214359-6 -%patch28 -p1 -b .bz1213571 -%patch29 -p1 -b .bz1243485-1 -%patch30 -p1 -b .bz1243485-2 -%patch31 -p1 -b .bz1243485-3 +%patch26 -p1 -b .test-01-fix_xml_metadata.patch +%patch27 -p1 -b .bz1213571 +%patch28 -p1 -b .bz1214919 +%patch29 -p1 -b .bz1145769 +%patch30 -p1 -b .bz1165591 +%patch31 -p1 -b .bz1196068 +%patch32 -p1 -b .bz1196068-2 +%patch33 -p1 -b .bz1196068-3 +%patch34 -p1 -b .bz1196068-4 +%patch35 -p1 -b .bz1207982 +%patch36 -p1 -b .bz1171732.1 +%patch37 -p1 -b .bz1171732.2 +%patch38 -p1 -b .bz1171732.3 +%patch39 -p1 -b .bz1188750.0 +%patch40 -p1 -b .bz1188750 +%patch41 -p1 -b .bz1214359-5 +%patch42 -p1 -b .bz1214359-6 +%patch43 -p1 -b .bz1216997 +%patch44 -p1 -b .bz1102727 +%patch45 -p1 -b .bz1102727-2 +%patch46 -p1 -b .bz1214359-7 +%patch47 -p1 -b .bz1214522 +%patch48 -p1 -b .bz1102727-2 +%patch49 -p1 -b .bz1243485-1 +%patch50 -p1 -b .bz1243485-2 +%patch51 -p1 -b .bz1250586 +%patch52 -p1 -b .bz1214522-2 +%patch53 -p1 -b .bz1214522-3 +%patch54 -p1 -b .bz1185329 +%patch55 -p1 -b .bz1251491 +%patch56 -p1 -b .bz1214522-4 +%patch57 -p1 -b .bz1214522-5 +%patch58 -p1 -b .bz1102727-3 +%patch59 -p1 -b .bz1250586-2 +%patch60 -p1 -b .bz1243485-3 +%patch61 -p1 -b .bz1241648 +%patch62 -p1 -b .bz1257137-1 +%patch63 -p1 -b .bz1257137-2 +%patch64 -p1 -b .bz1256908 +%patch65 -p1 -b .bz1259319 +%patch66 -p1 -b .bz1257137-3 +%patch67 -p1 -b .bz1274432-1 %build ./autogen.sh @@ -276,7 +348,6 @@ The fence-agents-compute package contains a fence agent for Nova compute nodes. %{_sbindir}/fence_compute %{_mandir}/man8/fence_compute.8* - %package drac5 License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -305,6 +376,19 @@ The fence-agents-eaton-snmp package contains a fence agent for Eaton network pow %{_sbindir}/fence_eaton_snmp %{_mandir}/man8/fence_eaton_snmp.8* +%package emerson +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Emerson devices (SNMP) +Requires: fence-agents-common >= %{version}-%{release} +Obsoletes: fence-agents +%description emerson +The fence-agents-emerson package contains a fence agent for Emerson devices that are accessed via the SNMP protocol. +%files emerson +%defattr(-,root,root,-) +%{_sbindir}/fence_emerson +%{_mandir}/man8/fence_emerson.8* + %package eps License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -376,6 +460,20 @@ The fence-agents-ilo2 package contains a fence agent for HP iLO2 devices that ar %{_mandir}/man8/fence_ilo.8* %{_mandir}/man8/fence_ilo2.8* +%package ilo-moonshot +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for HP iLO Moonshot devices +Requires: telnet openssh-clients +Requires: fence-agents-common >= %{version}-%{release} +Obsoletes: fence-agents +%description ilo-moonshot +The fence-agents-ilo-moonshot package contains a fence agent for HP iLO Moonshot devices that are accessed via telnet or SSH. +%files ilo-moonshot +%defattr(-,root,root,-) +%{_sbindir}/fence_ilo_moonshot +%{_mandir}/man8/fence_ilo_moonshot.8* + %package ilo-mp License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -458,6 +556,20 @@ The fence-agents-ipmilan package contains a fence agent for devices with IPMI in %{_sbindir}/fence_imm %{_mandir}/man8/fence_imm.8* +%package mpath +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for reservations over Device Mapper Multipath +Requires: fence-agents-common >= %{version}-%{release} +Requires: device-mapper-multipath +Obsoletes: fence-agents +%description mpath +The fence-agents-mpath package contains fence agent for SCSI persisent reservation over Device Mapper Multipath +%files mpath +%defattr(-,root,root,-) +%{_sbindir}/fence_mpath +%{_mandir}/man8/fence_mpath.8* + %package kdump License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -518,7 +630,6 @@ The fence-agents-rhevm package contains a fence agent for RHEV-M via REST API %{_sbindir}/fence_rhevm %{_mandir}/man8/fence_rhevm.8* -%if 0%{?fedora} %package rsa License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -532,7 +643,6 @@ The fence-agents-rsa package contains a fence agent for IBM RSA II devices that %defattr(-,root,root,-) %{_sbindir}/fence_rsa %{_mandir}/man8/fence_rsa.8* -%endif %package rsb License: GPLv2+ and LGPLv2+ @@ -637,23 +747,103 @@ The fence-agents-zvm package contains a fence agent for z/VM hypervisors %endif %changelog -* Wed Sep 02 2015 Marek Grac - 4.0.11-13.2 -- fence_scsi loses keys after reboot - Resolves: rhbz#1258481 - -* Wed Jul 15 2015 Marek Grac - 4.0.11-13.1 -- fence_compute: add support for recoding fencing operations in attrd - Resolves: rhbz#1243505 - -* Mon Jun 08 2015 Marek Grac - 4.0.11-13 +* Mon Oct 26 2015 Marek Grac - 4.0.11-27 +- fence_brocade: Fix return status in get_power_status + Resolves: rhbz#1274431 + +* Thu Sep 17 2015 Marek Grac - 4.0.11-26 +- fence_ipmilan: Fix -i attribute + Resolves: rhbz#1257137 + +* Mon Sep 14 2015 Marek Grac - 4.0.11-25 +- fence_apc: Support for v6.x + Resolves: rhbz#1259319 + +* Wed Sep 02 2015 Marek Grac - 4.0.11-24 +- fence_ipmilan: Add removed attributes -i & timeout + Resolves: rhbz#1257137 +- fence_ipmilan: Do not print password in verbose mode + Resolves: rhbz#1241648 +- fence_ilo: Negotiation of TLS1.0 is more automatic + Resolves: rhbz#1256908 + +* Mon Aug 17 2015 Marek Grac - 4.0.11-23 +- fence_scsi: Fix watchdog script broken by more strict 'monitor' + Resolves: 1243485 + +* Wed Aug 12 2015 Marek Grac - 4.0.11-21 +- fence_mpath: Fix unfencing after non-cluster reboot + Resolves: 1102727 +- manual pages now describe 'list-status' properly + +bz1102727-3-fence_mpath.patch bz1250586-2-list_status.patch +* Tue Aug 11 2015 Marek Grac - 4.0.11-20 +- fencing: Fix place where --plug + --port-as-ip are tested + Resolves: rhbz#1214522 + +* Mon Aug 10 2015 Marek Grac - 4.0.11-19 +- fencing: do not fail when state is None + Resolves: rhbz#1251491 + +* Wed Aug 05 2015 Marek Grac - 4.0.11-18 +- fence_rsa: Fix login issue + Resolves: rhbz#1185329 +- fencing: support for list-status + Resolves: rhbz#1250586 +- fencing: Fix support for --port-as-ip + Resolves: rhbz#1214522 + +* Thu Jul 16 2015 Marek Grac - 4.0.11-17 +- fence_scsi: Improve monitoring and add option to force ON + Resolves: rhbz#1243485 + +* Mon Jun 29 2015 Marek Grac - 4.0.11-16 +- fence_compute: Agent cleanup + Resolves: rhbz#1214359 +- fence_hpblade: Add support for HP Integrity Superdome + Resolves: rhbz#1216997 +- fence_zvmip: Add --missing-as-off and change monitor/status actions + Resolves: rhbz#1188750 +- fence_mpath: new fence agent + Resolves: rhbz#1102727 +- fencing: Option --port-as-ip + Resolves: rhbz#1214522 + +* Mon Jun 22 2015 Marek Grac - 4.0.11-15 +- fence_zvmip: Connection timeout issues + Resolves: rhbz#1188750 + +* Thu Jun 18 2015 Marek Grac - 4.0.11-14 +- fence_rhevm: Add authentication via cookies + Resolves: rhbz#1145769 +- fence_ilo_moonshot: New fence agent + Resolves: rhbz#1152917 +- fence_emerson: New fence agent + Resolves: rhbz#1171732 +- fence_rsa: New fence agent + Resolves: rhbz#1185329 + +* Wed Jun 17 2015 Marek Grac - 4.0.11-13 +- fence_scsi: Add monitor operation + Resolves: rhbz#1213571 +- fence_scsi: Force unfence if any of paths is off + Resolves: rhbz#1214919 +- fence_cisco_ucs: Fix https:// prefix with --ssl-(in)secure + Resolves: rhbz#1165591 +- fence_kdump: Add monitor operation + Resolves: rhbz#1196068 +- fence2rng: Fix problem with quotes + Resolves: rhbz#1207982 + +* Mon Jun 08 2015 Marek Grac - 4.0.11-12 - New fence agent fence_compute - Resolves: rhbz#1228599 + Resolves: rhbz#1214359 * Wed Mar 25 2015 Marek Grac - 4.0.11-11 - fence_ipmilan: Unset default cipher - Resolves: rhbz#1206294 + Resolves: rhbz#1203877 - fence_ilo2: Add --tls1.0 - Resolves: rhbz#1206293 + Resolves: rhbz#1199970 - update scripts so 'make check' is working again * Mon Jan 05 2015 Marek Grac - 4.0.11-10