Skip to contentSkip to conversation

Cluster Project branch, STABLE2, updated. cluster-2.03.03-17-gd8569c4

Cluster-devel [email protected] 1 participant 1 message Jun 9, 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=d8569c4b2f8fef25ea5b344ece79f4cc12e04fb4

The branch, STABLE2 has been updated

       via  d8569c4b2f8fef25ea5b344ece79f4cc12e04fb4 (commit)
       via  541d5fd690e5cce0eef140fd770ff893599f488a (commit)
       via  09dc160a34fe3a37e7209a41a80a60d759d75354 (commit)
       via  99e8ffb63960751e7170463defe80abdb730b47f (commit)
       via  5a0286041f0c0939fca217b0872ed523ed63859b (commit)
       via  8a11e709cee3a80f3da3755a92f7e80d6da45c1f (commit)
       via  1f3fc33a88118c6327e898825817a558dacc07be (commit)
       via  31d30b16d55c8919d8d0e90a3432095eba1ff2d4 (commit)
       via  3612f4c9db1073539bf2c1bc86c641be7f7aa3c2 (commit)
      from  dd97ff24427d02a2aea0057345cf8067334dcb3b (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 d8569c4b2f8fef25ea5b344ece79f4cc12e04fb4

Author: Fabio M. Di Nitto <[email protected]>
Date:   Mon Jun 9 07:03:58 2008 +0200

[GNBD/FENCE] Move fence_gnbd agent where it belongs

commit 541d5fd690e5cce0eef140fd770ff893599f488a

Author: Ryan McCabe <[email protected]>
Date:   Wed May 28 16:28:34 2008 -0400

fence: fixes and cleanups to fencing.py library

- Do not report failure if a node is successfully powered off, but fails to power on.

- Change 'pass' to 'continue' so that comments and blank lines from stdin are ignored.

- Use the full path to ssh and telnet when executing the binaries.

commit 09dc160a34fe3a37e7209a41a80a60d759d75354

Author: Fabio M. Di Nitto <[email protected]>
Date:   Thu May 22 16:43:27 2008 +0200

[CCS] Use absolute path for queries

* It is more efficient
* It is a well-defined location

commit 99e8ffb63960751e7170463defe80abdb730b47f

Author: Lon Hohberger <[email protected]>
Date:   Thu May 22 10:33:12 2008 -0400

[rgmanager] Use /cluster/rm instead of //rm

* It is more efficient
* It is a well-defined location

commit 5a0286041f0c0939fca217b0872ed523ed63859b

Author: Fabio M. Di Nitto <[email protected]>
Date:   Thu May 22 09:55:31 2008 +0200

[BUILD] Plugin the new shiny fence_ifmib agent

commit 8a11e709cee3a80f3da3755a92f7e80d6da45c1f

Author: Fabio M. Di Nitto <[email protected]>
Date:   Thu May 22 09:30:58 2008 +0200

[FENCE] Fix ifmib README to report the right fence agent

commit 1f3fc33a88118c6327e898825817a558dacc07be

Author: Fabio M. Di Nitto <[email protected]>
Date:   Thu May 22 09:28:44 2008 +0200

[FENCE] Fix copyright header for fence_ifmib manpage

commit 31d30b16d55c8919d8d0e90a3432095eba1ff2d4

Author: Ross Vandegrift <[email protected]>
Date:   Thu May 22 09:25:32 2008 +0200

[FENCE] Add fence_ifmib new agent

Many thanks to Ross Vandegrift for this submission.

commit 3612f4c9db1073539bf2c1bc86c641be7f7aa3c2

Author: Fabio M. Di Nitto <[email protected]>
Date:   Wed May 21 10:38:10 2008 +0200

[GFS2] Use proper include dir for libvolume_id

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

Summary of changes:

 ccs/ccs_tool/update.c                              |    6 +-
 ccs/daemon/misc.c                                  |    7 +-
 .../fence_gnbd => fence/agents/gnbd}/Makefile      |    3 +-
 .../tools/fence_gnbd => fence/agents/gnbd}/main.c  |    0 
 fence/agents/{apc => ifmib}/Makefile               |    2 +-
 fence/agents/ifmib/README                          |   45 ++++
 fence/agents/ifmib/fence_ifmib.py                  |  221 ++++++++++++++++++++
 fence/agents/lib/fencing.py.py                     |   37 ++--
 fence/man/Makefile                                 |    2 +
 {gnbd => fence}/man/fence_gnbd.8                   |    0 
 fence/man/fence_ifmib.8                            |   69 ++++++
 gfs2/mkfs/Makefile                                 |    1 +
 gnbd/man/Makefile                                  |    3 +-
 gnbd/tools/Makefile                                |    2 +-
 rgmanager/include/reslist.h                        |    2 +-
 15 files changed, 369 insertions(+), 31 deletions(-)
 rename {gnbd/tools/fence_gnbd => fence/agents/gnbd}/Makefile (94%)
 rename {gnbd/tools/fence_gnbd => fence/agents/gnbd}/main.c (100%)
 copy fence/agents/{apc => ifmib}/Makefile (97%)
 create mode 100644 fence/agents/ifmib/README
 create mode 100644 fence/agents/ifmib/fence_ifmib.py
 rename {gnbd => fence}/man/fence_gnbd.8 (100%)
 create mode 100644 fence/man/fence_ifmib.8
ccs/ccs_tool/update.c +3 -3
index 062c8b1..ef49d7a 100644
@@ -67,7 +67,7 @@ static int get_doc_version(xmlDocPtr ldoc)
     goto fail;
   }
 
-  obj = xmlXPathEvalExpression((xmlChar *)"//cluster/@config_version", ctx);
+  obj = xmlXPathEvalExpression((xmlChar *)"/cluster/@config_version", ctx);
 
   if (!obj || !obj->nodesetval || (obj->nodesetval->nodeNr != 1)) {
     fprintf(stderr, "Error while retrieving config_version.\n");
@@ -150,7 +150,7 @@ int update(char *location)
     return desc;
   }
 
-  if ((error = ccs_get(desc, "//@config_version", &v1_str))) {
+  if ((error = ccs_get(desc, "/cluster/@config_version", &v1_str))) {
     fprintf(stderr, "Unable to get current config_version: %s\n", strerror(-error));
     ccs_disconnect(desc);
     return error;
@@ -355,7 +355,7 @@ int update(char *location)
     return 0;
   }
 
-  if ((error = ccs_get(desc, "//@config_version", &v3_str))) {
+  if ((error = ccs_get(desc, "/cluster/@config_version", &v3_str))) {
     ccs_disconnect(desc);
     return 0;
   }
ccs/daemon/misc.c +2 -5
index 6907268..07fda2c 100644
@@ -57,7 +57,7 @@ int get_doc_version(xmlDocPtr ldoc){
     goto fail;
   }
 
-  obj = xmlXPathEvalExpression((xmlChar *)"//cluster/@config_version", ctx);
+  obj = xmlXPathEvalExpression((xmlChar *)"/cluster/@config_version", ctx);
   if(!obj || !obj->nodesetval || (obj->nodesetval->nodeNr != 1)){
     log_err("Error while retrieving config_version.\n");
     error = -ENODATA;
@@ -123,7 +123,7 @@ char *get_cluster_name(xmlDocPtr ldoc){
     goto fail;
   }
 
-  obj = xmlXPathEvalExpression((xmlChar *)"//cluster/@name", ctx);
+  obj = xmlXPathEvalExpression((xmlChar *)"/cluster/@name", ctx);
   if(!obj || !obj->nodesetval || (obj->nodesetval->nodeNr != 1)){
     log_err("Error while retrieving config_version.\n");
     error = -ENODATA;
@@ -156,6 +156,3 @@ fail:
   EXIT("get_cluster_name");
   return rtn;
 }
-
-
-
fence/agents/gnbd/Makefile renamed from gnbd/tools/fence_gnbd/Makefile +1 -2
similarity index 94%
rename from gnbd/tools/fence_gnbd/Makefile
rename to fence/agents/gnbd/Makefile
index 2976bbc..1b8a798 100644
@@ -25,10 +25,9 @@ include $(OBJDIR)/make/uninstall.mk
 
 OBJS= main.o
 
-CFLAGS += -I$(S)/../../include -I$(S)/../gnbd_import
+CFLAGS += -I$(SRCDIR)/gnbd/tools/gnbd_import
 CFLAGS += -I${incdir}
 
-
 ${TARGET}: ${OBJS}
 	$(CC) -o $@ $^ $(LDFLAGS)
 
fence/agents/gnbd/main.c renamed from gnbd/tools/fence_gnbd/main.c +0 -0
similarity index 100%
rename from gnbd/tools/fence_gnbd/main.c
rename to fence/agents/gnbd/main.c
fence/agents/ifmib/Makefile renamed from fence/agents/apc/Makefile +1 -1
similarity index 97%
copy from fence/agents/apc/Makefile
copy to fence/agents/ifmib/Makefile
index 0299a61..cf9e6de 100644
@@ -13,6 +13,6 @@
 
 include ../../../make/defines.mk
 
-TARGET= fence_apc
+TARGET= fence_ifmib
 
 include $(OBJDIR)/make/fencebuild.mk
fence/agents/ifmib/README new file +45 -0

45 lines not on this page · raw message

fence/agents/ifmib/fence_ifmib.py new file +221 -0

221 lines not on this page · raw message

fence/agents/lib/fencing.py.py +21 -16
index 6d2cf2c..44abaef 100644
@@ -10,9 +10,9 @@ import telnetlib
 
 ## do not add code here.
 #BEGIN_VERSION_GENERATION
-RELEASE_VERSION="New fence lib agent - test release on steroids"
-REDHAT_COPYRIGHT=""
-BUILD_DATE="March, 2008"
+RELEASE_VERSION = "New fence lib agent - test release on steroids"
+REDHAT_COPYRIGHT = ""
+BUILD_DATE = "March, 2008"
 #END_VERSION_GENERATION
 
 POWER_TIMEOUT = 20
@@ -29,6 +29,9 @@ EC_TIMED_OUT       = 5
 EC_WAITING_ON      = 6
 EC_WAITING_OFF     = 7
 
+TELNET_PATH = "/usr/bin/telnet"
+SSH_PATH    = "/usr/bin/ssh"
+
 all_opt = {
 	"help"    : {
 		"getopt" : "h",
@@ -124,10 +127,10 @@ class fspawn(pexpect.spawn):
 			options["debug_fh"].write(self.before + self.after)
 		return result
 
-def version(command, release, build_date, copyright):
-	print command, " ", release, " ", build_date;
-	if len(copyright) > 0:
-		print copyright
+def version(command, release, build_date, copyright_notice):
+	print command, " ", release, " ", build_date
+	if len(copyright_notice) > 0:
+		print copyright_notice
 
 def fail_usage(message = ""):
 	if len(message) > 0:
@@ -166,7 +169,8 @@ def process_input(avail_opt):
 	##
 	## Set standard environment
 	#####
-	os.unsetenv("LANG")
+	os.putenv("LANG", "C")
+	os.putenv("LC_ALL", "C")
 
 	##
 	## Prepare list of options for getopt
@@ -176,7 +180,7 @@ def process_input(avail_opt):
 		if all_opt.has_key(k):
 			getopt_string += all_opt[k]["getopt"]
 		else:
-			fail_usage("Parse error: unknown option '"+k+"'");
+			fail_usage("Parse error: unknown option '"+k+"'")
 
 	##
 	## Read options from command line or standard input
@@ -201,7 +205,8 @@ def process_input(avail_opt):
 		name = ""
 		for line in sys.stdin.readlines():
 			line = line.strip()
-			if ((line.startswith("#")) or (len(line) == 0)): pass
+			if ((line.startswith("#")) or (len(line) == 0)):
+				continue
 
 			(name, value) = (line + "=").split("=", 1)
 			value = value[:-1]
@@ -294,7 +299,7 @@ def check_input(device_opt, opt):
 	return options
 	
 def wait_power_status(tn, options, get_power_fn):
-	for x in range(POWER_TIMEOUT):
+	for dummy in xrange(POWER_TIMEOUT):
 		if get_power_fn(tn, options) != options["-o"]:
 			time.sleep(1)
 		else:
@@ -331,7 +336,7 @@ def fence_action(tn, options, set_power_fn, get_power_fn):
 		options["-o"] = "on"
 		set_power_fn(tn, options)
 		if wait_power_status(tn, options, get_power_fn) == 0:
-			fail(EC_WAITING_ON)
+			sys.stderr.write('Timed out waiting to power ON\n')
 		print "Success: Rebooted"
 	elif options["-o"] == "status":
 		print "Status: " + status.upper()
@@ -342,10 +347,10 @@ def fence_login(options):
 		re_pass  = re.compile("password", re.IGNORECASE)
 
 		if options.has_key("-x") and 0 == options.has_key("-k"):
-			command = 'ssh ' + options["-l"] + "@" + options["-a"]
+			command = '%s %s@%s' % (SSH_PATH, options["-l"], options["-a"])
 			if options.has_key("ssh_options"):
 				command += ' ' + options["ssh_options"]
-			conn = fspawn (command)
+			conn = fspawn(command)
 			result = conn.log_expect(options, [ "ssword:", "Are you sure you want to continue connecting (yes/no)?" ], LOGIN_TIMEOUT)
 			if result == 1:
 				conn.sendline("yes")
@@ -353,7 +358,7 @@ def fence_login(options):
 			conn.sendline(options["-p"])
 			conn.log_expect(options, options["-c"], LOGIN_TIMEOUT)
 		elif options.has_key("-x") and 1 == options.has_key("-k"):
-			conn = fspawn ('ssh ' + options["-l"] + "@" + options["-a"] + " -i " + options["-k"])
+			conn = fspawn('%s %s@%s -i %s' % (SSH_PATH, options["-l"], options["-a"], options["-k"]))
 			result = conn.log_expect(options, [ options["-c"], "Are you sure you want to continue connecting (yes/no)?", "Enter passphrase for key '"+options["-k"]+"':" ], LOGIN_TIMEOUT)
 			if result == 1:
 				conn.sendline("yes")
@@ -365,7 +370,7 @@ def fence_login(options):
 				else:
 					fail_usage("Failed: You have to enter passphrase (-p) for identity file")
 		else:
-			conn = fspawn ('telnet ' + options["-a"])
+			conn = fspawn('%s %s' % (TELNET_PATH, options["-a"]))
 			conn.log_expect(options, re_login, LOGIN_TIMEOUT)
 			conn.send(options["-l"]+"\r\n")
 			conn.log_expect(options, re_pass, SHELL_TIMEOUT)
fence/man/Makefile +2 -0
index 147c7ec..2c18dba 100644
@@ -19,6 +19,8 @@ TARGET= fence.8 \
 	fence_brocade.8 \
 	fence_drac.8 \
 	fence_egenera.8 \
+	fence_gnbd.8 \
+	fence_ifmib.8 \
 	fence_ilo.8 \
 	fence_manual.8 \
 	fence_mcdata.8 \
fence/man/fence_gnbd.8 renamed from gnbd/man/fence_gnbd.8 +0 -0
similarity index 100%
rename from gnbd/man/fence_gnbd.8
rename to fence/man/fence_gnbd.8
fence/man/fence_ifmib.8 new file +69 -0

69 lines not on this page · raw message

gfs2/mkfs/Makefile +1 -0
index ffd97e5..35c521a 100644
@@ -26,6 +26,7 @@ OBJS=	main.o \
 
 CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
 CFLAGS += -I${KERNEL_SRC}/include/
+CFLAGS += -I${volidincdir}
 CFLAGS += -I$(S)/../include -I$(S)/../libgfs2
 CFLAGS += -I${incdir}
 
gnbd/man/Makefile +1 -2
index 64119d4..c6e60ad 100644
@@ -14,8 +14,7 @@
 TARGET= gnbd.8 \
 	gnbd_export.8 \
 	gnbd_import.8 \
-	gnbd_serv.8 \
-	fence_gnbd.8
+	gnbd_serv.8
 
 include ../../make/defines.mk
 include $(OBJDIR)/make/man.mk
gnbd/tools/Makefile +1 -1
index e5c9a4e..5a4f708 100644
@@ -14,4 +14,4 @@
 include ../../make/defines.mk
 include $(OBJDIR)/make/passthrough.mk
 
-SUBDIRS=fence_gnbd gnbd_export gnbd_import
+SUBDIRS=gnbd_export gnbd_import
rgmanager/include/reslist.h +1 -1
index 4efe879..219386b 100644
@@ -57,7 +57,7 @@
 #endif
 
 #define RESOURCE_ROOTDIR	SHAREDIR
-#define RESOURCE_TREE_ROOT	"//rm"
+#define RESOURCE_TREE_ROOT	"/cluster/rm"
 #define RESOURCE_BASE		RESOURCE_TREE_ROOT "/resources"
 #define RESOURCE_ROOT_FMT 	RESOURCE_TREE_ROOT "/%s[%d]"
 

hooks/post-receive
--
Cluster Project