Skip to contentSkip to conversation

Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-47-gbcfdaa6

Cluster-devel [email protected] 2 participants 2 messages Apr 22, 2008

lore
Share & tools
lore
#0 lore raw

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=bcfdaa69b501fef4d01abcf1104d87d00484da66

The branch, RHEL4 has been updated

       via  bcfdaa69b501fef4d01abcf1104d87d00484da66 (commit)
      from  ceee2fe27ece59ef6b3643ab1e7a4cce6688727c (commit)

Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.

- Log ----------------------------------------------------------------- commit bcfdaa69b501fef4d01abcf1104d87d00484da66

Author: Marek 'marx' Grac <[email protected]>
Date:   Tue Apr 22 17:52:01 2008 +0200

fence/agents: New fencings agents

There are new fencing agents based on a new library. They need a 'pexpect' package. If it is possible there is support for both telnet and ssh.
In this patch there are agents for: APC, BladeCenter, Drac 5, ILo and WTI.

Fence agents that support ssh in 4.7 are iLO, DRAC5, WTI, APC, and BladeCenter

-----------------------------------------------------------------------

Summary of changes:

 fence/agents/apc/apc.py                 |   94 +++++++++
 fence/agents/bladecenter/bladecenter.py |   84 ++++++++
 fence/agents/drac/drac5.py              |   73 +++++++
 fence/agents/ilo/ilo.py                 |   71 +++++++
 fence/agents/lib/fencing.py             |  339 +++++++++++++++++++++++++++++++
 fence/agents/wti/wti.py                 |  103 ++++++++++
 6 files changed, 764 insertions(+), 0 deletions(-)
 create mode 100755 fence/agents/apc/apc.py
 create mode 100755 fence/agents/bladecenter/bladecenter.py
 create mode 100755 fence/agents/drac/drac5.py
 create mode 100755 fence/agents/ilo/ilo.py
 create mode 100644 fence/agents/lib/fencing.py
 create mode 100755 fence/agents/wti/wti.py
fence/agents/apc/apc.py new file +94 -0
new file mode 100755
index 0000000..bcea997
@@ -0,0 +1,94 @@
+#!/usr/bin/python
+
+##
+## Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
+##
+## The Following Agent Has Been Tested On:
+##
+##  Model       Firmware
+## +---------------------------------------------+
+##  AP7951	AOS v2.7.0, PDU APP v2.7.3
+##
+## @note: ssh is very slow on AP7951 device
+#####
+
+import sys, re, pexpect
+sys.path.append("../lib/")
+from fencing import *
+
+def get_power_status(conn, options):
+	result = ""
+	try:
+		conn.send("1\r\n")
+		conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+		conn.send("2\r\n")
+		while 1 == conn.log_expect(options, [ options["-c"],  "Press <ENTER>" ], SHELL_TIMEOUT):
+			result += conn.before
+			conn.send("\r\n")
+		result += conn.before
+		conn.send(chr(03))		
+		conn.log_expect(options, "- Logout", SHELL_TIMEOUT)
+		conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+	except pexpect.EOF:
+		fail(EC_CONNECTION_LOST)
+	except pexpect.TIMEOUT:
+		fail(EC_TIMED_OUT)
+
+	status = re.compile("\s*"+options["-n"]+"-.*(ON|OFF)", re.IGNORECASE).search(result).group(1)
+	return status.lower().strip()
+
+def set_power_status(conn, options):
+	action = {
+		'on' : "1",
+		'off': "2"
+	}[options["-o"]]
+
+	try:
+		conn.send("1\r\n")
+		conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+		conn.send("2\r\n")
+		while 1 == conn.log_expect(options, [ options["-c"],  "Press <ENTER>" ], SHELL_TIMEOUT):
+			conn.send("\r\n")
+		conn.send(options["-n"]+"\r\n")
+		conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+		conn.send(action+"\r\n")
+		conn.log_expect(options, "Enter 'YES' to continue or <ENTER> to cancel :", SHELL_TIMEOUT)
+		conn.send("YES\r\n")
+		conn.log_expect(options, "Press <ENTER> to continue...", SHELL_TIMEOUT)
+		conn.send("\r\n")
+		conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+		conn.send(chr(03))
+		conn.log_expect(options, "- Logout", SHELL_TIMEOUT)
+		conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+	except pexcept.EOF:
+		fail(EC_CONNECTION_LOST)
+	except pexcept.TIMEOUT:
+		fail(EC_TIMED_OUT)
+
+def main():
+	device_opt = [  "help", "version", "agent", "quiet", "verbose", "debug",
+			"action", "ipaddr", "login", "passwd", "passwd_script",
+			"secure", "port", "test" ]
+
+	options = check_input(device_opt, process_input(device_opt))
+
+	## 
+	## Fence agent specific defaults
+	#####
+	if 0 == options.has_key("-c"):
+		options["-c"] = "\n>"
+
+	##
+	## Operate the fencing device
+	####
+	conn = fence_login(options)
+	fence_action(conn, options, set_power_status, get_power_status)
+
+	##
+	## Logout from system
+	######
+	conn.sendline("4")
+	conn.close()
+
+if __name__ == "__main__":
+	main()
fence/agents/bladecenter/bladecenter.py new file +84 -0

84 lines not on this page · raw message

fence/agents/drac/drac5.py new file +73 -0

73 lines not on this page · raw message

fence/agents/ilo/ilo.py new file +71 -0

71 lines not on this page · raw message

fence/agents/lib/fencing.py new file +339 -0

339 lines not on this page · raw message

fence/agents/wti/wti.py new file +103 -0

103 lines not on this page · raw message

hooks/post-receive
--
Cluster Project

#1 lore raw
Quoted 19 lines · mgrac at sourceware.org

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=bcfdaa69b501fef4d01abcf1104d87d00484da66

The branch, RHEL4 has been updated

      via  bcfdaa69b501fef4d01abcf1104d87d00484da66 (commit)
     from  ceee2fe27ece59ef6b3643ab1e7a4cce6688727c (commit)

Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.

- Log ----------------------------------------------------------------- commit bcfdaa69b501fef4d01abcf1104d87d00484da66

Author: Marek 'marx' Grac <[email protected]>
Date:   Tue Apr 22 17:52:01 2008 +0200
Quoted 8 lines

fence/agents: New fencings agents

There are new fencing agents based on a new library. They need a 'pexpect' package. If it is possible there is support for both telnet and ssh.
In this patch there are agents for: APC, BladeCenter, Drac 5, ILo and WTI.

Fence agents that support ssh in 4.7 are iLO, DRAC5, WTI, APC, and BladeCenter

guys before you enable those agents, we need to give them proper file names for the install or upgrades from RHEL4* will be a problem.

Unless you are in super hurry, let's discuss this tomorrow.

Fabio

--
I'm going to make him an offer he can't refuse.