cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/daemon cpg.c
Date: 13 Oct 2006 15:57:23 -0000	[thread overview]
Message-ID: <20061013155723.27703.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at sourceware.org	2006-10-13 15:57:23

Modified files:
	group/daemon   : cpg.c 

Log message:
	If cpg_join or cpg_leave are stuck in a retry loop, put an error
	message in syslog after ten seconds.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/cpg.c.diff?cvsroot=cluster&r1=1.35&r2=1.36

--- cluster/group/daemon/cpg.c	2006/10/06 16:55:19	1.35
+++ cluster/group/daemon/cpg.c	2006/10/13 15:57:23	1.36
@@ -475,7 +475,7 @@
 	cpg_error_t error;
 	cpg_handle_t h;
 	struct cpg_name name;
-	int fd, ci;
+	int fd, ci, i = 0;
 
 	error = cpg_initialize(&h, &callbacks);
 	if (error != CPG_OK) {
@@ -502,6 +502,8 @@
 	if (error == CPG_ERR_TRY_AGAIN) {
 		log_debug("cpg_join error retry");
 		sleep(1);
+		if (!(++i % 10))
+			log_error(g, "cpg_join error retrying");
 		goto retry;
 	}
 	if (error != CPG_OK) {
@@ -518,6 +520,7 @@
 {
 	cpg_error_t error;
 	struct cpg_name name;
+	int i = 0;
 
 	memset(&name, 0, sizeof(name));
 	sprintf(name.value, "%d_%s", g->level, g->name);
@@ -528,6 +531,8 @@
 	if (error == CPG_ERR_TRY_AGAIN) {
 		log_debug("cpg_leave error retry");
 		sleep(1);
+		if (!(++i % 10))
+			log_error(g, "cpg_leave error retrying");
 		goto retry;
 	}
 	if (error != CPG_OK) {



             reply	other threads:[~2006-10-13 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 15:57 teigland [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-28 19:26 [Cluster-devel] cluster/group/daemon cpg.c teigland
2006-09-08 23:14 teigland
2006-07-07 15:13 teigland
2006-06-22 22:24 teigland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061013155723.27703.qmail@sourceware.org \
    --to=teigland@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).