summaryrefslogtreecommitdiff
path: root/daemons/cmirrord
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2014-03-19 14:43:00 -0500
committerJonathan Brassow <jbrassow@redhat.com>2014-03-19 14:43:00 -0500
commitbdd7baeab39f7ef61817b2c48008852aefdbcdb0 (patch)
treecbacd8e5345e3190a910c49baccda45558ced146 /daemons/cmirrord
parentf12ee43f2eaba5d38b1925a5a34b1746c1d66985 (diff)
downloadlvm2-bdd7baeab39f7ef61817b2c48008852aefdbcdb0.tar.gz
cmirrord: Clean-up stray warning message (attempt #2)
There are two types of CPG communications in a corosync cluster: messages and state transitions. Cmirrord processes the state transitions first. When a cluster mirror issues a POSTSUSPEND, it signals the end of cluster communication with the rest of the nodes in the cluster. The POSTSUSPEND marks the last communication of the 'message' type that will go around the cluster. The node then calls cpg_leave which causes a final 'state transition' communication to all of the nodes. Once the out-going node receives its own state transition notice from the cluster, it finalizes the leave. At this point, the state of the log is 'INVALID'; but it is possible that there remains some cluster trafic that was queued up behind the state transition that still wants to be processed. It is harmless to attempt to dispatch any remaining messages - they won't be delivered because the node is no longer in the cluster. However, there was a warning message that was being printed in this case that is now removed by this patch. The failure of the dispatch created a false positive condition that triggered the message.
Diffstat (limited to 'daemons/cmirrord')
-rw-r--r--daemons/cmirrord/cluster.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/daemons/cmirrord/cluster.c b/daemons/cmirrord/cluster.c
index 67391f13c..3fd5d2371 100644
--- a/daemons/cmirrord/cluster.c
+++ b/daemons/cmirrord/cluster.c
@@ -985,9 +985,9 @@ static int do_cluster_work(void *data __attribute__((unused)))
dm_list_iterate_items_safe(entry, tmp, &clog_cpg_list) {
r = cpg_dispatch(entry->handle, CS_DISPATCH_ALL);
if (r != CS_OK) {
- if ((entry->cpg_state == INVALID) &&
- (entry->state == LEAVING) &&
- (r == CS_ERR_BAD_HANDLE))
+ if ((r == CS_ERR_BAD_HANDLE) &&
+ ((entry->state == INVALID) ||
+ (entry->state == LEAVING)))
/* It's ok if we've left the cluster */
r = CS_OK;
else