dlm: master - dlm_controld: unify fence delay variations
David Teigland
teigland at fedoraproject.org
Tue Jun 25 19:29:17 UTC 2013
Gitweb: http://git.fedorahosted.org/git/?p=dlm.git;a=commitdiff;h=2548250de3991f1f0aca297bbd072b525a132841
Commit: 2548250de3991f1f0aca297bbd072b525a132841
Parent: f367c91ac4f4f8012456f4916c0c99b00d8569c4
Author: David Teigland <teigland at redhat.com>
AuthorDate: Tue Jun 25 13:18:47 2013 -0500
Committer: David Teigland <teigland at redhat.com>
CommitterDate: Tue Jun 25 13:18:47 2013 -0500
dlm_controld: unify fence delay variations
The fence delay period begins after a node joins the
cluster or joins the daemon cpg. Apply this delay
to both startup and normal fencing.
Signed-off-by: David Teigland <teigland at redhat.com>
---
dlm_controld/daemon_cpg.c | 15 +++++++--------
dlm_controld/dlm_daemon.h | 2 +-
dlm_controld/member.c | 2 +-
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlm_controld/daemon_cpg.c b/dlm_controld/daemon_cpg.c
index 0db48f5..d88cd46 100644
--- a/dlm_controld/daemon_cpg.c
+++ b/dlm_controld/daemon_cpg.c
@@ -107,7 +107,6 @@ static int daemon_remove_count;
static int daemon_ringid_wait;
static struct cpg_ring_id daemon_ringid;
static int daemon_fence_pid;
-static uint64_t daemon_last_join_monotime;
static uint32_t last_join_seq;
static uint32_t send_fipu_seq;
static int wait_clear_fipu;
@@ -868,15 +867,15 @@ static void daemon_fence_work(void)
if (!opt(enable_startup_fencing_ind))
continue;
- if (!daemon_last_join_monotime) {
- log_debug("fence startup %d wait for confchg", node->nodeid);
+ if (!fence_delay_begin) {
+ log_debug("fence startup %d wait for initial delay", node->nodeid);
continue;
}
- if (monotime() - daemon_last_join_monotime < opt(post_join_delay_ind)) {
+ if (monotime() - fence_delay_begin < opt(post_join_delay_ind)) {
log_debug("fence startup %d delay %d from %llu",
node->nodeid, opt(post_join_delay_ind),
- (unsigned long long)daemon_last_join_monotime);
+ (unsigned long long)fence_delay_begin);
retry = 1;
continue;
}
@@ -959,10 +958,10 @@ static void daemon_fence_work(void)
time between it joining the cluster (giving cluster quorum)
and joining the daemon cpg, which allows it to bypass fencing */
- if (monotime() - cluster_last_join_monotime < opt(post_join_delay_ind)) {
+ if (monotime() - fence_delay_begin < opt(post_join_delay_ind)) {
log_debug("fence request %d delay %d from %llu",
node->nodeid, opt(post_join_delay_ind),
- (unsigned long long)cluster_last_join_monotime);
+ (unsigned long long)fence_delay_begin);
node->delay_fencing = 1;
retry = 1;
continue;
@@ -2042,7 +2041,7 @@ static void confchg_cb_daemon(cpg_handle_t handle,
node->daemon_member = 1;
node->daemon_add_time = now;
- daemon_last_join_monotime = now;
+ fence_delay_begin = now;
last_join_seq++;
/* a joining node shows prev members in joined list */
diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h
index dbe22ba..62508ea 100644
--- a/dlm_controld/dlm_daemon.h
+++ b/dlm_controld/dlm_daemon.h
@@ -171,7 +171,7 @@ EXTERN int plock_ci;
EXTERN struct list_head lockspaces;
EXTERN int cluster_quorate;
EXTERN int cluster_two_node;
-EXTERN uint64_t cluster_last_join_monotime;
+EXTERN uint64_t fence_delay_begin;
EXTERN uint64_t cluster_quorate_monotime;
EXTERN uint64_t cluster_joined_monotime;
EXTERN uint64_t cluster_joined_walltime;
diff --git a/dlm_controld/member.c b/dlm_controld/member.c
index fca3248..d4031ee 100644
--- a/dlm_controld/member.c
+++ b/dlm_controld/member.c
@@ -151,7 +151,7 @@ static void quorum_callback(quorum_handle_t h, uint32_t quorate,
quorum_nodes[i], cluster_ringid_seq);
add_cluster_node(quorum_nodes[i], now);
- cluster_last_join_monotime = now;
+ fence_delay_begin = now;
err = corosync_cfg_get_node_addrs(ch, quorum_nodes[i],
MAX_NODE_ADDRESSES,
More information about the cluster-commits
mailing list