[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-13-g1acab71



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=1acab71f585b845992e6070d6616644690f4e444

The branch, RHEL5 has been updated
       via  1acab71f585b845992e6070d6616644690f4e444 (commit)
       via  4cbc5a146009d8fe648c1817641ad04633478c37 (commit)
       via  8db6a0907ab1c443e9f3c2799ef98a1c069ec41d (commit)
       via  e651985b0fc5741396f65845df2d17be05328034 (commit)
       via  f667470748a1968963e0c17f325aadfcbb5c7415 (commit)
      from  14e702986f37607300cafdf68886daf15c10be38 (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 1acab71f585b845992e6070d6616644690f4e444
Author: Lon Hohberger <lhh redhat com>
Date:   Wed Mar 19 15:15:11 2008 -0400

    [rgmanager] Update changelog for rhel5 branch

commit 4cbc5a146009d8fe648c1817641ad04633478c37
Author: Lon Hohberger <lhh redhat com>
Date:   Wed Mar 19 15:14:19 2008 -0400

    [rgmanager] Fix #432998
    
    Fix a bug causing incorrect return codes during service stop operations

commit 8db6a0907ab1c443e9f3c2799ef98a1c069ec41d
Merge: e651985b0fc5741396f65845df2d17be05328034 14e702986f37607300cafdf68886daf15c10be38
Author: Lon Hohberger <lhh redhat com>
Date:   Wed Mar 19 13:55:21 2008 -0400

    Merge branch 'RHEL5' of ssh://sources.redhat.com/git/cluster into rhel5

commit e651985b0fc5741396f65845df2d17be05328034
Merge: f667470748a1968963e0c17f325aadfcbb5c7415 b70ad6fe5a5795a699ad208ab009a4c952e9078f
Author: Lon Hohberger <lhh redhat com>
Date:   Tue Mar 11 14:53:04 2008 -0400

    Merge branch 'RHEL5' of ssh://sources.redhat.com/git/cluster into rhel5

commit f667470748a1968963e0c17f325aadfcbb5c7415
Author: Lon Hohberger <lhh redhat com>
Date:   Tue Mar 4 17:24:15 2008 -0500

    [fence] Make fence_xvmd support reloading of key files on the fly.

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

Summary of changes:
 fence/agents/xvm/fence_xvm.c    |    2 +-
 fence/agents/xvm/fence_xvmd.c   |   31 +++++++++++++++++++++++++++++--
 fence/agents/xvm/simple_auth.c  |    2 ++
 fence/agents/xvm/xvm.h          |    1 +
 rgmanager/ChangeLog             |    3 +++
 rgmanager/src/daemons/restree.c |    2 +-
 6 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/fence/agents/xvm/fence_xvm.c b/fence/agents/xvm/fence_xvm.c
index bd1eba9..898a55f 100644
--- a/fence/agents/xvm/fence_xvm.c
+++ b/fence/agents/xvm/fence_xvm.c
@@ -217,7 +217,7 @@ int
 fence_xen_domain(fence_xvm_args_t *args)
 {
 	ip_list_t ipl;
-	char key[4096];
+	char key[MAX_KEY_LEN];
 	int lfd, key_len = 0, fd;
 	int attempts = 0;
 	
diff --git a/fence/agents/xvm/fence_xvmd.c b/fence/agents/xvm/fence_xvmd.c
index 47d59fd..d7d25ca 100644
--- a/fence/agents/xvm/fence_xvmd.c
+++ b/fence/agents/xvm/fence_xvmd.c
@@ -55,6 +55,7 @@
 #include "debug.h"
 
 static int running = 1;
+static int reload_key;
 
 
 int cleanup_xml(char *xmldesc, char **ret, size_t *retsz);
@@ -596,6 +597,27 @@ xvmd_loop(cman_handle_t ch, void *h, int fd, fence_xvm_args_t *args,
 			virConnectClose(vp);
 			vp = NULL;
 		}
+
+		if (reload_key) {
+			char temp_key[MAX_KEY_LEN];
+			int ret;
+
+			reload_key = 0;
+
+			ret = read_key_file(args->key_file, temp_key, sizeof(temp_key));
+			if (ret < 0) {
+				printf("Could not read %s; not updating key",
+					args->key_file);
+			} else {
+				memcpy(key, temp_key, MAX_KEY_LEN);
+				key_len = (size_t) ret;
+
+				if (args->auth == AUTH_NONE)
+					args->auth = AUTH_SHA256;
+				if (args->hash == HASH_NONE)
+					args->hash = HASH_SHA256;
+			}
+		}
 		
 		n = select(fd+1, &rfds, NULL, NULL, &tv);
 		if (n < 0)
@@ -701,6 +723,11 @@ sigint_handler(int sig)
 	running = 0;
 }
 
+void
+sighup_handler(int sig)
+{
+	reload_key = 1;
+}
 
 void malloc_dump_table(void);
 
@@ -710,7 +737,7 @@ main(int argc, char **argv)
 {
 	fence_xvm_args_t args;
 	int mc_sock;
-	char key[4096];
+	char key[MAX_KEY_LEN];
 	int key_len = 0, x;
 	char *my_options = "dfi:a:p:C:c:k:u?hLXV";
 	cman_handle_t ch = NULL;
@@ -803,7 +830,6 @@ main(int argc, char **argv)
 		if (x)
 			printf("Checkpoint initialized\n");
 	}
-
 	if (args.family == PF_INET)
 		mc_sock = ipv4_recv_sk(args.addr, args.port);
 	else
@@ -814,6 +840,7 @@ main(int argc, char **argv)
 	}
 
 
+	signal(SIGHUP, sighup_handler);
 	signal(SIGINT, sigint_handler);
 	signal(SIGTERM, sigint_handler);
 	signal(SIGQUIT, sigint_handler);
diff --git a/fence/agents/xvm/simple_auth.c b/fence/agents/xvm/simple_auth.c
index 0064e5c..7eb26ee 100644
--- a/fence/agents/xvm/simple_auth.c
+++ b/fence/agents/xvm/simple_auth.c
@@ -390,6 +390,8 @@ read_key_file(char *file, char *key, size_t max_len)
 	while (remain) {
 		nread = read(fd, p, remain);
 		if (nread < 0) {
+			if (errno == EINTR)
+				continue;
 			dbg_printf(2, "Error from read: %s\n", strerror(errno));
 			close(fd);
 			return -1;
diff --git a/fence/agents/xvm/xvm.h b/fence/agents/xvm/xvm.h
index a423e67..b035d24 100644
--- a/fence/agents/xvm/xvm.h
+++ b/fence/agents/xvm/xvm.h
@@ -57,6 +57,7 @@ typedef enum {
 } fence_cmd_t;
 
 #define MAX_HASH_LENGTH SHA512_LENGTH
+#define MAX_KEY_LEN 4096
 
 typedef struct __attribute__ ((packed)) _fence_req {
 	uint8_t  request;		/* Fence request */
diff --git a/rgmanager/ChangeLog b/rgmanager/ChangeLog
index 49cd4a0..b28e23e 100644
--- a/rgmanager/ChangeLog
+++ b/rgmanager/ChangeLog
@@ -1,3 +1,6 @@
+2008-03-19 Lon Hohberger <lhh at redhat.com>
+	* src/daemons/restree.c: Fix #432998
+
 2008-03-04 Lon Hohberger <lhh at redhat.com>
 	* src/resources/Makefile, ASEHAagent.sh: Add support for Sybase ASE
 	failover, #435795
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index fc9cde1..d08bdb0 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -1315,7 +1315,7 @@ _res_op_internal(resource_node_t **tree, resource_t *first,
 	/* Stop should occur after children have stopped */
 	if (me && (op == RS_STOP)) {
 		node->rn_flags &= ~RF_NEEDSTOP;
-		rv = res_exec(node, op, NULL, 0);
+		rv |= res_exec(node, op, NULL, 0);
 
 		if (rv != 0) {
 			node->rn_state = RES_FAILED;


hooks/post-receive
--
Cluster Project


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]