public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: ccaulfield@sourceware.org
To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com
Subject: Cluster Project branch, master, updated. cluster-2.99.05-37-g8a1c6af
Date: Tue, 01 Jul 2008 14:49:00 -0000	[thread overview]
Message-ID: <20080701144931.17655.qmail@sourceware.org> (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=8a1c6afa6e267803342838b7cb54d5afd1069ccc

The branch, master has been updated
       via  8a1c6afa6e267803342838b7cb54d5afd1069ccc (commit)
      from  f174491f5e9211bcdc21be79b63c4b1bf73766c0 (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 8a1c6afa6e267803342838b7cb54d5afd1069ccc
Author: Christine Caulfield <ccaulfie@redhat.com>
Date:   Tue Jul 1 15:45:53 2008 +0100

    [CMAN] Add a config update callback
    
    Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>

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

Summary of changes:
 cman/daemon/cnxman-socket.h |    1 +
 cman/daemon/commands.c      |    3 +++
 cman/lib/libcman.h          |    8 +++++---
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/cman/daemon/cnxman-socket.h b/cman/daemon/cnxman-socket.h
index 40df33b..798fa02 100644
--- a/cman/daemon/cnxman-socket.h
+++ b/cman/daemon/cnxman-socket.h
@@ -92,6 +92,7 @@
 #define EVENT_REASON_STATECHANGE  1
 #define EVENT_REASON_PORTOPENED   2
 #define EVENT_REASON_TRY_SHUTDOWN 3
+#define EVENT_REASON_CONFIG_UPDATE 4
 
 /* Shutdown flags */
 #define SHUTDOWN_ANYWAY           1
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 175050d..961fc4a 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1064,6 +1064,7 @@ static void ccsd_timer_fn(void *arg)
 		log_printf(LOG_ERR, "Now got CCS information version %d, continuing\n", config_version);
 		config_error = 0;
 		recalculate_quorum(0, 0);
+		notify_listeners(NULL, EVENT_REASON_CONFIG_UPDATE, config_version);
 	}
 }
 
@@ -1561,6 +1562,7 @@ static int valid_transition_msg(int nodeid, struct cl_transmsg *msg)
 			send_reconfigure(us->node_id, RECONFIG_PARAM_CONFIG_VERSION, config_version);
 		}
 		recalculate_quorum(0, 0);
+		notify_listeners(NULL, EVENT_REASON_CONFIG_UPDATE, config_version);
 	}
 
 
@@ -1718,6 +1720,7 @@ static void do_reconfigure_msg(void *data)
 			openais_timer_add_duration((unsigned long long)ccsd_poll_interval*1000000, NULL,
 						   ccsd_timer_fn, &ccsd_timer);
 		}
+		notify_listeners(NULL, EVENT_REASON_CONFIG_UPDATE, config_version);
 		break;
 	}
 }
diff --git a/cman/lib/libcman.h b/cman/lib/libcman.h
index ea3d087..82049a7 100644
--- a/cman/lib/libcman.h
+++ b/cman/lib/libcman.h
@@ -43,11 +43,13 @@ typedef void *cman_handle_t;
  * for TRY_SHUTDOWN           arg == 1 for ANYWAY, otherwise 0 (ie if arg == 1 
  * 			      then cman WILL shutdown regardless
  *                            of your response, think of this as advance warning)
+ * for CONFIG_UPDATE          arg will be the new config version
  */
 typedef enum {CMAN_REASON_PORTCLOSED,
 	      CMAN_REASON_STATECHANGE,
               CMAN_REASON_PORTOPENED,
-              CMAN_REASON_TRY_SHUTDOWN} cman_call_reason_t;
+              CMAN_REASON_TRY_SHUTDOWN,
+              CMAN_REASON_CONFIG_UPDATE} cman_call_reason_t;
 
 /*
  * Reason flags for cman_leave
@@ -171,14 +173,14 @@ typedef struct cman_qdev_info {
  * call other cman_* functions while in these two callbacks:
  */
 
-/* Callback routine for a membership event */
+/* Callback routine for a membership or other event */
 typedef void (*cman_callback_t)(cman_handle_t handle, void *privdata, int reason, int arg);
 
 /* Callback routine for data received */
 typedef void (*cman_datacallback_t)(cman_handle_t handle, void *privdata,
 				    char *buf, int len, uint8_t port, int nodeid);
 
-
+/* Callback for nodes joining/leaving */
 typedef void (*cman_confchgcallback_t)(cman_handle_t handle, void *privdata,
 				       unsigned int *member_list, int member_list_entries,
 				       unsigned int *left_list, int left_list_entries,


hooks/post-receive
--
Cluster Project


                 reply	other threads:[~2008-07-01 14:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080701144931.17655.qmail@sourceware.org \
    --to=ccaulfield@sourceware.org \
    --cc=cluster-cvs@sources.redhat.com \
    --cc=cluster-devel@redhat.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).