Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 930524 Details for
Bug 614122
[RFE] port qdisk as corosync votequorum external quorum device
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
votequorum: Block sync until qdevice poll
tmp.okvSdECk7q (text/plain), 3.99 KB, created by
Jan Friesse
on 2014-08-25 14:39:40 UTC
(
hide
)
Description:
votequorum: Block sync until qdevice poll
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2014-08-25 14:39:40 UTC
Size:
3.99 KB
patch
obsolete
>From b4c99346352ce39cf96f7b12943811c896b89caa Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Mon, 4 Aug 2014 15:54:09 +0200 >Subject: [PATCH] votequorum: Block sync until qdevice poll > >If qdevice is registered a alive, corosync waits in sync phase until >timeout expires or qdevice votes with correct nodeid parameter. > >This gives qdevice time to decide to vote or not undisturbed and without >time hazard. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >Reviewed-by: Christine Caulfield <ccaulfie@redhat.com> >--- > exec/votequorum.c | 48 +++++++++++++++++++++++++++++++++++++++++++----- > 1 files changed, 43 insertions(+), 5 deletions(-) > >diff --git a/exec/votequorum.c b/exec/votequorum.c >index dd5bea7..7781077 100644 >--- a/exec/votequorum.c >+++ b/exec/votequorum.c >@@ -234,6 +234,8 @@ static corosync_timer_handle_t qdevice_timer; > static int qdevice_timer_set = 0; > static corosync_timer_handle_t last_man_standing_timer; > static int last_man_standing_timer_set = 0; >+static int sync_nodeinfo_sent = 0; >+static int sync_wait_for_poll_or_timeout = 0; > > /* > * Service Interfaces required by service_message_handler struct >@@ -310,6 +312,8 @@ static int quorum_lib_init_fn (void *conn); > > static int quorum_lib_exit_fn (void *conn); > >+static void qdevice_timer_fn(void *arg); >+ > static void message_handler_req_lib_votequorum_getinfo (void *conn, > const void *message); > >@@ -2182,6 +2186,8 @@ static void votequorum_sync_init ( > ENTER(); > > sync_in_progress = 1; >+ sync_nodeinfo_sent = 0; >+ sync_wait_for_poll_or_timeout = 0; > > if (member_list_entries > 1) { > us->flags &= ~NODE_FLAGS_FIRST; >@@ -2231,17 +2237,46 @@ static void votequorum_sync_init ( > quorum_members_entries = member_list_entries; > memcpy(&quorum_ringid, ring_id, sizeof(*ring_id)); > >+ if (us->flags & NODE_FLAGS_QDEVICE_REGISTERED && us->flags & NODE_FLAGS_QDEVICE_ALIVE) { >+ /* >+ * Reset poll timer. Sync waiting is interrupted on valid qdevice poll or after timeout >+ */ >+ if (qdevice_timer_set) { >+ corosync_api->timer_delete(qdevice_timer); >+ } >+ corosync_api->timer_add_duration((unsigned long long)qdevice_timeout*1000000, qdevice, >+ qdevice_timer_fn, &qdevice_timer); >+ qdevice_timer_set = 1; >+ sync_wait_for_poll_or_timeout = 1; >+ >+ log_printf(LOGSYS_LEVEL_INFO, "waiting for quorum device %s poll (but maximum for %u ms)", >+ qdevice_name, qdevice_timeout); >+ } >+ > LEAVE(); > } > > static int votequorum_sync_process (void) > { >- votequorum_exec_send_nodeinfo(us->node_id); >- votequorum_exec_send_nodeinfo(VOTEQUORUM_QDEVICE_NODEID); >- if (strlen(qdevice_name)) { >- votequorum_exec_send_qdevice_reg(VOTEQUORUM_QDEVICE_OPERATION_REGISTER, >- qdevice_name); >+ >+ if (!sync_nodeinfo_sent) { >+ votequorum_exec_send_nodeinfo(us->node_id); >+ votequorum_exec_send_nodeinfo(VOTEQUORUM_QDEVICE_NODEID); >+ if (strlen(qdevice_name)) { >+ votequorum_exec_send_qdevice_reg(VOTEQUORUM_QDEVICE_OPERATION_REGISTER, >+ qdevice_name); >+ } >+ sync_nodeinfo_sent = 1; > } >+ >+ if (us->flags & NODE_FLAGS_QDEVICE_REGISTERED && sync_wait_for_poll_or_timeout) { >+ /* >+ * Waiting for qdevice to poll with new ringid or timeout >+ */ >+ >+ return (-1); >+ } >+ > return 0; > } > >@@ -2336,6 +2371,7 @@ static void qdevice_timer_fn(void *arg) > votequorum_exec_send_nodeinfo(us->node_id); > > qdevice_timer_set = 0; >+ sync_wait_for_poll_or_timeout = 0; > > LEAVE(); > } >@@ -2675,6 +2711,7 @@ static void message_handler_req_lib_votequorum_qdevice_unregister (void *conn, > if (qdevice_timer_set) { > corosync_api->timer_delete(qdevice_timer); > qdevice_timer_set = 0; >+ sync_wait_for_poll_or_timeout = 0; > } > us->flags &= ~NODE_FLAGS_QDEVICE_REGISTERED; > us->flags &= ~NODE_FLAGS_QDEVICE_ALIVE; >@@ -2777,6 +2814,7 @@ static void message_handler_req_lib_votequorum_qdevice_poll (void *conn, > corosync_api->timer_add_duration((unsigned long long)qdevice_timeout*1000000, qdevice, > qdevice_timer_fn, &qdevice_timer); > qdevice_timer_set = 1; >+ sync_wait_for_poll_or_timeout = 0; > } else { > error = CS_ERR_NOT_EXIST; > } >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 614122
:
930521
|
930522
|
930523
|
930524
|
930525
|
930526
|
1205194