cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/cman/qdisk main.c
@ 2007-01-05 10:34 pcaulfield
  0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2007-01-05 10:34 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield at sourceware.org	2007-01-05 10:34:32

Modified files:
	cman/qdisk     : main.c 

Log message:
	Clear the node structure before calling cman_get_node().
	Thanks to simone.gotti at email.it

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&r1=1.4&r2=1.5

--- cluster/cman/qdisk/main.c	2006/10/03 18:06:40	1.4
+++ cluster/cman/qdisk/main.c	2007/01/05 10:34:32	1.5
@@ -957,6 +957,7 @@
 		return -1;
 	}
 
+	memset(&me, 0, sizeof(me));
 	if (cman_get_node(ch, CMAN_NODEID_US, &me) < 0) {
 		printf("Could not determine local node ID; cannot start\n");
 		return -1;



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cluster-devel] cluster/cman/qdisk main.c
@ 2007-01-05 10:35 pcaulfield
  0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2007-01-05 10:35 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	pcaulfield at sourceware.org	2007-01-05 10:35:03

Modified files:
	cman/qdisk     : main.c 

Log message:
	Clear the node structure before calling cman_get_node().
	Thanks to simone.gotti at email.it

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4&r2=1.4.2.1

--- cluster/cman/qdisk/main.c	2006/10/03 18:06:40	1.4
+++ cluster/cman/qdisk/main.c	2007/01/05 10:35:03	1.4.2.1
@@ -957,6 +957,7 @@
 		return -1;
 	}
 
+	memset(&me, 0, sizeof(me));
 	if (cman_get_node(ch, CMAN_NODEID_US, &me) < 0) {
 		printf("Could not determine local node ID; cannot start\n");
 		return -1;



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cluster-devel] cluster/cman/qdisk main.c
@ 2007-01-16 15:00 lhh
  0 siblings, 0 replies; 10+ messages in thread
From: lhh @ 2007-01-16 15:00 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2007-01-16 15:00:30

Modified files:
	cman/qdisk     : main.c 

Log message:
	Apply patch from Simone Gotti; fixes #222744/#222838

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&r1=1.5&r2=1.6

--- cluster/cman/qdisk/main.c	2007/01/05 10:34:32	1.5
+++ cluster/cman/qdisk/main.c	2007/01/16 15:00:29	1.6
@@ -135,6 +135,7 @@
 			       sb, sizeof(*sb)) < 0) {
 			clulog(LOG_WARNING,"Error reading node ID block %d\n",
 			       x+1);
+			continue;
 		}
 		swab_status_block_t(sb);
 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cluster-devel] cluster/cman/qdisk main.c
@ 2007-01-16 15:16 lhh
  0 siblings, 0 replies; 10+ messages in thread
From: lhh @ 2007-01-16 15:16 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2007-01-16 15:16:57

Modified files:
	cman/qdisk     : main.c 

Log message:
	Apply patch from Simone Gotti; fixes #222744/#222838

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.1&r2=1.4.2.2

--- cluster/cman/qdisk/main.c	2007/01/05 10:35:03	1.4.2.1
+++ cluster/cman/qdisk/main.c	2007/01/16 15:16:56	1.4.2.2
@@ -135,6 +135,7 @@
 			       sb, sizeof(*sb)) < 0) {
 			clulog(LOG_WARNING,"Error reading node ID block %d\n",
 			       x+1);
+			continue;
 		}
 		swab_status_block_t(sb);
 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cluster-devel] cluster/cman/qdisk main.c
@ 2007-01-16 15:36 lhh
  0 siblings, 0 replies; 10+ messages in thread
From: lhh @ 2007-01-16 15:36 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2007-01-16 15:36:17

Modified files:
	cman/qdisk     : main.c 

Log message:
	Apply patch from Simone Gotti; fixes #222744/#222838

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.3&r2=1.1.2.4

--- cluster/cman/qdisk/main.c	2006/10/05 20:30:21	1.1.2.3
+++ cluster/cman/qdisk/main.c	2007/01/16 15:36:17	1.1.2.4
@@ -135,6 +135,7 @@
 			       sb, sizeof(*sb)) < 0) {
 			clulog(LOG_WARNING,"Error reading node ID block %d\n",
 			       x+1);
+			continue;
 		}
 		swab_status_block_t(sb);
 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cluster-devel] cluster/cman/qdisk main.c
@ 2007-01-16 16:20 lhh
  0 siblings, 0 replies; 10+ messages in thread
From: lhh @ 2007-01-16 16:20 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL50
Changes by:	lhh at sourceware.org	2007-01-16 16:20:49

Modified files:
	cman/qdisk     : main.c 

Log message:
	Apply patch from Simone Gotti; fixes #222744/#222838

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.4&r2=1.4.4.1

--- cluster/cman/qdisk/main.c	2006/10/03 18:06:40	1.4
+++ cluster/cman/qdisk/main.c	2007/01/16 16:20:48	1.4.4.1
@@ -135,6 +135,7 @@
 			       sb, sizeof(*sb)) < 0) {
 			clulog(LOG_WARNING,"Error reading node ID block %d\n",
 			       x+1);
+			continue;
 		}
 		swab_status_block_t(sb);
 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cluster-devel] cluster/cman/qdisk main.c
@ 2007-11-01  0:25 fabbione
  0 siblings, 0 replies; 10+ messages in thread
From: fabbione @ 2007-11-01  0:25 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	fabbione at sourceware.org	2007-11-01 00:25:28

Modified files:
	cman/qdisk     : main.c 

Log message:
	If votes for quorumd is _not_ specified in cluster.conf, then
	automatically set votes to number of nodes - 1.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&r1=1.10&r2=1.11

--- cluster/cman/qdisk/main.c	2007/03/20 19:37:24	1.10
+++ cluster/cman/qdisk/main.c	2007/11/01 00:25:28	1.11
@@ -1209,14 +1209,30 @@
 	}
 	if (ctx->qc_master_wait <= ctx->qc_tko_up)
 		ctx->qc_master_wait = ctx->qc_tko_up + 1;
-		
+
 	/* Get votes */
+
+	/* check if votes is set in cluster.conf */
 	snprintf(query, sizeof(query), "/cluster/quorumd/@votes");
 	if (ccs_get(ccsfd, query, &val) == 0) {
 		ctx->qc_votes = atoi(val);
 		free(val);
 		if (ctx->qc_votes < 0)
 			ctx->qc_votes = 0;
+	} else { /* if votes is not set, default to node_num - 1 */
+		int nodes = 0, error;
+		for (;;) {
+			error = ccs_get_list(ccsfd, "/cluster/clusternodes/child::*", &val);
+			if (error || !val)
+				break;
+
+			nodes++;
+		}
+		nodes--;
+		if (nodes < 0)
+			nodes = 0;
+
+		ctx->qc_votes = nodes;
 	}
 
 	/* Get device */



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cluster-devel] cluster/cman/qdisk main.c
@ 2007-12-04 20:26 lhh
  0 siblings, 0 replies; 10+ messages in thread
From: lhh @ 2007-12-04 20:26 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2007-12-04 20:26:52

Modified files:
	cman/qdisk     : main.c 

Log message:
	Remove extraneous hunk

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.7&r2=1.4.2.8

--- cluster/cman/qdisk/main.c	2007/12/04 20:24:43	1.4.2.7
+++ cluster/cman/qdisk/main.c	2007/12/04 20:26:51	1.4.2.8
@@ -506,42 +506,6 @@
 		return -1;
 	}
 
-#if 0
-	if (ctx->qc_status_sockname) {
-		ctx->qc_status_sock = socket(PF_LOCAL, SOCK_STREAM, 0);
-
-		if (ctx->qc_status_sockname < 0) {
-			clulog(LOG_ERR,
-			       "Could not create local socket %s: %s\n",
-			       qc->qc_status_sockname, strerror(errno));
-			free(qc->qc_status_sockname);
-			qc->qc_status_sockname = NULL;
-		} else {
-			sun.sun_family = PF_LOCAL;
-			snprintf(sun.sun_path, sizeof(sun.sun_path),
-				 qc->qc_status_sockname);
-			unlink(qc->qc_status_sockname);
-			if (bind(ctx->qc_status_sock,
-				 (struct sockaddr *)&sun, sizeof(sun)) < 0) {
-				clulog(LOG_ERR, "Could not bind to local "
-				       "socket %s: %s\n",
-				       qc->qc_status_sockname,
-				       strerror(errno));
-				free(qc->qc_status_sockname);
-				qc->qc_status_sockname = NULL;
-				close(qc->qc_status_sock);
-				qc->qc_status_sock = -1;
-			}
-		}
-	} else {
-		qc->qc_status_sock = -1;
-	}
-
-	if (qc->qc_status_sock >= 0) {
-		listen(qc->qc_status_sock, 5);
-	}
-#endif
-
 	while (++x <= ctx->qc_tko && _running) {
 		read_node_blocks(ctx, ni, max);
 		check_transitions(ctx, ni, max, NULL);



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cluster-devel] cluster/cman/qdisk main.c
@ 2008-01-25 18:13 lhh
  0 siblings, 0 replies; 10+ messages in thread
From: lhh @ 2008-01-25 18:13 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2008-01-25 18:13:24

Modified files:
	cman/qdisk     : main.c 

Log message:
	Fix qdiskd master abdication logic (#430264)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&r1=1.12&r2=1.13

--- cluster/cman/qdisk/main.c	2007/11/15 04:14:15	1.12
+++ cluster/cman/qdisk/main.c	2008/01/25 18:13:24	1.13
@@ -932,7 +932,8 @@
 		ctx->qc_master = master_exists(ctx, ni, max, &low_id, &count);
 
 		/* Resolve master conflict, if one exists */
-		if (count > 1 && ctx->qc_status == S_MASTER) {
+		if (count >= 1 && ctx->qc_status == S_MASTER &&
+		    ctx->qc_master != ctx->qc_my_id) {
 			clulog(LOG_WARNING, "Master conflict: abdicating\n");
 
 			/* Handle just like a recent upgrade */



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cluster-devel] cluster/cman/qdisk main.c
@ 2008-02-08 18:38 lhh
  0 siblings, 0 replies; 10+ messages in thread
From: lhh @ 2008-02-08 18:38 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2008-02-08 18:38:41

Modified files:
	cman/qdisk     : main.c 

Log message:
	Fix unused variable error

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.10&r2=1.1.2.11

--- cluster/cman/qdisk/main.c	2007/12/04 21:06:58	1.1.2.10
+++ cluster/cman/qdisk/main.c	2008/02/08 18:38:41	1.1.2.11
@@ -453,7 +453,6 @@
 quorum_init(qd_ctx *ctx, node_info_t *ni, int max, struct h_data *h, int maxh)
 {
 	int x = 0, score, maxscore, score_req;
-	char buf[64];
 
 	clulog(LOG_INFO, "Quorum Daemon Initializing\n");
 	



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-02-08 18:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-16 15:00 [Cluster-devel] cluster/cman/qdisk main.c lhh
  -- strict thread matches above, loose matches on Subject: below --
2008-02-08 18:38 lhh
2008-01-25 18:13 lhh
2007-12-04 20:26 lhh
2007-11-01  0:25 fabbione
2007-01-16 16:20 lhh
2007-01-16 15:36 lhh
2007-01-16 15:16 lhh
2007-01-05 10:35 pcaulfield
2007-01-05 10:34 pcaulfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).