1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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.
This commit is contained in:
Jonathan Brassow 2014-03-19 14:43:00 -05:00
parent f12ee43f2e
commit bdd7baeab3

View File

@ -985,9 +985,9 @@ static int do_cluster_work(void *data __attribute__((unused)))
dm_list_iterate_items_safe(entry, tmp, &clog_cpg_list) { dm_list_iterate_items_safe(entry, tmp, &clog_cpg_list) {
r = cpg_dispatch(entry->handle, CS_DISPATCH_ALL); r = cpg_dispatch(entry->handle, CS_DISPATCH_ALL);
if (r != CS_OK) { if (r != CS_OK) {
if ((entry->cpg_state == INVALID) && if ((r == CS_ERR_BAD_HANDLE) &&
(entry->state == LEAVING) && ((entry->state == INVALID) ||
(r == CS_ERR_BAD_HANDLE)) (entry->state == LEAVING)))
/* It's ok if we've left the cluster */ /* It's ok if we've left the cluster */
r = CS_OK; r = CS_OK;
else else