Blame SOURCES/bz1102727-fence_mpath.patch

e4ffb1
From 1e1c7ecf7b3190e24d8e99d46c886c0b17df6bbe Mon Sep 17 00:00:00 2001
e4ffb1
From: Marek 'marx' Grac <mgrac@redhat.com>
e4ffb1
Date: Wed, 19 Nov 2014 10:51:57 +0100
e4ffb1
Subject: [PATCH 3/6] fence_mpath: new fence agent for dm-multipath based on
e4ffb1
 mpathpersist
e4ffb1
e4ffb1
Previously, scenario with multipath and underlying SCSI devices was solved by using
e4ffb1
fence_scsi what works correctly but there are some limitation. The most important
e4ffb1
is that unfencing has to be done when all paths are available as it is executed only once.
e4ffb1
This new fence agent solve this situation properly as most of this situations are solved
e4ffb1
by mpathpersist which is part of dm-multipath.
e4ffb1
e4ffb1
Conflicts:
e4ffb1
	configure.ac
e4ffb1
	make/fencebuild.mk
e4ffb1
---
e4ffb1
 configure.ac                        |   4 +
e4ffb1
 fence/agents/mpath/Makefile.am      |  17 +++
e4ffb1
 fence/agents/mpath/fence_mpath.py   | 244 ++++++++++++++++++++++++++++++++++++
e4ffb1
 make/fencebuild.mk                  |   6 +
e4ffb1
 tests/data/metadata/fence_mpath.xml |  96 ++++++++++++++
e4ffb1
 5 files changed, 367 insertions(+)
e4ffb1
 create mode 100644 fence/agents/mpath/Makefile.am
e4ffb1
 create mode 100644 fence/agents/mpath/fence_mpath.py
e4ffb1
 create mode 100644 tests/data/metadata/fence_mpath.xml
e4ffb1
e4ffb1
diff --git a/configure.ac b/configure.ac
e4ffb1
index 7abd701..c7259da 100644
e4ffb1
--- a/configure.ac
e4ffb1
+++ b/configure.ac
e4ffb1
@@ -168,6 +168,9 @@ AC_PATH_PROG([SG_PERSIST_PATH], [sg_persist], [/usr/bin/sg_persist])
e4ffb1
 AC_PATH_PROG([SG_TURS_PATH], [sg_turs], [/usr/bin/sg_turs])
e4ffb1
 AC_PATH_PROG([VGS_PATH], [vgs], [/usr/sbin/vgs])
e4ffb1
 AC_PATH_PROG([NOVA_PATH], [nova], [/usr/bin/nova])
e4ffb1
+AC_PATH_PROG([MPATH_PATH], [mpathpersist], [/usr/sbin/mpathpersist])
e4ffb1
+AC_PATH_PROG([SUDO_PATH], [mpathpersist], [/usr/bin/sudo])
e4ffb1
+
e4ffb1
 ## do subst
e4ffb1
 
e4ffb1
 AC_SUBST([DEFAULT_CONFIG_DIR])
e4ffb1
@@ -289,6 +292,7 @@ AC_CONFIG_FILES([Makefile
e4ffb1
 		 fence/agents/lib/Makefile
e4ffb1
 		 fence/agents/lpar/Makefile
e4ffb1
 		 fence/agents/manual/Makefile
e4ffb1
+		 fence/agents/mpath/Makefile
e4ffb1
 		 fence/agents/netio/Makefile
e4ffb1
 		 fence/agents/ovh/Makefile
e4ffb1
 		 fence/agents/pve/Makefile
e4ffb1
diff --git a/fence/agents/mpath/Makefile.am b/fence/agents/mpath/Makefile.am
e4ffb1
new file mode 100644
e4ffb1
index 0000000..fd3d8d2
e4ffb1
--- /dev/null
e4ffb1
+++ b/fence/agents/mpath/Makefile.am
e4ffb1
@@ -0,0 +1,17 @@
e4ffb1
+MAINTAINERCLEANFILES	= Makefile.in
e4ffb1
+
e4ffb1
+TARGET			= fence_mpath
e4ffb1
+
e4ffb1
+SRC			= $(TARGET).py
e4ffb1
+
e4ffb1
+EXTRA_DIST		= $(SRC)
e4ffb1
+
e4ffb1
+sbin_SCRIPTS		= $(TARGET)
e4ffb1
+
e4ffb1
+man_MANS		= $(TARGET).8
e4ffb1
+
e4ffb1
+FENCE_TEST_ARGS         = -k 1
e4ffb1
+
e4ffb1
+include $(top_srcdir)/make/fencebuild.mk
e4ffb1
+include $(top_srcdir)/make/fenceman.mk
e4ffb1
+include $(top_srcdir)/make/agentpycheck.mk
e4ffb1
diff --git a/fence/agents/mpath/fence_mpath.py b/fence/agents/mpath/fence_mpath.py
e4ffb1
new file mode 100644
e4ffb1
index 0000000..8a4811c
e4ffb1
--- /dev/null
e4ffb1
+++ b/fence/agents/mpath/fence_mpath.py
e4ffb1
@@ -0,0 +1,244 @@
e4ffb1
+#!/usr/bin/python -tt
e4ffb1
+
e4ffb1
+import sys
e4ffb1
+import stat
e4ffb1
+import re
e4ffb1
+import os
e4ffb1
+import logging
e4ffb1
+import atexit
e4ffb1
+sys.path.append("@FENCEAGENTSLIBDIR@")
e4ffb1
+from fencing import fail_usage, run_command, atexit_handler, check_input, process_input, show_docs
e4ffb1
+from fencing import fence_action, all_opt, run_delay
e4ffb1
+
e4ffb1
+#BEGIN_VERSION_GENERATION
e4ffb1
+RELEASE_VERSION=""
e4ffb1
+REDHAT_COPYRIGHT=""
e4ffb1
+BUILD_DATE=""
e4ffb1
+#END_VERSION_GENERATION
e4ffb1
+
e4ffb1
+def get_status(conn, options):
e4ffb1
+	del conn
e4ffb1
+	status = "off"
e4ffb1
+	for dev in options["devices"]:
e4ffb1
+		is_block_device(dev)
e4ffb1
+		if options["--key"] in get_registration_keys(options, dev):
e4ffb1
+			status = "on"
e4ffb1
+		else:
e4ffb1
+			logging.debug("No registration for key "\
e4ffb1
+				+ options["--key"] + " on device " + dev + "\n")
e4ffb1
+	return status
e4ffb1
+
e4ffb1
+
e4ffb1
+def set_status(conn, options):
e4ffb1
+	del conn
e4ffb1
+	count = 0
e4ffb1
+	if options["--action"] == "on":
e4ffb1
+		for dev in options["devices"]:
e4ffb1
+			is_block_device(dev)
e4ffb1
+
e4ffb1
+			register_dev(options, dev)
e4ffb1
+			if options["--key"] not in get_registration_keys(options, dev):
e4ffb1
+				count += 1
e4ffb1
+				logging.debug("Failed to register key "\
e4ffb1
+					+ options["--key"] + "on device " + dev + "\n")
e4ffb1
+				continue
e4ffb1
+			dev_write(options, dev)
e4ffb1
+
e4ffb1
+			if get_reservation_key(options, dev) is None \
e4ffb1
+			and not reserve_dev(options, dev) \
e4ffb1
+			and get_reservation_key(options, dev) is None:
e4ffb1
+				count += 1
e4ffb1
+				logging.debug("Failed to create reservation (key="\
e4ffb1
+					+ options["--key"] + ", device=" + dev + ")\n")
e4ffb1
+
e4ffb1
+	else:
e4ffb1
+		dev_keys = dev_read(options)
e4ffb1
+
e4ffb1
+		for dev in options["devices"]:
e4ffb1
+			is_block_device(dev)
e4ffb1
+
e4ffb1
+			if options["--key"] in get_registration_keys(options, dev):
e4ffb1
+				preempt_abort(options, dev_keys[dev], dev)
e4ffb1
+
e4ffb1
+		for dev in options["devices"]:
e4ffb1
+			if options["--key"] in get_registration_keys(options, dev):
e4ffb1
+				count += 1
e4ffb1
+				logging.debug("Failed to remove key "\
e4ffb1
+					+ options["--key"] + " on device " + dev + "\n")
e4ffb1
+				continue
e4ffb1
+
e4ffb1
+			if not get_reservation_key(options, dev):
e4ffb1
+				count += 1
e4ffb1
+				logging.debug("No reservation exists on device " + dev + "\n")
e4ffb1
+	if count:
e4ffb1
+		logging.error("Failed to verify " + str(count) + " device(s)")
e4ffb1
+		sys.exit(1)
e4ffb1
+
e4ffb1
+
e4ffb1
+#run command, returns dict, ret["err"] = exit code; ret["out"] = output
e4ffb1
+def run_cmd(options, cmd):
e4ffb1
+	ret = {}
e4ffb1
+
e4ffb1
+	if options.has_key("--use-sudo"):
e4ffb1
+		prefix = options["--sudo-path"] + " "
e4ffb1
+	else:
e4ffb1
+		prefix = ""
e4ffb1
+
e4ffb1
+	(ret["err"], ret["out"], _) = run_command(options, prefix + cmd)
e4ffb1
+	ret["out"] = "".join([i for i in ret["out"] if i is not None])
e4ffb1
+	return ret
e4ffb1
+
e4ffb1
+
e4ffb1
+# check if device exist and is block device
e4ffb1
+def is_block_device(dev):
e4ffb1
+	if not os.path.exists(dev):
e4ffb1
+		fail_usage("Failed: device \"" + dev + "\" does not exist")
e4ffb1
+	if not stat.S_ISBLK(os.stat(dev).st_mode):
e4ffb1
+		fail_usage("Failed: device \"" + dev + "\" is not a block device")
e4ffb1
+
e4ffb1
+# cancel registration
e4ffb1
+def preempt_abort(options, host, dev):
e4ffb1
+	cmd = options["--mpathpersist-path"] + " -o --preempt-abort --prout-type=5 --param-rk=" + host +" --param-sark=" + options["--key"] +"-d " + dev
e4ffb1
+	return not bool(run_cmd(options, cmd)["err"])
e4ffb1
+
e4ffb1
+def register_dev(options, dev):
e4ffb1
+	cmd = options["--mpathpersist-path"] + " -o --register --param-sark=" + options["--key"] + " -d " + dev
e4ffb1
+	#cmd return code != 0 but registration can be successful
e4ffb1
+	return not bool(run_cmd(options, cmd)["err"])
e4ffb1
+
e4ffb1
+def reserve_dev(options, dev):
e4ffb1
+	cmd = options["--mpathpersist-path"] + " -o --reserv --prout-type=5 --param-rk=" + options["--key"] + " -d " + dev
e4ffb1
+	return not bool(run_cmd(options, cmd)["err"])
e4ffb1
+
e4ffb1
+def get_reservation_key(options, dev):
e4ffb1
+	cmd = options["--mpathpersist-path"] + " -i -r -d " + dev
e4ffb1
+	out = run_cmd(options, cmd)
e4ffb1
+	if out["err"]:
e4ffb1
+		fail_usage("Cannot get reservation key")
e4ffb1
+	match = re.search(r"\s+key\s*=\s*0x(\S+)\s+", out["out"], re.IGNORECASE)
e4ffb1
+	return match.group(1) if match else None
e4ffb1
+
e4ffb1
+def get_registration_keys(options, dev):
e4ffb1
+	keys = []
e4ffb1
+	cmd = options["--mpathpersist-path"] + " -i -k -d " + dev
e4ffb1
+	out = run_cmd(options, cmd)
e4ffb1
+	if out["err"]:
e4ffb1
+		fail_usage("Cannot get registration keys")
e4ffb1
+	for line in out["out"].split("\n"):
e4ffb1
+		match = re.search(r"\s+0x(\S+)\s*", line)
e4ffb1
+		if match:
e4ffb1
+			keys.append(match.group(1))
e4ffb1
+	return keys
e4ffb1
+
e4ffb1
+def dev_write(options, dev):
e4ffb1
+	file_path = options["--store-path"] + "/mpath.devices"
e4ffb1
+
e4ffb1
+	if not os.path.isdir(os.path.dirname(options["--store-path"])):
e4ffb1
+		os.makedirs(os.path.dirname(options["--store-path"]))
e4ffb1
+
e4ffb1
+	try:
e4ffb1
+		store_fh = open(file_path, "a+")
e4ffb1
+	except IOError:
e4ffb1
+		fail_usage("Failed: Cannot open file \""+ file_path + "\"")
e4ffb1
+	out = store_fh.read()
e4ffb1
+	if not re.search(r"^" + dev + r"\s+", out):
e4ffb1
+		store_fh.write(dev + "\t" + options["--key"] + "\n")
e4ffb1
+	store_fh.close()
e4ffb1
+
e4ffb1
+def dev_read(options):
e4ffb1
+	dev_key = {}
e4ffb1
+	file_path = options["--store-path"] + "/mpath.devices"
e4ffb1
+	try:
e4ffb1
+		store_fh = open(file_path, "r")
e4ffb1
+	except IOError:
e4ffb1
+		fail_usage("Failed: Cannot open file \"" + file_path + "\"")
e4ffb1
+	# get not empty lines from file
e4ffb1
+	for (device, key) in [line.strip().split() for line in store_fh if line.strip()]:
e4ffb1
+		dev_key[device] = key
e4ffb1
+	store_fh.close()
e4ffb1
+	return dev_key
e4ffb1
+
e4ffb1
+def define_new_opts():
e4ffb1
+	all_opt["devices"] = {
e4ffb1
+		"getopt" : "d:",
e4ffb1
+		"longopt" : "devices",
e4ffb1
+		"help" : "-d, --devices=[devices]        List of devices to use for current operation",
e4ffb1
+		"required" : "0",
e4ffb1
+		"shortdesc" : "List of devices to use for current operation. Devices can \
e4ffb1
+be comma-separated list of device-mapper multipath devices (eg. /dev/dm-3). \
e4ffb1
+Each device must support SCSI-3 persistent reservations.",
e4ffb1
+		"order": 1
e4ffb1
+	}
e4ffb1
+	all_opt["key"] = {
e4ffb1
+		"getopt" : "k:",
e4ffb1
+		"longopt" : "key",
e4ffb1
+		"help" : "-k, --key=[key]                Key to use for the current operation",
e4ffb1
+		"required" : "1",
e4ffb1
+		"shortdesc" : "Key to use for the current operation. This key should be \
e4ffb1
+unique to a node and have to be written in /etc/multipath.conf. For the \"on\" action, the key specifies the key use to \
e4ffb1
+register the local node. For the \"off\" action, this key specifies the key to \
e4ffb1
+be removed from the device(s).",
e4ffb1
+		"order": 1
e4ffb1
+	}
e4ffb1
+	all_opt["mpathpersist_path"] = {
e4ffb1
+		"getopt" : "X:",
e4ffb1
+		"longopt" : "mpathpersist-path",
e4ffb1
+		"help" : "--mpathpersist-path=[path]     Path to mpathpersist binary",
e4ffb1
+		"required" : "0",
e4ffb1
+		"shortdesc" : "Path to mpathpersist binary",
e4ffb1
+		"default" : "@MPATH_PATH@",
e4ffb1
+		"order": 200
e4ffb1
+	}
e4ffb1
+	all_opt["store_path"] = {
e4ffb1
+		"getopt" : "X:",
e4ffb1
+		"longopt" : "store-path",
e4ffb1
+		"help" : "--store-path=[path]            Path to directory containing cached keys",
e4ffb1
+		"required" : "0",
e4ffb1
+		"shortdesc" : "Path to directory where fence agent can store information",
e4ffb1
+		"default" : "@STORE_PATH@",
e4ffb1
+		"order": 200
e4ffb1
+	}
e4ffb1
+
e4ffb1
+def main():
e4ffb1
+	atexit.register(atexit_handler)
e4ffb1
+
e4ffb1
+	device_opt = ["no_login", "no_password", "devices", "key", "sudo", \
e4ffb1
+	        "fabric_fencing", "on_target", "store_path", "mpathpersist_path"]
e4ffb1
+
e4ffb1
+	define_new_opts()
e4ffb1
+
e4ffb1
+	options = check_input(device_opt, process_input(device_opt))
e4ffb1
+
e4ffb1
+	docs = {}
e4ffb1
+	docs["shortdesc"] = "Fence agent for multipath persistent reservation"
e4ffb1
+	docs["longdesc"] = "fence_mpath is an I/O fencing agent that uses SCSI-3 \
e4ffb1
+persistent reservations to control access multipath devices. Underlying \
e4ffb1
+devices must support SCSI-3 persistent reservations (SPC-3 or greater) as \
e4ffb1
+well as the \"preempt-and-abort\" subcommand.\nThe fence_mpath agent works by \
e4ffb1
+having an unique key for each pair of node and device that has to be set also \
e4ffb1
+in /etc/multipath.conf. Once registered, a single node will become the reservation holder \
e4ffb1
+by creating a \"write exclusive, registrants only\" reservation on the \
e4ffb1
+device(s). The result is that only registered nodes may write to the \
e4ffb1
+device(s). When a node failure occurs, the fence_mpath agent will remove the \
e4ffb1
+key belonging to the failed node from the device(s). The failed node will no \
e4ffb1
+longer be able to write to the device(s). A manual reboot is required."
e4ffb1
+	docs["vendorurl"] = "https://www.sourceware.org/dm/"
e4ffb1
+	show_docs(options, docs)
e4ffb1
+
e4ffb1
+	run_delay(options)
e4ffb1
+
e4ffb1
+	# Input control BEGIN
e4ffb1
+	if not "--key" in options:
e4ffb1
+		fail_usage("Failed: key is required")
e4ffb1
+
e4ffb1
+	options["devices"] = options["--devices"].split(",")
e4ffb1
+
e4ffb1
+	if not options["devices"]:
e4ffb1
+		fail_usage("Failed: No devices found")
e4ffb1
+	# Input control END
e4ffb1
+
e4ffb1
+	result = fence_action(None, options, set_status, get_status)
e4ffb1
+	sys.exit(result)
e4ffb1
+
e4ffb1
+if __name__ == "__main__":
e4ffb1
+	main()
e4ffb1
diff --git a/make/fencebuild.mk b/make/fencebuild.mk
e4ffb1
index b59c069..7df0fc7 100644
e4ffb1
--- a/make/fencebuild.mk
e4ffb1
+++ b/make/fencebuild.mk
e4ffb1
@@ -17,6 +17,12 @@ $(TARGET): $(SRC)
e4ffb1
 		-e 's#@''SG_TURS_PATH@#${SG_TURS_PATH}#g' \
e4ffb1
 		-e 's#@''VGS_PATH@#${VGS_PATH}#g' \
e4ffb1
 		-e 's#@''NOVA_PATH@#${NOVA_PATH}#g' \
e4ffb1
+		-e 's#@''SUDO_PATH@#${SUDO_PATH}#g' \
e4ffb1
+		-e 's#@''SSH_PATH@#${SSH_PATH}#g' \
e4ffb1
+		-e 's#@''TELNET_PATH@#${TELNET_PATH}#g' \
e4ffb1
+		-e 's#@''MPATH_PATH@#${MPATH_PATH}#g' \
e4ffb1
+		-e 's#@''STORE_PATH@#${CLUSTERVARRUN}#g' \
e4ffb1
+		-e 's#@''SUDO_PATH@#${SUDO_PATH}#g' \
e4ffb1
 	> $@
e4ffb1
 
e4ffb1
 	if [ 0 -eq `echo "$(SRC)" | grep fence_ &> /dev/null; echo $$?` ]; then \
e4ffb1
diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml
e4ffb1
new file mode 100644
e4ffb1
index 0000000..c62dd49
e4ffb1
--- /dev/null
e4ffb1
+++ b/tests/data/metadata/fence_mpath.xml
e4ffb1
@@ -0,0 +1,96 @@
e4ffb1
+
e4ffb1
+<resource-agent name="fence_mpath" shortdesc="Fence agent for multipath persistent reservation" >
e4ffb1
+<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.
e4ffb1
+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.</longdesc>
e4ffb1
+<vendor-url>https://www.sourceware.org/dm/</vendor-url>
e4ffb1
+<parameters>
e4ffb1
+	<parameter name="devices" unique="0" required="0">
e4ffb1
+		<getopt mixed="-d, --devices=[devices]" />
e4ffb1
+		<content type="string"  />
e4ffb1
+		<shortdesc lang="en">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.</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="key" unique="0" required="1">
e4ffb1
+		<getopt mixed="-k, --key=[key]" />
e4ffb1
+		<content type="string"  />
e4ffb1
+		<shortdesc lang="en">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).</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="action" unique="0" required="1">
e4ffb1
+		<getopt mixed="-o, --action=[action]" />
e4ffb1
+		<content type="string" default="off"  />
e4ffb1
+		<shortdesc lang="en">Fencing Action</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="verbose" unique="0" required="0">
e4ffb1
+		<getopt mixed="-v, --verbose" />
e4ffb1
+		<content type="boolean"  />
e4ffb1
+		<shortdesc lang="en">Verbose mode</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="debug" unique="0" required="0">
e4ffb1
+		<getopt mixed="-D, --debug-file=[debugfile]" />
e4ffb1
+		<content type="string"  />
e4ffb1
+		<shortdesc lang="en">Write debug information to given file</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="version" unique="0" required="0">
e4ffb1
+		<getopt mixed="-V, --version" />
e4ffb1
+		<content type="boolean"  />
e4ffb1
+		<shortdesc lang="en">Display version information and exit</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="help" unique="0" required="0">
e4ffb1
+		<getopt mixed="-h, --help" />
e4ffb1
+		<content type="boolean"  />
e4ffb1
+		<shortdesc lang="en">Display help and exit</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="delay" unique="0" required="0">
e4ffb1
+		<getopt mixed="--delay=[seconds]" />
e4ffb1
+		<content type="string" default="0"  />
e4ffb1
+		<shortdesc lang="en">Wait X seconds before fencing is started</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="shell_timeout" unique="0" required="0">
e4ffb1
+		<getopt mixed="--shell-timeout=[seconds]" />
e4ffb1
+		<content type="string" default="3"  />
e4ffb1
+		<shortdesc lang="en">Wait X seconds for cmd prompt after issuing command</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="store_path" unique="0" required="0">
e4ffb1
+		<getopt mixed="--store-path=[path]" />
e4ffb1
+		<content type="string" default="/var/run/cluster"  />
e4ffb1
+		<shortdesc lang="en">Path to directory where fence agent can store information</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="power_timeout" unique="0" required="0">
e4ffb1
+		<getopt mixed="--power-timeout=[seconds]" />
e4ffb1
+		<content type="string" default="20"  />
e4ffb1
+		<shortdesc lang="en">Test X seconds for status change after ON/OFF</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="power_wait" unique="0" required="0">
e4ffb1
+		<getopt mixed="--power-wait=[seconds]" />
e4ffb1
+		<content type="string" default="0"  />
e4ffb1
+		<shortdesc lang="en">Wait X seconds after issuing ON/OFF</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="login_timeout" unique="0" required="0">
e4ffb1
+		<getopt mixed="--login-timeout=[seconds]" />
e4ffb1
+		<content type="string" default="5"  />
e4ffb1
+		<shortdesc lang="en">Wait X seconds for cmd prompt after login</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="mpathpersist_path" unique="0" required="0">
e4ffb1
+		<getopt mixed="--mpathpersist-path=[path]" />
e4ffb1
+		<content type="string" default="/usr/sbin/mpathpersist"  />
e4ffb1
+		<shortdesc lang="en">Path to mpathpersist binary</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="retry_on" unique="0" required="0">
e4ffb1
+		<getopt mixed="--retry-on=[attempts]" />
e4ffb1
+		<content type="string" default="1"  />
e4ffb1
+		<shortdesc lang="en">Count of attempts to retry power on</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+	<parameter name="sudo" unique="0" required="0">
e4ffb1
+		<getopt mixed="--use-sudo" />
e4ffb1
+		<content type="boolean"  />
e4ffb1
+		<shortdesc lang="en">Use sudo (without password) when calling 3rd party sotfware.</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
+</parameters>
e4ffb1
+<actions>
e4ffb1
+	<action name="on" on_target="1" automatic="1"/>
e4ffb1
+	<action name="off" />
e4ffb1
+	<action name="status" />
e4ffb1
+	<action name="list" />
e4ffb1
+	<action name="monitor" />
e4ffb1
+	<action name="metadata" />
e4ffb1
+</actions>
e4ffb1
+</resource-agent>
e4ffb1
-- 
e4ffb1
1.9.3
e4ffb1