Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sbd checks activity of the totem #85

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/sbd-cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ static int cpg_membership_entries = -1;
static cmap_handle_t cmap_handle = 0;
static cmap_track_handle_t track_handle = 0;
static GSource *cmap_source = NULL;

static uint64_t orf_token_rx = 0, new_orf_token_rx = 0;
#endif

void
Expand Down Expand Up @@ -261,12 +263,19 @@ notify_timer_cb(gpointer data)

#endif
case pcmk_cluster_corosync:
if (cmap_get_uint64(cmap_handle, "runtime.totem.pg.mrp.srp.orf_token_rx", &new_orf_token_rx) == CS_OK) {
// cl_log(LOG_INFO, "orf_token_rx=%u", new_orf_token_rx);
if (orf_token_rx == new_orf_token_rx) // totem is frozen, don't notify parent
break;
orf_token_rx = new_orf_token_rx;
}
notify_parent();
break;
#if HAVE_DECL_PCMK_CLUSTER_CMAN
case pcmk_cluster_cman:
#endif
/* TODO - Make a CPG call and only call notify_parent() when we get a reply */
notify_parent();
break;
#endif

default:
break;
Expand Down