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 931001 Details for
Bug 1069254
corosync RFE: limit udpu messages to ring members only
[?]
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]
totemudpu: Send msgs to all members occasionally
tmp.cFXwRM8dcT (text/plain), 3.99 KB, created by
Jan Friesse
on 2014-08-26 13:47:25 UTC
(
hide
)
Description:
totemudpu: Send msgs to all members occasionally
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2014-08-26 13:47:25 UTC
Size:
3.99 KB
patch
obsolete
>From 2429481b96d895c366ca27c82a2bd7cfee55af15 Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Tue, 19 Aug 2014 16:05:34 +0200 >Subject: [PATCH] totemudpu: Send msgs to all members occasionally > >To follow spec it's needed to send messages to all nodes (not only >active members) from time to time to detect merge. > >This is needed in situations when totemsrp merge timer isn't running >(because there is enough messages sent by processors) to detect merge. > >Example scenario: >- 3 nodes, all of them running cpgverify >- One node is isolated (iptables for example) >- Node is un-isolated > >Without this commit, node will not merge as long as the cpgverify is >running. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >Reviewed-by: Christine Caulfield <ccaulfie@redhat.com> >--- > exec/totemudpu.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++- > 1 files changed, 66 insertions(+), 1 deletions(-) > >diff --git a/exec/totemudpu.c b/exec/totemudpu.c >index ef4449f..69837c7 100644 >--- a/exec/totemudpu.c >+++ b/exec/totemudpu.c >@@ -178,6 +178,12 @@ struct totemudpu_instance { > struct totem_ip_address token_target; > > int token_socket; >+ >+ qb_loop_timer_handle timer_merge_detect_timeout; >+ >+ int send_merge_detect_message; >+ >+ unsigned int merge_detect_messages_sent_before_timeout; > }; > > struct work_item { >@@ -198,6 +204,12 @@ static int totemudpu_create_sending_socket( > int totemudpu_member_list_rebind_ip ( > void *udpu_context); > >+static void totemudpu_start_merge_detect_timeout( >+ void *udpu_context); >+ >+static void totemudpu_stop_merge_detect_timeout( >+ void *udpu_context); >+ > static struct totem_ip_address localhost; > > static void totemudpu_instance_initialize (struct totemudpu_instance *instance) >@@ -357,7 +369,11 @@ static inline void mcast_sendmsg ( > struct totemudpu_member, > list); > >- if (only_active && !member->active) >+ /* >+ * Do not send multicast message if message is not "flush", member >+ * is inactive and timeout for sending merge message didn't expired. >+ */ >+ if (only_active && !member->active && !instance->send_merge_detect_message) > continue ; > > totemip_totemip_to_sockaddr_convert(&member->member, >@@ -392,6 +408,14 @@ static inline void mcast_sendmsg ( > "sendmsg(mcast) failed (non-critical)"); > } > } >+ >+ if (!only_active || instance->send_merge_detect_message) { >+ /* >+ * Current message was sent to all nodes >+ */ >+ instance->merge_detect_messages_sent_before_timeout++; >+ instance->send_merge_detect_message = 0; >+ } > } > > int totemudpu_finalize ( >@@ -406,6 +430,8 @@ int totemudpu_finalize ( > close (instance->token_socket); > } > >+ totemudpu_stop_merge_detect_timeout(instance); >+ > return (res); > } > >@@ -824,6 +850,8 @@ int totemudpu_initialize ( > timer_function_netif_check_timeout, > &instance->timer_netif_check_timeout); > >+ totemudpu_start_merge_detect_timeout(instance); >+ > *udpu_context = instance; > return (0); > } >@@ -1217,3 +1245,40 @@ int totemudpu_member_set_active ( > > return (0); > } >+ >+static void timer_function_merge_detect_timeout ( >+ void *data) >+{ >+ struct totemudpu_instance *instance = (struct totemudpu_instance *)data; >+ >+ if (instance->merge_detect_messages_sent_before_timeout == 0) { >+ instance->send_merge_detect_message = 1; >+ } >+ >+ instance->merge_detect_messages_sent_before_timeout = 0; >+ >+ totemudpu_start_merge_detect_timeout(instance); >+} >+ >+static void totemudpu_start_merge_detect_timeout( >+ void *udpu_context) >+{ >+ struct totemudpu_instance *instance = (struct totemudpu_instance *)udpu_context; >+ >+ qb_loop_timer_add(instance->totemudpu_poll_handle, >+ QB_LOOP_MED, >+ instance->totem_config->merge_timeout * 2 * QB_TIME_NS_IN_MSEC, >+ (void *)instance, >+ timer_function_merge_detect_timeout, >+ &instance->timer_merge_detect_timeout); >+ >+} >+ >+static void totemudpu_stop_merge_detect_timeout( >+ void *udpu_context) >+{ >+ struct totemudpu_instance *instance = (struct totemudpu_instance *)udpu_context; >+ >+ qb_loop_timer_del(instance->totemudpu_poll_handle, >+ instance->timer_merge_detect_timeout); >+} >-- >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 1069254
:
930986
|
930987
|
930989
|
930998
| 931001