[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-67-gc4f4cf4



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=c4f4cf4c01ff9d91d3d9406e32bf3d2a69f20848

The branch, RHEL5 has been updated
       via  c4f4cf4c01ff9d91d3d9406e32bf3d2a69f20848 (commit)
      from  ce7240aa680a09727c804815f0ed583af74c68f3 (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 c4f4cf4c01ff9d91d3d9406e32bf3d2a69f20848
Author: Jonathan Brassow <jbrassow redhat com>
Date:   Thu May 8 19:14:23 2008 -0500

    clogd:  Minor clean-up
    
    Pull out a function that was put in place purely for
    debugging.

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

Summary of changes:
 cmirror/src/cluster.c |   29 ++++++++++-------------------
 cmirror/src/cluster.h |    3 +--
 2 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/cmirror/src/cluster.c b/cmirror/src/cluster.c
index d1ab920..4dc454c 100644
--- a/cmirror/src/cluster.c
+++ b/cmirror/src/cluster.c
@@ -76,9 +76,10 @@ static struct list_head clog_cpg_list;
  *
  * Returns: 0 on success, -Exxx on error
  */
-static int cluster_send(struct clog_tfr *tfr)
+int cluster_send(struct clog_tfr *tfr)
 {
 	int r;
+	int count=0;
 	int found;
 	struct iovec iov;
 	struct clog_cpg *entry, *tmp;
@@ -101,14 +102,19 @@ static int cluster_send(struct clog_tfr *tfr)
 		LOG_ERROR("[%s] Attempt to send request to cluster while CPG not valid: "
 			  "request = %s", SHORT_UUID(tfr->uuid), RQ_TYPE(tfr->request_type));
 
-	r = cpg_mcast_joined(entry->handle, CPG_TYPE_AGREED, &iov, 1);
+	do {
+		r = cpg_mcast_joined(entry->handle, CPG_TYPE_AGREED, &iov, 1);
+		if ((r != SA_AIS_ERR_TRY_AGAIN) || (count++ > 5))
+			break;
+		sleep(1);
+	} while (1);
+
 	if (r == CPG_OK)
 		return 0;
-	if (r == SA_AIS_ERR_TRY_AGAIN)
-		return -EAGAIN;
 
 	/* error codes found in openais/cpg.h */
 	LOG_ERROR("cpg_mcast_joined error: %d%s", r,
+		  (r == SA_AIS_ERR_TRY_AGAIN) ? "/SA_AIS_ERR_TRY_AGAIN" :
 		  (r == CPG_ERR_BAD_HANDLE) ? "/CPG_ERR_BAD_HANDLE" :
 		  (r == CPG_ERR_ACCESS) ? "/CPG_ERR_ACCESS" : "");
 
@@ -116,21 +122,6 @@ static int cluster_send(struct clog_tfr *tfr)
 	return -EBADE;
 }
 
-/* FIXME: this is here for debugging... remove */
-int cluster_send_helper(struct clog_tfr *tfr, int line, char *file, const char *function)
-{
-	int r;
-
-	do {
-		r = cluster_send(tfr);
-		if (r)
-			LOG_ERROR("cluster_send failed at: %s:%d (%s)",
-				  file, line, function);
-	} while (r == -EAGAIN);
-
-	return r;
-}
-
 static int clog_tfr_cmp(struct clog_tfr *a, struct clog_tfr *b)
 {
 	int r = 0;
diff --git a/cmirror/src/cluster.h b/cmirror/src/cluster.h
index 20526b4..7ee05bf 100644
--- a/cmirror/src/cluster.h
+++ b/cmirror/src/cluster.h
@@ -7,7 +7,6 @@ void cleanup_cluster(void);
 int create_cluster_cpg(char *str);
 int destroy_cluster_cpg(char *str);
 
-int cluster_send_helper(struct clog_tfr *tfr, int line, char *file, const char *function);
-#define cluster_send(x) cluster_send_helper((x), __LINE__, __FILE__, __FUNCTION__)
+int cluster_send(struct clog_tfr *tfr);
 
 #endif /* __CLUSTER_LOG_CLUSTER_DOT_H__ */


hooks/post-receive
--
Cluster Project


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