cluster: RHEL6 - rgmanager: Update status after resource recovery
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=2616b150da0...
Commit: 2616b150da0fb5e6bb24f9d3483b52ea3a89ef82
Parent: 44547c338ae73be3c724629c97802e4ea2e942b1
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Fri Nov 30 11:28:57 2012 -0500
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Nov 30 11:32:22 2012 -0500
rgmanager: Update status after resource recovery
>From John Ruemker <jrummy(a)redhat.com>:
"When a service is configured with a recoverable resource, such as
nfsclient, a failure of that client correctly triggers the recover
function. However, even if recover is successful, rgmanager still stops
and recovers the service."
Resolves: rhbz#879031
Acked-by: Lon Hohberger <lhh(a)redhat.com>
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/restree.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index 9cd38a2..ea5e1c5 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -1298,8 +1298,10 @@ do_status(resource_node_t *node)
return x;
/* Strange/failed status. Try to recover inline. */
- if ((x = res_exec(node, RS_RECOVER, NULL, 0)) == 0)
+ if ((x = res_exec(node, RS_RECOVER, NULL, 0)) == 0) {
+ node->rn_last_status = x;
return 0;
+ }
return x;
}
11 years, 6 months
cluster: STABLE32 - rgmanager: Update status after resource recovery
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=bd81c6f65aa...
Commit: bd81c6f65aac30aaeb6d3eb129eab6ee3512d40c
Parent: 804b8fe92e31b076b9989affaefaf4e739a5e342
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Fri Nov 30 11:28:57 2012 -0500
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Nov 30 11:28:57 2012 -0500
rgmanager: Update status after resource recovery
>From John Ruemker <jrummy(a)redhat.com>:
"When a service is configured with a recoverable resource, such as
nfsclient, a failure of that client correctly triggers the recover
function. However, even if recover is successful, rgmanager still stops
and recovers the service."
Acked-by: Lon Hohberger <lhh(a)redhat.com>
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/restree.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index 82f8f29..b46986d 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -1302,8 +1302,10 @@ do_status(resource_node_t *node)
return x;
/* Strange/failed status. Try to recover inline. */
- if ((x = res_exec(node, RS_RECOVER, NULL, 0)) == 0)
+ if ((x = res_exec(node, RS_RECOVER, NULL, 0)) == 0) {
+ node->rn_last_status = x;
return 0;
+ }
return x;
}
11 years, 6 months
cluster: the annotated tag cluster-3.2.0 has been created
by Madison Kelly
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=fd45ce1d4ed...
Commit: fd45ce1d4eda42b85a2e2bfae76f29f2e86285cf
Parent: 0000000000000000000000000000000000000000
Author: digimer <digimer(a)alteeve.ca>
AuthorDate: 2012-11-27 03:10 +0000
Committer: digimer <digimer(a)alteeve.ca>
CommitterDate: 2012-11-27 03:10 +0000
annotated tag: cluster-3.2.0 has been created
at fd45ce1d4eda42b85a2e2bfae76f29f2e86285cf (tag)
tagging 804b8fe92e31b076b9989affaefaf4e739a5e342 (commit)
replaces cluster-3.1.93
cluster-3.2.0 release
Bob Peterson (1):
fenced: fix ignore_nolock for mounted nolock fs
Christine Caulfield (1):
fenced: fix potential tight loop reading /dev/zero
David Teigland (3):
fence_node/libfence: status
fenced: fence_check delay
fenced: silence dbus error
Fabio M. Di Nitto (8):
fence_check: add script and man page
cman init: allow dlm tcp port to be configurable via cman init script
cman init: increase default shutdown timeouts
cman init: make sure we start after fence_sanlockd and warn users
checkquorum.wdmd: add integration script with wdmd
libccs: don't use uninitialized value in xpathlite
cman init: fix error when /sys/kernel/config is still in use
cman init: deal with another systemd subtle change
Jan Pokorný (3):
cluster.rng: fix trailing whitespaces in head
cluster.rng: fencedevice initial non-digit note to description
cluster.rng: retab the head (use space uniformly)
Lon Hohberger (10):
rgmanager: Remove dead code
rgmanager: Remove unused assignment
rgmanager: Fix dead code warnings
rgmanager: Fix unsigned comparison warnings
rgmanager: Fix potential double-free
rgmanager: Fix possible dereference of NULL
Fix improper cleanup of join-view list
rgmanager: Add dead code to shut up static analyzer
rgmanager: Fix potential use-after-free
rgmanager: Fix memory leaks reported by static analyzer
Ryan McCabe (4):
rgmanager: Fix for deadlock
Revert "rgmanager: Fix for services stuck in recovery"
rgmanager: Fix return code when a service would deadlock
rgmanager: Randomize node list when relocating with no target
11 years, 6 months
cluster: STABLE32 - cman init: deal with another systemd subtle change
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=804b8fe92e3...
Commit: 804b8fe92e31b076b9989affaefaf4e739a5e342
Parent: 406611d78778efca6aae5743ba9c7c4391a1b18f
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Nov 26 05:13:22 2012 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Nov 26 05:13:22 2012 +0100
cman init: deal with another systemd subtle change
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 604660d..728b42d 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -19,9 +19,6 @@
# set secure PATH
PATH="/bin:/usr/bin:/sbin:/usr/sbin:@SBINDIR@"
-# save invokation for rollback ops
-thisinvokation="$0"
-
chkconfig2()
{
case "$1" in
@@ -230,7 +227,7 @@ nok() {
failure
echo
if [ "$currentaction" = "start" ]; then
- $thisinvokation stop
+ stop && rm -f $LOCK_FILE
fi
exit 1
}
11 years, 6 months
fence-agents: master - fence_lpar: Option 'partion' is moved to fence_lpar
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=81f9d0...
Commit: 81f9d0ac95b57791b5937ea96fac889e10782d53
Parent: 9e797a89be42e637958ec750e6776441c9557175
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Sun Nov 25 13:26:22 2012 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Sun Nov 25 13:26:22 2012 +0100
fence_lpar: Option 'partion' is moved to fence_lpar
This option was not part of patch a60ed3ca6fa0f63dfb09b46d99c2a281e2eed63e because it will be replaced
by standard --port / plug option
---
fence/agents/lpar/fence_lpar.py | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py
index 9233003..e8e50c6 100644
--- a/fence/agents/lpar/fence_lpar.py
+++ b/fence/agents/lpar/fence_lpar.py
@@ -22,15 +22,15 @@ BUILD_DATE=""
def get_power_status(conn, options):
if options["--hmc-version"] == "3":
- conn.send("lssyscfg -r lpar -m " + options["--managed"] + " -n " + options["--plug"] + " -F name,state\n")
+ conn.send("lssyscfg -r lpar -m " + options["--managed"] + " -n " + options["--partition"] + " -F name,state\n")
conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
try:
- status = re.compile("^" + options["--plug"] + ",(.*?),.*$", re.IGNORECASE | re.MULTILINE).search(conn.before).group(1)
+ status = re.compile("^" + options["--partition"] + ",(.*?),.*$", re.IGNORECASE | re.MULTILINE).search(conn.before).group(1)
except AttributeError:
fail(EC_STATUS_HMC)
elif options["--hmc-version"] == "4":
- conn.send("lssyscfg -r lpar -m "+ options["--managed"] +" --filter 'lpar_names=" + options["--plug"] + "'\n")
+ conn.send("lssyscfg -r lpar -m "+ options["--managed"] +" --filter 'lpar_names=" + options["--partition"] + "'\n")
conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
try:
@@ -50,18 +50,18 @@ def get_power_status(conn, options):
def set_power_status(conn, options):
if options["--hmc-version"] == "3":
conn.send("chsysstate -o " + options["--action"] + " -r lpar -m " + options["--managed"]
- + " -n " + options["--plug"] + "\n")
+ + " -n " + options["--partition"] + "\n")
conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
elif options["--hmc-version"] == "4":
if options["--action"] == "on":
conn.send("chsysstate -o on -r lpar -m " + options["--managed"] +
- " -n " + options["--plug"] +
+ " -n " + options["--partition"] +
" -f `lssyscfg -r lpar -F curr_profile " +
" -m " + options["--managed"] +
- " --filter \"lpar_names="+ options["--plug"] +"\"`\n" )
+ " --filter \"lpar_names="+ options["--partition"] +"\"`\n" )
else:
conn.send("chsysstate -o shutdown -r lpar --immed" +
- " -m " + options["--managed"] + " -n " + options["--plug"] + "\n")
+ " -m " + options["--managed"] + " -n " + options["--partition"] + "\n")
conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
def get_lpar_list(conn, options):
@@ -115,6 +115,13 @@ def define_new_opts():
"shortdesc" : "Force HMC version to use (3 or 4)",
"default" : "4",
"order" : 1 }
+ all_opt["partition"] = {
+ "getopt" : "n:",
+ "longopt" : "partition",
+ "help" : "-n <id> Name of the partition",
+ "required" : "0",
+ "shortdesc" : "Partition name",
+ "order" : 1 }
def main():
device_opt = [ "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt", \
@@ -138,7 +145,7 @@ def main():
if 0 == options.has_key("--managed"):
fail_usage("Failed: You have to enter name of managed system")
- if (0 == ["list", "monitor"].count(options["--action"].lower())) and (0 == options.has_key("--plug")):
+ if (0 == ["list", "monitor"].count(options["--action"].lower())) and (0 == options.has_key("--partition")):
fail_usage("Failed: You have to enter name of the partition")
if 1 == options.has_key("--hmc-version") and (options["--hmc-version"] != "3" and options["--hmc-version"] != "4"):
11 years, 6 months
fence-agents: master - fencing: Do not check IP address if fence agent does not need any.
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=9e797a...
Commit: 9e797a89be42e637958ec750e6776441c9557175
Parent: 0e7521cba9e9cd4e194153068013ccf01e484c9a
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Fri Nov 23 15:38:53 2012 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Sun Nov 25 13:15:25 2012 +0100
fencing: Do not check IP address if fence agent does not need any.
---
fence/agents/lib/fencing.py.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index a334be7..6a5fd0b 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import sys, getopt, time, os, uuid
+import sys, getopt, time, os, uuid, pycurl
import pexpect, re, atexit
import __main__
@@ -702,7 +702,7 @@ def check_input(device_opt, opt):
if (0 == 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")
- if 0 == options.has_key("--ip") and 0 == options.has_key("--managed"):
+ if device_opt.count("ipaddr") and 0 == options.has_key("--ip") and 0 == options.has_key("--managed"):
fail_usage("Failed: You have to enter fence address")
if (device_opt.count("no_password") == 0):
11 years, 6 months
fence-agents: master - fencing: Fix usage of UUID if option --port/plug is not defined.
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=0e7521...
Commit: 0e7521cba9e9cd4e194153068013ccf01e484c9a
Parent: a60ed3ca6fa0f63dfb09b46d99c2a281e2eed63e
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Sun Nov 25 13:14:02 2012 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Sun Nov 25 13:14:02 2012 +0100
fencing: Fix usage of UUID if option --port/plug is not defined.
---
fence/agents/lib/fencing.py.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 55a473e..a334be7 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -696,6 +696,8 @@ def check_input(device_opt, opt):
options["--uuid"] = str(uuid.UUID(options["--plug"]))
except ValueError:
pass
+ except KeyError:
+ pass
if (0 == 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")
11 years, 6 months
fence-agents: master - fencing: Move options which are used only once to appropriate fence agent
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=a60ed3...
Commit: a60ed3ca6fa0f63dfb09b46d99c2a281e2eed63e
Parent: 3cc91f4c6e7aec98bd6f4e1dddaa08876ae893d0
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Sun Nov 18 13:18:34 2012 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Sun Nov 25 13:11:34 2012 +0100
fencing: Move options which are used only once to appropriate fence agent
@note: Fence agents which are going to removed/replaced were not fixed
---
fence/agents/cisco_ucs/fence_cisco_ucs.py | 12 +++++++++
fence/agents/drac5/fence_drac5.py | 13 +++++++++-
fence/agents/ilo/fence_ilo.py | 11 ++++++++
fence/agents/lib/fencing.py.py | 37 -----------------------------
fence/agents/lpar/fence_lpar.py | 19 +++++++++++++++
5 files changed, 54 insertions(+), 38 deletions(-)
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index 0260bf0..53d2a52 100644
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -96,11 +96,23 @@ def send_command(opt, command, timeout):
return result
+def define_new_opts():
+ all_opt["suborg"] = {
+ "getopt" : "s:",
+ "longopt" : "suborg",
+ "help" : "--suborg=<path> Additional path needed to access suborganization",
+ "required" : "0",
+ "shortdesc" : "Additional path needed to access suborganization",
+ "default" : "",
+ "order" : 1 }
+
def main():
device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", \
"port", "web", "suborg" ]
atexit.register(atexit_handler)
+
+ define_new_opts()
options = check_input(device_opt, process_input(device_opt))
diff --git a/fence/agents/drac5/fence_drac5.py b/fence/agents/drac5/fence_drac5.py
index cb67179..09157fe 100644
--- a/fence/agents/drac5/fence_drac5.py
+++ b/fence/agents/drac5/fence_drac5.py
@@ -67,13 +67,24 @@ def get_list_devices(conn, options):
print "N/A"
return outlets
-
+
+def define_new_opts():
+ all_opt["drac_version"] = {
+ "getopt" : "d:",
+ "longopt" : "drac-version",
+ "help" : "-d, --drac-version=<version> Force DRAC version to use",
+ "required" : "0",
+ "shortdesc" : "Force DRAC version to use",
+ "order" : 1 }
+
def main():
device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
"drac_version", "module_name" ]
atexit.register(atexit_handler)
+ define_new_opts()
+
all_opt["cmd_prompt"]["default"] = [ "\$" ]
options = check_input(device_opt, process_input(device_opt))
diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py
index 3fdf3c7..82e1c63 100644
--- a/fence/agents/ilo/fence_ilo.py
+++ b/fence/agents/ilo/fence_ilo.py
@@ -52,11 +52,22 @@ def set_power_status(conn, options):
return
+def define_new_opts():
+ all_opt["ribcl"] = {
+ "getopt" : "r:",
+ "longopt" : "ribcl-version",
+ "help" : "-r, --ribcl-version=<version> Force ribcl version to use",
+ "required" : "0",
+ "shortdesc" : "Force ribcl version to use",
+ "order" : 1 }
+
def main():
device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "ribcl" ]
atexit.register(atexit_handler)
+ define_new_opts()
+
all_opt["login_timeout"]["default"] = "10"
all_opt["retry_on"]["default"] = "3"
all_opt["ssl"]["default"] = "1"
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index d5c67a6..55a473e 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -155,21 +155,6 @@ all_opt = {
"required" : "0",
"shortdesc" : "Force DRAC version to use",
"order" : 1 },
- "hmc_version" : {
- "getopt" : "H:",
- "longopt" : "hmc-version",
- "help" : "-H, --hmc-version=<version> Force HMC version to use: 3, 4 (default)",
- "required" : "0",
- "shortdesc" : "Force HMC version to use (3 or 4)",
- "default" : "4",
- "order" : 1 },
- "ribcl" : {
- "getopt" : "r:",
- "longopt" : "ribcl-version",
- "help" : "-r, --ribcl-version=<version> Force ribcl version to use",
- "required" : "0",
- "shortdesc" : "Force ribcl version to use",
- "order" : 1 },
"cmd_prompt" : {
"getopt" : "c:",
"longopt" : "command-prompt",
@@ -213,28 +198,6 @@ all_opt = {
"required" : "0",
"shortdesc" : "Physical switch number on device",
"order" : 1 },
- "suborg" : {
- "getopt" : "s:",
- "longopt" : "suborg",
- "help" : "--suborg=<path> Additional path needed to access suborganization",
- "required" : "0",
- "shortdesc" : "Additional path needed to access suborganization",
- "default" : "",
- "order" : 1 },
- "partition" : {
- "getopt" : "n:",
- "longopt" : "partition",
- "help" : "-n <id> Name of the partition",
- "required" : "0",
- "shortdesc" : "Partition name",
- "order" : 1 },
- "managed" : {
- "getopt" : "s:",
- "longopt" : "managed",
- "help" : "-s, --managed=<id> Name of the managed system",
- "required" : "0",
- "shortdesc" : "Managed system name",
- "order" : 1 },
"test" : {
"getopt" : "T",
"help" : "",
diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py
index 5cedc24..9233003 100644
--- a/fence/agents/lpar/fence_lpar.py
+++ b/fence/agents/lpar/fence_lpar.py
@@ -99,12 +99,31 @@ def get_lpar_list(conn, options):
return outlets
+def define_new_opts():
+ all_opt["managed"] = {
+ "getopt" : "s:",
+ "longopt" : "managed",
+ "help" : "-s, --managed=<id> Name of the managed system",
+ "required" : "0",
+ "shortdesc" : "Managed system name",
+ "order" : 1 }
+ all_opt["hmc_version"] = {
+ "getopt" : "H:",
+ "longopt" : "hmc-version",
+ "help" : "-H, --hmc-version=<version> Force HMC version to use: 3, 4 (default)",
+ "required" : "0",
+ "shortdesc" : "Force HMC version to use (3 or 4)",
+ "default" : "4",
+ "order" : 1 }
+
def main():
device_opt = [ "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt", \
"partition", "managed", "hmc_version" ]
atexit.register(atexit_handler)
+ define_new_opts()
+
all_opt["login_timeout"]["default"] = "15"
all_opt["secure"]["default"] = "1"
all_opt["cmd_prompt"]["default"] = [ ":~>", "]\$", "\$ " ]
11 years, 6 months
fence-agents: master - fencing: Add new option --ssh-options
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=3cc91f...
Commit: 3cc91f4c6e7aec98bd6f4e1dddaa08876ae893d0
Parent: 5c3d18b829011267a62564e2e025d2066c9cf07d
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Sun Nov 18 01:56:35 2012 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Sun Nov 25 13:06:34 2012 +0100
fencing: Add new option --ssh-options
All fence agents which supports ssh connection can use
--ssh-options / ssh_options to change default ssh parameters
(different cipher, config file, ...)
---
fence/agents/apc/fence_apc.py | 2 +-
fence/agents/lib/fencing.py.py | 17 ++++++++++++-----
fence/agents/rsa/fence_rsa.py | 5 ++---
fence/agents/virsh/fence_virsh.py | 3 +--
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py
index 314c0aa..ed80c64 100644
--- a/fence/agents/apc/fence_apc.py
+++ b/fence/agents/apc/fence_apc.py
@@ -180,9 +180,9 @@ def main():
atexit.register(atexit_handler)
all_opt["cmd_prompt"]["default"] = "\n>"
+ all_opt["ssh_options"]["default"] = "-1 -c blowfish"
options = check_input(device_opt, process_input(device_opt))
- options["ssh_options"] = "-1 -c blowfish"
docs = { }
docs["shortdesc"] = "Fence agent for APC over telnet/ssh"
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 61a5052..d5c67a6 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -184,6 +184,13 @@ all_opt = {
"shortdesc" : "SSH connection",
"required" : "0",
"order" : 1 },
+ "ssh_options" : {
+ "getopt" : "X:",
+ "longopt" : "ssh-options",
+ "help" : "--ssh-options=<options> SSH options to use",
+ "shortdesc" : "SSH options to use",
+ "required" : "0",
+ "order" : 1 },
"ssl" : {
"getopt" : "z",
"longopt" : "ssl",
@@ -408,7 +415,7 @@ DEPENDENCY_OPT = {
"default" : [ "help", "debug", "verbose", "quiet", "version", "action", "agent", \
"power_timeout", "shell_timeout", "login_timeout", "power_wait", "retry_on", "delay" ],
"passwd" : [ "passwd_script" ],
- "secure" : [ "identity_file" ],
+ "secure" : [ "identity_file", "ssh_options" ],
"ipaddr" : [ "inet4_only", "inet6_only" ],
"port" : [ "separator" ],
"community" : [ "snmp_auth_prot", "snmp_sec_level", "snmp_priv_prot", \
@@ -942,8 +949,8 @@ def fence_login(options):
sys.exit(EC_GENERIC_ERROR)
elif options.has_key("--ssh") and 0 == options.has_key("--identity-file"):
command = '%s %s %s@%s -p %s' % (SSH_PATH, force_ipvx, options["--username"], options["--ip"], options["--ipport"])
- if options.has_key("ssh_options"):
- command += ' ' + options["ssh_options"]
+ if options.has_key("--ssh-options"):
+ command += ' ' + options["--ssh-options"]
try:
conn = fspawn(options, command)
except pexpect.ExceptionPexpect, ex:
@@ -971,8 +978,8 @@ def fence_login(options):
conn.log_expect(options, options["--command-prompt"], int(options["--login-timeout"]))
elif options.has_key("--ssh") and options.has_key("--identity-file"):
command = '%s %s %s@%s -i %s -p %s' % (SSH_PATH, force_ipvx, options["--username"], options["--ip"], options["--identity-file"], options["--ipport"])
- if options.has_key("ssh_options"):
- command += ' ' + options["ssh_options"]
+ if options.has_key("--ssh-options"):
+ command += ' ' + options["--ssh-options"]
try:
conn = fspawn(options, command)
except pexpect.ExceptionPexpect, ex:
diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py
index 14ec88f..898c6c2 100644
--- a/fence/agents/rsa/fence_rsa.py
+++ b/fence/agents/rsa/fence_rsa.py
@@ -40,12 +40,11 @@ def main():
all_opt["login_timeout"]["default"] = 10
all_opt["cmd_prompt"]["default"] = [ ">" ]
+ # This device will not allow us to login even with LANG=C
+ all_opt["ssh_options"]["default"] = "-F /dev/null"
options = check_input(device_opt, process_input(device_opt))
- # This device will not allow us to login even with LANG=C
- options["ssh_options"] = "-F /dev/null"
-
docs = { }
docs["shortdesc"] = "Fence agent for IBM RSA"
docs["longdesc"] = "fence_rsa is an I/O Fencing agent \
diff --git a/fence/agents/virsh/fence_virsh.py b/fence/agents/virsh/fence_virsh.py
index 81edf6a..d012710 100644
--- a/fence/agents/virsh/fence_virsh.py
+++ b/fence/agents/virsh/fence_virsh.py
@@ -66,11 +66,10 @@ def main():
all_opt["secure"]["default"] = "1"
all_opt["cmd_prompt"]["default"] = [ "\[EXPECT\]#\ " ]
+ all_opt["ssh_options"]["default"] = "-t '/bin/bash -c \"PS1=\[EXPECT\]#\ /bin/bash --noprofile --norc\"'"
options = check_input(device_opt, process_input(device_opt))
- options["ssh_options"] = "-t '/bin/bash -c \"PS1=\[EXPECT\]#\ /bin/bash --noprofile --norc\"'"
-
docs = { }
docs["shortdesc"] = "Fence agent for virsh"
docs["longdesc"] = "fence_virsh is an I/O Fencing agent \
11 years, 6 months
fence-agents: master - fencing: Fix minor inconsistencies
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=5c3d18...
Commit: 5c3d18b829011267a62564e2e025d2066c9cf07d
Parent: 0299c52ffbacfe0b916ff326484da677eb5d5b30
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Sat Nov 24 11:44:00 2012 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Sat Nov 24 11:44:00 2012 +0100
fencing: Fix minor inconsistencies
* integer instead of string
* missing long options for option (--partition)
---
fence/agents/lib/fencing.py.py | 1 +
fence/agents/rsb/fence_rsb.py | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 3f994b9..61a5052 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -216,6 +216,7 @@ all_opt = {
"order" : 1 },
"partition" : {
"getopt" : "n:",
+ "longopt" : "partition",
"help" : "-n <id> Name of the partition",
"required" : "0",
"shortdesc" : "Partition name",
diff --git a/fence/agents/rsb/fence_rsb.py b/fence/agents/rsb/fence_rsb.py
index 100836c..a701156 100755
--- a/fence/agents/rsb/fence_rsb.py
+++ b/fence/agents/rsb/fence_rsb.py
@@ -57,7 +57,7 @@ def main():
# set default port for telnet only
if 0 == opt.has_key("--ssh") and 0 == opt.has_key("--ipport"):
- opt["--ipport"] = 3172
+ opt["--ipport"] = "3172"
options = check_input(device_opt, opt)
docs = { }
11 years, 6 months