Skip to contentSkip to conversation

Cluster Project branch, master, updated. gfs-kernel_0_1_22-216-gd4696e2

Cluster-devel [email protected] 1 participant 1 message Apr 25, 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=d4696e2a5c137c58a6c58a87747ce423b133d7b1

The branch, master has been updated

       via  d4696e2a5c137c58a6c58a87747ce423b133d7b1 (commit)
      from  1307d58730031a6d9f7401ba7182034e73280b49 (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 d4696e2a5c137c58a6c58a87747ce423b133d7b1

Author: David Teigland <[email protected]>
Date:   Fri Apr 25 15:35:16 2008 -0500

fenced: process queries in a thread

Add a thread for responding to the new libfenced queries, since fenced blocks for long periods when fencing nodes.

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

Summary of changes:

 fence/fenced/Makefile  |    2 +-
 fence/fenced/fenced.h  |    1 +
 fence/fenced/main.c    |  126 ++++++++++++++++++++++++++++++++++++++----------
 fence/libfenced/main.c |   18 ++++----
 4 files changed, 111 insertions(+), 36 deletions(-)
fence/fenced/Makefile +1 -1
index 65d4262..4104842 100644
@@ -37,7 +37,7 @@ CFLAGS += -I$(S) -I$(S)/../include -I$(SRCDIR)/group/lib
 CFLAGS += -I${incdir}
 
 LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -L${openaislibdir} -lccs -lcman -lcpg
-LDFLAGS += -L${fencelibdir} -L${openaislibdir} -lfence -lcpg
+LDFLAGS += -L${fencelibdir} -L${openaislibdir} -lfence -lcpg -lpthread
 LDFLAGS += -L../../group/lib -l group
 
 
fence/fenced/fenced.h +1 -0
index 3b25814..140ecd2 100644
@@ -20,6 +20,7 @@
 #define MAX_NODENAME_LEN		255
 
 #define FENCED_SOCK_PATH		"fenced_socket"
+#define FENCED_QUERY_SOCK_PATH		"fenced_query_socket"
 
 #define FENCED_MAGIC			0x0FE11CED
 #define FENCED_VERSION			0x00010001
fence/fenced/main.c +100 -26

243 lines not on this page · raw message

fence/libfenced/main.c +9 -9
index 6929049..4bd928f 100644
@@ -59,7 +59,7 @@ static int do_write(int fd, void *buf, size_t count)
 	return 0;
 }
 
-static int do_connect(void)
+static int do_connect(char *sock_path)
 {
 	struct sockaddr_un sun;
 	socklen_t addrlen;
@@ -71,7 +71,7 @@ static int do_connect(void)
 
 	memset(&sun, 0, sizeof(sun));
 	sun.sun_family = AF_UNIX;
-	strcpy(&sun.sun_path[1], FENCED_SOCK_PATH);
+	strcpy(&sun.sun_path[1], sock_path);
 	addrlen = sizeof(sa_family_t) + strlen(sun.sun_path+1) + 1;
 
 	rv = connect(fd, (struct sockaddr *) &sun, addrlen);
@@ -100,7 +100,7 @@ int fenced_join(void)
 
 	init_header(&h, FENCED_CMD_JOIN, sizeof(h));
 
-	fd = do_connect();
+	fd = do_connect(FENCED_SOCK_PATH);
 	if (fd < 0) {
 		rv = fd;
 		goto out;
@@ -119,7 +119,7 @@ int fenced_leave(void)
 
 	init_header(&h, FENCED_CMD_LEAVE, sizeof(h));
 
-	fd = do_connect();
+	fd = do_connect(FENCED_SOCK_PATH);
 	if (fd < 0) {
 		rv = fd;
 		goto out;
@@ -146,7 +146,7 @@ int fenced_external(char *name)
 		namelen = MAX_NODENAME_LEN;
 	memcpy(msg + sizeof(struct fenced_header), name, namelen);
 
-	fd = do_connect();
+	fd = do_connect(FENCED_SOCK_PATH);
 	if (fd < 0) {
 		rv = fd;
 		goto out;
@@ -175,7 +175,7 @@ int fenced_dump_debug(char *buf)
 	}
 	memset(reply, 0, reply_len);
 
-	fd = do_connect();
+	fd = do_connect(FENCED_QUERY_SOCK_PATH);
 	if (fd < 0) {
 		rv = fd;
 		goto out;
@@ -212,7 +212,7 @@ int fenced_node_info(int nodeid, struct fenced_node *node)
 
 	memset(reply, 0, sizeof(reply));
 
-	fd = do_connect();
+	fd = do_connect(FENCED_QUERY_SOCK_PATH);
 	if (fd < 0) {
 		rv = fd;
 		goto out;
@@ -249,7 +249,7 @@ int fenced_domain_info(struct fenced_domain *domain)
 
 	memset(reply, 0, sizeof(reply));
 
-	fd = do_connect();
+	fd = do_connect(FENCED_QUERY_SOCK_PATH);
 	if (fd < 0) {
 		rv = fd;
 		goto out;
@@ -294,7 +294,7 @@ int fenced_domain_members(int max, int *count, struct fenced_node *members)
 	}
 	memset(reply, 0, reply_len);
 
-	fd = do_connect();
+	fd = do_connect(FENCED_QUERY_SOCK_PATH);
 	if (fd < 0) {
 		rv = fd;
 		goto out;

hooks/post-receive
--
Cluster Project