[Openais] SIGSEGV in service_lck.lcrso

2009-04-01 Thread Dietmar Maurer
Hi all, I am quit new to this project, so I do not really know how to debug. I simply started corosync with: # gdb corosync > run -f The I start the clvm-openais daemon, which uses the lock service. The service aquires a lock, and then calls: saLckResourceClose(linfo->res_handle); everything l

[Openais] [patch] corosync/trunk: drop unrequired logsys struct

2009-04-01 Thread Fabio M. Di Nitto
This is used nowhere in the code. Fabio Index: logsys.c === --- logsys.c (revision 1989) +++ logsys.c (working copy) @@ -161,12 +161,6 @@ #define FDTAIL_INDEX (flt_data_size + 1) -struct log_data { - unsigned int syslog_pos; - u

[Openais] openais compile fix

2009-04-01 Thread Dietmar Maurer
--- openais-0.94/test/Makefile.org 2009-04-01 10:31:55.0 -0400 +++ openais-0.94/test/Makefile 2009-04-01 10:33:00.0 -0400 @@ -55,7 +55,7 @@ testckpt: testckpt.o sa_error.o $(CC) $(LDFLAGS) -o testckpt testckpt.o $(LIBS) -ckptbench: ckptbench.o +ckptbench: ckptbench.

Re: [Openais] problems with corosync-0.95

2009-04-01 Thread Dietmar Maurer
> Try to create this directory before running corosync and see if that > fixes your problem. > > Please report back if that is the root cause, and I'll work up a better > notification patch. Wow, that was a quick solution :-) Here is the output from strace: mkdir("/usr/var/lib/corosync", 0700)

Re: [Openais] problems with corosync-0.95

2009-04-01 Thread Steven Dake
Dietmar, Current trunk builds/runs for me. Perhaps you have selinux enabled on your system? There may be a problem where corosync tries to create the /var/lib/corosync directory and is unable to because selinux doesn't allow it. Unfortunately it appears no proper warning is given to the user in

Re: [Openais] [PATCH] corosync-objctl.c: remove a just-added "const"

2009-04-01 Thread Jim Meyering
Steven Dake wrote: > looks good committed. ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

Re: [Openais] [patch] corosync/trunk: logsys, fix internal api usage and add support for filename output

2009-04-01 Thread Steven Dake
looks good regards -steve On Wed, 2009-04-01 at 08:35 +0200, Fabio M. Di Nitto wrote: > correct patch in attachment without the mainconfig.c changes that are > part of another posted patch. > > Fabio > > On Wed, 2009-04-01 at 08:33 +0200, Fabio M. Di Nitto wrote: > > doesn't matter to me.. new

Re: [Openais] [PATCH] getting a taste of upcoming API changes

2009-04-01 Thread Steven Dake
this implementation looks good and the proper choice. I don't want to change the upstream api since this is a callback. Regards -steve On Wed, 2009-04-01 at 18:24 +0200, Jim Meyering wrote: > Jim Meyering wrote: > > Here's what happened when I started adjusting the APIs in confdb.h. > > Changing

Re: [Openais] [PATCH] Ability to run as ais user

2009-04-01 Thread Steven Dake
I already merged your previous patch. Can you rework the defines into a new patch? Thanks! Regards -steve On Wed, 2009-04-01 at 12:30 +0200, Jan Friesse wrote: > Attached is patch with included suggested changes. > > Thanks Jim. > > Jim Meyering wrote: > > Jan Friesse wrote: > >> Attached pat

Re: [Openais] [PATCH] corosync-objctl.c: remove a just-added "const"

2009-04-01 Thread Steven Dake
looks good regards -steve On Wed, 2009-04-01 at 11:47 +0200, Jim Meyering wrote: > There are still too many warnings ;-) > I missed the fact that my recent changes introduced one new warning. > Here's the fix: > > From fa2983e1e57fd4d772b76635e0625ed8c294959d Mon Sep 17 00:00:00 2001 > From: Jim

Re: [Openais] tiny API changes (and questions) for cfg.h

2009-04-01 Thread Steven Dake
This patchset looks good but we are holding API changes until after we release a bugfix version of corosync/oa for the release of cluster-3. Please keep this handy for a weekish until that blockage is stopped. Regards -steve On Wed, 2009-04-01 at 10:00 +0200, Jim Meyering wrote: > Three patches

Re: [Openais] [PATCH] Ability to run as ais user

2009-04-01 Thread Steven Dake
thanks for the patch! merging regards -steve On Wed, 2009-04-01 at 11:05 +0200, Jan Friesse wrote: > Attached patch solves problem with running corosync as ais user. > > Main problem was hidden in reading aisexec section. If this section > exists in corosync.conf, everything works, but in other

Re: [Openais] [PATCH] Replace sprintf with snprintf

2009-04-01 Thread Jim Meyering
Jan Friesse wrote: > Attached patch solves possible problems of overflow buffer, which can > happened with sprintf. I tried to change only files where it makes sense > (so basically, where in format is something like %s) and I hope I catch > all cases. > > > Index: test/sa_error.c ... > -

Re: [Openais] [PATCH] getting a taste of upcoming API changes

2009-04-01 Thread Jim Meyering
Jim Meyering wrote: > Here's what happened when I started adjusting the APIs in confdb.h. > Changing void* to const void* propagated, of course. > Changing int to size_t exposed the problem that > tail_key_changed (and two other functions nearby) > would mistakenly print non-printing (aka garbage)

[Openais] [PATCH] getting a taste of upcoming API changes

2009-04-01 Thread Jim Meyering
Here's what happened when I started adjusting the APIs in confdb.h. Changing void* to const void* propagated, of course. Changing int to size_t exposed the problem that tail_key_changed (and two other functions nearby) would mistakenly print non-printing (aka garbage) or incomplete object, key, val

[Openais] [PATCH] continuing along the same lines: confdb.h API

2009-04-01 Thread Jim Meyering
>From 6386a7040c229961f3485bb9302f041ff0af0051 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 1 Apr 2009 18:29:24 +0200 Subject: [PATCH] confdb.h: continue API changes: const+size_t * include/corosync/confdb.h (confdb_object_create_notify_fn_t): (confdb_object_delete_notify_fn_t): * tool

[Openais] problems with corosync-0.95

2009-04-01 Thread Dietmar Maurer
Hi all, I sucessfully compiled corosync-0.94/openais-0.93, and even managed to create a cluster with 4 nodes - everything worked as expected. But it does not work when I try corosync-0.95/openais-0.94 form svn, using exactly the same configuration: # # corosync-objctl service.name=openais_clm s

Re: [Openais] [PATCH] Ability to run as ais user

2009-04-01 Thread Jim Meyering
Jan Friesse wrote: > I hope last fix of that patch. Fine by me. ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

[Openais] [PATCH] Replace sprintf with snprintf

2009-04-01 Thread Jan Friesse
Attached patch solves possible problems of overflow buffer, which can happened with sprintf. I tried to change only files where it makes sense (so basically, where in format is something like %s) and I hope I catch all cases. Index: test/sa_error.c

Re: [Openais] [PATCH] Ability to run as ais user

2009-04-01 Thread Jan Friesse
I hope last fix of that patch. Jim Meyering wrote: > Jan Friesse wrote: >> Attached is patch with included suggested changes. > > Looks good. > > ... >> +The default is ais. > > one more: s/is/for each is/ Index: exec/mainconfig.c ==

Re: [Openais] [PATCH] corosync/trunk: add fileline/function_name support in corosync

2009-04-01 Thread Fabio M. Di Nitto
For the record: 15:19 < meyering> so consider your ACK'd and I'll try to stay away from IRC Committed revision 1987. Fabio On Wed, 2009-04-01 at 13:59 +0200, Fabio M. Di Nitto wrote: > On Wed, 2009-04-01 at 13:31 +0200, Fabio M. Di Nitto wrote: > > On Wed, 2009-04-01 at 13:15 +0200, Fabio M. Di

Re: [Openais] [PATCH] corosync/trunk: add fileline/function_name support in corosync

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 13:31 +0200, Fabio M. Di Nitto wrote: > On Wed, 2009-04-01 at 13:15 +0200, Fabio M. Di Nitto wrote: > > On Wed, 2009-04-01 at 11:09 +0200, Fabio M. Di Nitto wrote: > > > On Wed, 2009-04-01 at 10:40 +0200, Fabio M. Di Nitto wrote: > > > > Hi, > > > > > > > > this patch replace

Re: [Openais] [PATCH] corosync/trunk: add fileline/function_name support in corosync

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 13:15 +0200, Fabio M. Di Nitto wrote: > On Wed, 2009-04-01 at 11:09 +0200, Fabio M. Di Nitto wrote: > > On Wed, 2009-04-01 at 10:40 +0200, Fabio M. Di Nitto wrote: > > > Hi, > > > > > > this patch replaces the one posted the 31st Of March and it's going to > > > be my last ta

Re: [Openais] openais restart issue

2009-04-01 Thread Lars Marowsky-Bree
On 2009-03-19T15:27:30, Dominik Klein wrote: > Hi > > I am using the latest whitetank code (1754 2009-03-13 20:47:05 +0100) > with pacemaker on a pair of x86_64 opensuse 11.1 boxes and I am seeing > an openais restart issue. > > When I use > /etc/init.d/openais restart > to restart the cluster,

Re: [Openais] [PATCH] corosync/trunk: add fileline/function_name support in corosync

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 11:09 +0200, Fabio M. Di Nitto wrote: > On Wed, 2009-04-01 at 10:40 +0200, Fabio M. Di Nitto wrote: > > Hi, > > > > this patch replaces the one posted the 31st Of March and it's going to > > be my last take on it. I think I finally found nirvana and imho good > > enough to be

Re: [Openais] [PATCH] Ability to run as ais user

2009-04-01 Thread Jim Meyering
Jan Friesse wrote: > Attached is patch with included suggested changes. Looks good. ... > +The default is ais. one more: s/is/for each is/ ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/

Re: [Openais] [PATCH] Ability to run as ais user

2009-04-01 Thread Jan Friesse
Attached is patch with included suggested changes. Thanks Jim. Jim Meyering wrote: > Jan Friesse wrote: >> Attached patch solves problem with running corosync as ais user. >> >> Main problem was hidden in reading aisexec section. If this section >> exists in corosync.conf, everything works, but i

Re: [Openais] [PATCH] Ability to run as ais user

2009-04-01 Thread Jim Meyering
Jan Friesse wrote: > Attached patch solves problem with running corosync as ais user. > > Main problem was hidden in reading aisexec section. If this section > exists in corosync.conf, everything works, but in other cases, > main_config->uid/gid are initialized to 0 (so only root:root) can run > co

[Openais] [PATCH] corosync-objctl.c: remove a just-added "const"

2009-04-01 Thread Jim Meyering
There are still too many warnings ;-) I missed the fact that my recent changes introduced one new warning. Here's the fix: >From fa2983e1e57fd4d772b76635e0625ed8c294959d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 1 Apr 2009 11:46:43 +0200 Subject: [PATCH] corosync-objctl.c: remove a j

Re: [Openais] [PATCH] Ability to run as ais user

2009-04-01 Thread Chrissie Caulfield
Jan Friesse wrote: > Attached patch solves problem with running corosync as ais user. > > Main problem was hidden in reading aisexec section. If this section > exists in corosync.conf, everything works, but in other cases, > main_config->uid/gid are initialized to 0 (so only root:root) can run > c

Re: [Openais] [PATCH] corosync/trunk: add fileline/function_name support in corosync

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:40 +0200, Fabio M. Di Nitto wrote: > Hi, > > this patch replaces the one posted the 31st Of March and it's going to > be my last take on it. I think I finally found nirvana and imho good > enough to be out there :) > > - add insert_into_buffer static function. This is a b

[Openais] [PATCH] Ability to run as ais user

2009-04-01 Thread Jan Friesse
Attached patch solves problem with running corosync as ais user. Main problem was hidden in reading aisexec section. If this section exists in corosync.conf, everything works, but in other cases, main_config->uid/gid are initialized to 0 (so only root:root) can run corosync. Another problem, what

Re: [Openais] [PATCH 9/9] remove unused file-scoped global

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:16 +0200, Jim Meyering wrote: > From: Jim Meyering > > * tools/corosync-fplay.c (records_printed): Remove. > --- > tools/corosync-fplay.c |2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) > > diff --git a/tools/corosync-fplay.c b/tools/corosync-fplay.c > ind

Re: [Openais] [PATCH 8/9] avoid prototype warnings, constify

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:16 +0200, Jim Meyering wrote: > From: Jim Meyering > > * tools/corosync-fplay.c: Make many parameters and local pointers const. > --- > tools/corosync-fplay.c | 158 > > 1 files changed, 80 insertions(+), 78 deletions(-)

Re: [Openais] [PATCH 7/9] remove unused functions and variable

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:16 +0200, Jim Meyering wrote: > From: Jim Meyering > > * tools/corosync-fplay.c (sync_printer_nada): Remove function. > * tools/corosync-objctl.c (get_child_name): Remove function. > * test/evsverify.c (msg): Remove unused variable. > --- > test/evsverify.c|2

Re: [Openais] [PATCH 6/9] avoid prototype warnings

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:16 +0200, Jim Meyering wrote: > From: Jim Meyering > > * test/evsbench.c: Declare functions/vars static. > * test/evsverify.c: Likewise. > * test/testcpg2.c: Likewise. > * test/testcpg.c: Likewise. > * test/logsysbench.c: Likewise. > * test/cpgbench.c: Likewise. > * exec/

Re: [Openais] [PATCH 4/9] declare many functions "static" (also avoids missing prototype warnings)

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:16 +0200, Jim Meyering wrote: > From: Jim Meyering > > * exec/main.c (sigintr_handler, serialize_lock, serialize_unlock): > (serialize_lock, serialize_unlock): > * exec/sync.c (sync_start_init, sync_callbacks_load): > * exec/vsf_ykd.c (ykd_state_init): > * lcr/uis.c (cmd1

Re: [Openais] [PATCH 5/9] * test/testevs.c: avoid 2 warnings, decl "static"

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:16 +0200, Jim Meyering wrote: > From: Jim Meyering > > --- > test/testevs.c | 20 ++-- > 1 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/test/testevs.c b/test/testevs.c Good for me. Fabio _

Re: [Openais] [patch] corosync/trunk: logsys, fix internal api usage and add support for filename output

2009-04-01 Thread Jim Meyering
Fabio M. Di Nitto wrote: > correct patch in attachment without the mainconfig.c changes that are > part of another posted patch. ... This patch looks fine to me. However, for the record, there are nasty bugs in the vicinity: - nothing checks for buffer overflow via too-large output_buffer_idx

Re: [Openais] [PATCH 2/9] timer.c: connect with its published prototypes

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:16 +0200, Jim Meyering wrote: > From: Jim Meyering > > * exec/timer.c: Include "timer.h". > * exec/timer.h (corosync_timer_init): Make return type in prototype > match the one in the function definition. > --- > exec/timer.c |1 + > exec/timer.h |6 +++--- > 2 fi

Re: [Openais] [PATCH 3/9] * exec/apidef.c: Include "apidef.h".

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:16 +0200, Jim Meyering wrote: > From: Jim Meyering > > --- > exec/apidef.c |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/exec/apidef.c b/exec/apidef.c > index 951a6a1..7148042 100644 > --- a/exec/apidef.c > +++ b/exec/apidef.c > @@ -52,6

Re: [Openais] [PATCH 1/9] add "void" parameter list to avoid "isn't prototype" warning

2009-04-01 Thread Fabio M. Di Nitto
On Wed, 2009-04-01 at 10:16 +0200, Jim Meyering wrote: > From: Jim Meyering > > * exec/objdb.c (objdb_wrlock, objdb_rdlock, objdb_rdunlock): > (objdb_wrunlock): > * services/cfg.c (send_shutdown, check_shutdown_status): > * services/votequorum.c (send_expectedvotes_notification): > * tools/corosy

[Openais] [PATCH] corosync/trunk: add fileline/function_name support in corosync

2009-04-01 Thread Fabio M. Di Nitto
Hi, this patch replaces the one posted the 31st Of March and it's going to be my last take on it. I think I finally found nirvana and imho good enough to be out there :) - add insert_into_buffer static function. This is a big helper to add new logsys parameters anywhere in the current format_buff

[Openais] [PATCH 6/9] avoid prototype warnings

2009-04-01 Thread Jim Meyering
From: Jim Meyering * test/evsbench.c: Declare functions/vars static. * test/evsverify.c: Likewise. * test/testcpg2.c: Likewise. * test/testcpg.c: Likewise. * test/logsysbench.c: Likewise. * test/cpgbench.c: Likewise. * exec/sync.c: Likewise. --- exec/sync.c|3 ++- test/cpgbench.c

[Openais] [PATCH 8/9] avoid prototype warnings, constify

2009-04-01 Thread Jim Meyering
From: Jim Meyering * tools/corosync-fplay.c: Make many parameters and local pointers const. --- tools/corosync-fplay.c | 158 1 files changed, 80 insertions(+), 78 deletions(-) diff --git a/tools/corosync-fplay.c b/tools/corosync-fplay.c index c

[Openais] [PATCH 5/9] * test/testevs.c: avoid 2 warnings, decl "static"

2009-04-01 Thread Jim Meyering
From: Jim Meyering --- test/testevs.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/testevs.c b/test/testevs.c index 55e0d34..16b1e87 100644 --- a/test/testevs.c +++ b/test/testevs.c @@ -7,7 +7,7 @@ * Author: Steven Dake (sd...@redhat.com)

[Openais] [PATCH 4/9] declare many functions "static" (also avoids missing prototype warnings)

2009-04-01 Thread Jim Meyering
From: Jim Meyering * exec/main.c (sigintr_handler, serialize_lock, serialize_unlock): (serialize_lock, serialize_unlock): * exec/sync.c (sync_start_init, sync_callbacks_load): * exec/vsf_ykd.c (ykd_state_init): * lcr/uis.c (cmd1): * services/pload.c (send_message, token_callback, start_mcasting):

[Openais] remove many more warnings

2009-04-01 Thread Jim Meyering
Here's another patch series to remove more warnings. 108 0001-add-void-parameter-list-to-avoid-isn-t-prototype.patch 56 0002-timer.c-connect-with-its-published-prototypes.patch 24 0003--exec-apidef.c-Include-apidef.h.patch 400 0004-declare-many-functions-static-also-avoids-missing.patch

[Openais] [PATCH 2/9] timer.c: connect with its published prototypes

2009-04-01 Thread Jim Meyering
From: Jim Meyering * exec/timer.c: Include "timer.h". * exec/timer.h (corosync_timer_init): Make return type in prototype match the one in the function definition. --- exec/timer.c |1 + exec/timer.h |6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/exec/timer.c b

[Openais] [PATCH 3/9] * exec/apidef.c: Include "apidef.h".

2009-04-01 Thread Jim Meyering
From: Jim Meyering --- exec/apidef.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/exec/apidef.c b/exec/apidef.c index 951a6a1..7148042 100644 --- a/exec/apidef.c +++ b/exec/apidef.c @@ -52,6 +52,7 @@ #include #include "service.h" #include +#include "apidef.h" L

[Openais] [PATCH 1/9] add "void" parameter list to avoid "isn't prototype" warning

2009-04-01 Thread Jim Meyering
From: Jim Meyering * exec/objdb.c (objdb_wrlock, objdb_rdlock, objdb_rdunlock): (objdb_wrunlock): * services/cfg.c (send_shutdown, check_shutdown_status): * services/votequorum.c (send_expectedvotes_notification): * tools/corosync-cfgtool.c (shutdown_do): --- exec/objdb.c |8

[Openais] [PATCH 7/9] remove unused functions and variable

2009-04-01 Thread Jim Meyering
From: Jim Meyering * tools/corosync-fplay.c (sync_printer_nada): Remove function. * tools/corosync-objctl.c (get_child_name): Remove function. * test/evsverify.c (msg): Remove unused variable. --- test/evsverify.c|2 -- tools/corosync-fplay.c |4 tools/corosync-objctl.c |

[Openais] [PATCH 9/9] remove unused file-scoped global

2009-04-01 Thread Jim Meyering
From: Jim Meyering * tools/corosync-fplay.c (records_printed): Remove. --- tools/corosync-fplay.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/tools/corosync-fplay.c b/tools/corosync-fplay.c index f261c55..9eed9f7 100644 --- a/tools/corosync-fplay.c +++ b/tools/coros

[Openais] tiny API changes (and questions) for cfg.h

2009-04-01 Thread Jim Meyering
Three patches below: Subject: [PATCH 1/3] cfg.h: add const Subject: [PATCH 2/3] cfg.h: adjust parameter types: const+s/int/size_t/ Subject: [PATCH 3/3] cfg.h: mark "address_length" as an unused member Regarding the unused "address_length" member, I suspected that it should have type socklen

Re: [Openais] is cfg.c's corosync_cfg_state_track function dead?

2009-04-01 Thread Chrissie Caulfield
Jim Meyering wrote: > Hello, > > [in corosync] > Looking at a "const" cast-away warning related to an API issue, > I wondered if cfg.c (corosync_cfg_state_track)'s notification_buffer > parameter should *not* be "const", but do not see any use of that > member, so can't be sure. No use in cluster