public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: "Marek Grác" <marx@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: fence-agents: master - fencing: Fencing fails when using implicit connection method other then telnet
Date: Fri, 21 Aug 2009 11:22:00 -0000	[thread overview]
Message-ID: <20090821112209.6B87E1201A2@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=8de93defd88b88045379c66faf694fda3d13394b
Commit:        8de93defd88b88045379c66faf694fda3d13394b
Parent:        d07c924e6c5637f0731e76d7d5fcf84288854b24
Author:        Marek 'marx' Grac <mgrac@redhat.com>
AuthorDate:    Fri Aug 21 13:17:00 2009 +0200
Committer:     Marek 'marx' Grac <mgrac@redhat.com>
CommitterDate: Fri Aug 21 13:17:00 2009 +0200

fencing: Fencing fails when using implicit connection method other then telnet

Bug was introduced with ipport option where port number was set before
-x/-z was set. It did not affect those who use -x / -z.
---
 fence/agents/alom/fence_alom.py   |    8 ++++----
 fence/agents/ilo/fence_ilo.py     |    7 ++++---
 fence/agents/ldom/fence_ldom.py   |    6 +++---
 fence/agents/lpar/fence_lpar.py   |    5 +++--
 fence/agents/virsh/fence_virsh.py |    6 +++---
 5 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/fence/agents/alom/fence_alom.py b/fence/agents/alom/fence_alom.py
index 5fe72aa..d88f718 100644
--- a/fence/agents/alom/fence_alom.py
+++ b/fence/agents/alom/fence_alom.py
@@ -48,15 +48,15 @@ def main():
 			"secure",  "test", "inet4_only", "inet6_only", "ipport" ]
 
 	atexit.register(atexit_handler)
-
-	options = check_input(device_opt, process_input(device_opt))
+	
+	pinput = process_input(device_opt)
+	pinput["-x"] = 1
+	options = check_input(device_opt, pinput)
 
 	# Default command is sc>
 	if (not options.has_key("-c")):
 		options["-c"] = "sc\>\ "
 
-	# Default to ssh
-	options["-x"] = 1
 	options["telnet_over_ssh"] = 1
 	
 	show_docs(options)
diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py
index e15052d..7483780 100755
--- a/fence/agents/ilo/fence_ilo.py
+++ b/fence/agents/ilo/fence_ilo.py
@@ -60,9 +60,10 @@ def main():
 
 	atexit.register(atexit_handler)
 
-	options = check_input(device_opt, process_input(device_opt))
-
-	options["-z"] = 1
+	pinput = process_input(device_opt)
+	pinput["-z"] = 1
+	options = check_input(device_opt, pinput)
+	
 	LOGIN_TIMEOUT = 10
 
 	show_docs(options)
diff --git a/fence/agents/ldom/fence_ldom.py b/fence/agents/ldom/fence_ldom.py
index e6bf656..d5e7285 100644
--- a/fence/agents/ldom/fence_ldom.py
+++ b/fence/agents/ldom/fence_ldom.py
@@ -88,7 +88,9 @@ def main():
 
 	atexit.register(atexit_handler)
 
-	options = check_input(device_opt, process_input(device_opt))
+	pinput = process_input(device_opt)
+	pinput["-x"] = 1
+	options = check_input(device_opt, pinput)
 
 	## 
 	## Fence agent specific defaults
@@ -96,8 +98,6 @@ def main():
 	if (not options.has_key("-c")):
 		options["-c"] = "\ $"
 	
-
-	options["-x"] = 1
 	show_docs(options)
 
 	##
diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py
index ea10596..9a8e636 100644
--- a/fence/agents/lpar/fence_lpar.py
+++ b/fence/agents/lpar/fence_lpar.py
@@ -137,8 +137,9 @@ def main():
 
 	atexit.register(atexit_handler)
 
-	options = check_input(device_opt, process_input(device_opt))
-	options["-x"] = 1
+	pinput = process_input(device_opt)
+	pinput["-x"] = 1
+	options = check_input(device_opt, pinput)
 
 	## 
 	## Fence agent specific settings and default values
diff --git a/fence/agents/virsh/fence_virsh.py b/fence/agents/virsh/fence_virsh.py
index 432bdb9..eae7405 100644
--- a/fence/agents/virsh/fence_virsh.py
+++ b/fence/agents/virsh/fence_virsh.py
@@ -67,14 +67,14 @@ def main():
 
 	atexit.register(atexit_handler)
 
-	options = check_input(device_opt, process_input(device_opt))
+	pinput = process_input(device_opt)
+	pinput["-x"] = 1
+	options = check_input(device_opt, pinput)
 
 	## Defaults for fence agent
 	if 0 == options.has_key("-c"):
 		options["-c"] = "\[EXPECT\]#\ "
 
-	options["-x"]=1
-
 	options["ssh_options"]="-t '/bin/bash -c \"PS1=\[EXPECT\]#\  /bin/bash --noprofile --norc\"'"
 
 	show_docs(options)


                 reply	other threads:[~2009-08-21 11:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090821112209.6B87E1201A2@lists.fedorahosted.org \
    --to=marx@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).