fence-agents: master - fence_wti: support non-default TCP ports

Fabio M. Di Nitto fabbione at fedoraproject.org
Mon Jul 5 10:42:21 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=6cb492f23d8507880d745be9dbbf3c30c38969fa
Commit:        6cb492f23d8507880d745be9dbbf3c30c38969fa
Parent:        77ed84a9cd7c863529f9cd564bb524aa302e171b
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Fri Jun 18 16:26:57 2010 +0200
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Mon Jul 5 12:41:56 2010 +0200

fence_wti: support non-default TCP ports

WTI do not use standard process to login so it needs special patch
(based on the code in library)

Resolves: rhbz#593726
---
 fence/agents/wti/fence_wti.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py
index 81c0ab9..a71852a 100644
--- a/fence/agents/wti/fence_wti.py
+++ b/fence/agents/wti/fence_wti.py
@@ -76,7 +76,7 @@ def main():
 	device_opt = [  "help", "version", "agent", "quiet", "verbose", "debug",
 			"action", "ipaddr", "login", "passwd", "passwd_script",
 			"cmd_prompt", "secure", "identity_file", "port", "no_login", "no_password",
-			"test", "separator", "inet4_only", "inet6_only",
+			"test", "separator", "inet4_only", "inet6_only", "ipport",
 			"power_timeout", "shell_timeout", "login_timeout", "power_wait" ]
 
 	atexit.register(atexit_handler)
@@ -107,7 +107,9 @@ is running because the connection will block any necessary fencing actions."
 	if 0 == options.has_key("-x"):
 		try:
 			try:
-				conn = fspawn('%s %s' % (TELNET_PATH, options["-a"]))
+				conn = fspawn(TELNET_PATH)
+				conn.send("set binary\n")
+				conn.send("open %s -%s\n"%(options["-a"], options["-u"]))
 			except pexpect.ExceptionPexpect, ex:
 				sys.stderr.write(str(ex) + "\n")
 				sys.stderr.write("Due to limitations, binary dependencies on fence agents "


More information about the cluster-commits mailing list