On Wed, Feb 03, 2010 at 03:34:46PM -0700, Steven Dake wrote:
> good for merge
Let me know when this is merged and I will test SYNC_V2 with the MSG
service. Thanks.
Ryan
> On Tue, 2010-02-02 at 19:35 +1100, Angus Salkeld wrote:
> > Hi
> >
> > This is Steven's patch I have just done some testing (looks good).
> >
> > Steve: I also removed a duplicate "static enum cs_sync_mode
> > minimum_sync_mode;"
> >
> > I tested as follows:
> >
> > 1) with compat=whitetank (should use sync v1 & v2 engines, and all
> > sync_init()'s get called)
> >
> > echo " " > /tmp/corosync.log
> > service openais start
> > grep Compatibility /tmp/corosync.log
> > Feb 02 19:24:21 corosync [MAIN ] main_service_ready Compatibility mode set
> > to whitetank. Using V1 and V2 of the synchronization engine.
> >
> > = [correct compat mode set]
> >
> > restart openais on another node and I get:
> > grep _sync_init /tmp/corosync.log | cut -d' ' -f5 | sort | uniq
> > [CPG
> > [EVT
> > [LCK
> > [MSG
> >
> > = [all services with a sync handler called]
> >
> > grep SYNC /tmp/corosync.log | cut -d' ' -f5 | sort | uniq
> > [SYNC
> > [SYNCV2]
> >
> > = [both sync engines used]
> >
> > 2) with compat=none (should use sync v2 engine only, and all sync_init()'s
> > get called)
> >
> > echo " " > /tmp/corosync.log
> > service openais start
> > grep Compatibility /tmp/corosync.log
> > Feb 02 19:19:20 corosync [MAIN ] main_service_ready Compatibility mode set
> > to none. Using V2 of the synchronization engine.
> >
> > = [correct compat mode set]
> >
> > restart openais on another node and I get:
> > grep _sync_init /tmp/corosync.log | cut -d' ' -f5 | sort | uniq
> > [CPG
> > [EVT
> > [LCK
> > [MSG
> >
> > = [all services with a sync handler called]
> >
> > grep SYNC /tmp/corosync.log | cut -d' ' -f5 | sort | uniq
> > [SYNCV2]
> >
> > = [only the v2 sync engine used]
> >
> > (so sync seems to run well in both modes)
> >
> > Regards
> > Angus
> >
> > ---
> > exec/main.c | 42 ++++++++++++++++++++----------------------
> > 1 files changed, 20 insertions(+), 22 deletions(-)
> >
> > diff --git a/exec/main.c b/exec/main.c
> > index 0aab772..5b50086 100644
> > --- a/exec/main.c
> > +++ b/exec/main.c
> > @@ -122,8 +122,6 @@ static struct corosync_api_v1 *api = NULL;
> >
> > static enum cs_sync_mode minimum_sync_mode;
> >
> > -static enum cs_sync_mode minimum_sync_mode;
> > -
> > static int sync_in_process = 1;
> >
> > static hdb_handle_t corosync_poll_handle;
> > @@ -1181,6 +1179,26 @@ static void main_service_ready (void)
> > evil_init (api);
> > corosync_stats_init ();
> > corosync_totem_stats_init ();
> > + if (minimum_sync_mode == CS_SYNC_V2) {
> > + log_printf (LOGSYS_LEVEL_NOTICE, "Compatibility mode set to
> > none. Using V2 of the synchronization engine.\n");
> > + sync_v2_init (
> > + corosync_sync_v2_callbacks_retrieve,
> > + corosync_sync_completed);
> > + } else
> > + if (minimum_sync_mode == CS_SYNC_V1) {
> > + log_printf (LOGSYS_LEVEL_NOTICE, "Compatibility mode set to
> > whitetank. Using V1 and V2 of the synchronization engine.\n");
> > + sync_register (
> > + corosync_sync_callbacks_retrieve,
> > + sync_v2_memb_list_determine,
> > + sync_v2_memb_list_abort,
> > + sync_v2_start);
> > +
> > + sync_v2_init (
> > + corosync_sync_v2_callbacks_retrieve,
> > + corosync_sync_completed);
> > + }
> > +
> > +
> > }
> >
> > int main (int argc, char **argv)
> > @@ -1477,26 +1495,6 @@ int main (int argc, char **argv)
> > &corosync_group,
> > 1);
> >
> > - if (minimum_sync_mode == CS_SYNC_V2) {
> > - log_printf (LOGSYS_LEVEL_NOTICE, "Compatibility mode set to
> > none. Using V2 of the synchronization engine.\n");
> > - sync_v2_init (
> > - corosync_sync_v2_callbacks_retrieve,
> > - corosync_sync_completed);
> > - } else
> > - if (minimum_sync_mode == CS_SYNC_V1) {
> > - log_printf (LOGSYS_LEVEL_NOTICE, "Compatibility mode set to
> > whitetank. Using V1 and V2 of the synchronization engine.\n");
> > - sync_register (
> > - corosync_sync_callbacks_retrieve,
> > - sync_v2_memb_list_determine,
> > - sync_v2_memb_list_abort,
> > - sync_v2_start);
> > -
> > - sync_v2_init (
> > - corosync_sync_v2_callbacks_retrieve,
> > - corosync_sync_completed);
> > - }
> > -
> > -
> > /*
> > * Drop root privleges to user 'ais'
> > * TODO: Don't really need full root capabilities;
>
> _______________________________________________
> Openais mailing list
> [email protected]
> https://lists.linux-foundation.org/mailman/listinfo/openais
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais