Re: [Openais] [PATCH] Openais: add an option --enable-small-memory-footprint to the ./configure

2011-06-13 Thread Ryan O';Hara
Committed revision 2176. On Wed, May 18, 2011 at 03:29:19PM +0200, Jerome Flesch wrote: > --- > configure.ac |9 + > lib/util.h |8 +++- > 2 files changed, 16 insertions(+), 1 deletions(-) > > diff --git a/configure.ac b/configure.ac > index d5f7812..6987f37 100644 > ---

Re: [Openais] [PATCH] Openais: Fix BSD build when done with --enable-fatal-warnings

2011-06-13 Thread Ryan O';Hara
Commit revision 2175. On Wed, May 18, 2011 at 03:28:45PM +0200, Jerome Flesch wrote: > --- > include/mar_ckpt.h |2 +- > include/mar_msg.h |6 +++--- > test/testckpt.c|2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/include/mar_ckpt.h b/include/mar_ck

Re: [Openais] [PATCH] Openais: add an option --enable-small-memory-footprint to the ./configure

2011-05-23 Thread Ryan O';Hara
I'll ACK this on the condition that Steve has no objections. Ryan On Wed, May 18, 2011 at 03:29:19PM +0200, Jerome Flesch wrote: > --- > configure.ac |9 + > lib/util.h |8 +++- > 2 files changed, 16 insertions(+), 1 deletions(-) > > diff --git a/configure.ac b/configure.

Re: [Openais] Assert in openais-1.1.4/services/lck.c:2768

2011-04-12 Thread Ryan O';Hara
On Tue, Apr 12, 2011 at 12:42:14PM -0700, Steven Dake wrote: > On 04/12/2011 10:46 AM, Vladislav Bogdanov wrote: > > Hi, > > > > still having this. > > > > Steve, can you please take a quick look? Is that corosync or lck? > > The only change in corosync comparing to previous report is that > > ch

Re: [Openais] Does LCK release locks if a process fails?

2011-04-08 Thread Ryan O';Hara
On Wed, Apr 06, 2011 at 04:16:49PM -0400, Michael Litvin wrote: > Hi, > > > > I am having an issue with LCK. > I got a 2-node cluster (A, B). > > > > Here is what I do: > > > > 1) lock PR on A > 2) lock PR on B > > 3) kill corosync process on B (kill -9) > > 4) unlock PR on A > > 5)

Re: [Openais] [PATCH] Make node state a string (not an integer)

2011-02-07 Thread Ryan O';Hara
This gets my ack. On Sat, Feb 05, 2011 at 07:39:36PM +1100, Angus Salkeld wrote: > Ryan noticed this inconsistency, all other status's > are string so this should be too. > > Signed-off-by: Angus Salkeld > --- > conf/COROSYNC-MIB.txt|6 +- > tools/corosync-notifyd.c | 11 +---

Re: [Openais] 2011+ roadmap

2010-11-18 Thread Ryan O';Hara
On Tue, Nov 09, 2010 at 03:35:06PM -0600, Ryan O'Hara wrote: > On Tue, Nov 09, 2010 at 09:40:52AM -0700, Steven Dake wrote: > > Hi, > > > > Attached are the roadmap slides for linux plumbers. If you have a > > feature you want represented, please feel

Re: [Openais] 2011+ roadmap

2010-11-09 Thread Ryan O';Hara
On Tue, Nov 09, 2010 at 09:40:52AM -0700, Steven Dake wrote: > Hi, > > Attached are the roadmap slides for linux plumbers. If you have a > feature you want represented, please feel free to submit it to the > ml. > > The last slide, a view of our roadmap topics, are covered in more > detail in ou

Re: [Openais] openais and corosync

2010-10-26 Thread Ryan O';Hara
On Tue, Oct 26, 2010 at 09:47:25AM -0700, dan clark wrote: > Hello Gentle Readers! > > Several folks have talked about the advantages of the well documented > Availability Management Framework (AMF) promoted by the Service Availability > Forum (SAF). With the strength of the fundamental messaging

Re: [Openais] openais trunk - change shutdown priority to 80

2010-09-07 Thread Ryan O';Hara
On Tue, Sep 07, 2010 at 05:17:58PM +0200, Andrew Beekhof wrote: > On Tue, Sep 7, 2010 at 3:36 PM, Ryan O'Hara wrote: > > On Sat, Sep 04, 2010 at 09:42:28PM +0200, Fabio M. Di NItto wrote: > >> On 09/04/2010 07:23 PM, Steven Dake wrote: > >> > On 09/03/201

[Openais] openais trunk - change shutdown priority to 80 and provide corosync

2010-09-07 Thread Ryan O';Hara
Here is an updated patch to fix the init script shutdown level (80) and also define that this init script provides corosync, as suggested. Ryan Index: init/generic.in === --- init/generic.in (revision 2159) +++ init/generic.in

Re: [Openais] openais trunk - change shutdown priority to 80

2010-09-07 Thread Ryan O';Hara
On Sat, Sep 04, 2010 at 09:42:28PM +0200, Fabio M. Di NItto wrote: > On 09/04/2010 07:23 PM, Steven Dake wrote: > > On 09/03/2010 09:33 PM, Fabio M. Di NItto wrote: > >> On 09/03/2010 09:13 PM, Ryan O'Hara wrote: > >>> > >>> Same as Steve's pa

[Openais] openais trunk - change shutdown priority to 80

2010-09-03 Thread Ryan O';Hara
Same as Steve's patch to corosync init script. Index: init/generic.in === --- init/generic.in (revision 2159) +++ init/generic.in (working copy) @@ -6,7 +6,7 @@ # # License: Revised BSD -# chkconfig: - 20 20 +# chkconfig:

[Openais] Announce: openais 1.1.4 released

2010-08-24 Thread Ryan O';Hara
I am pleased to announce the release of OpenAIS 1.1.4. This release can be downloaded from out website, http://www.openais.org. This release includes: * Fix CKPT service such that it will handle printing of unterminated strings. Ryan ___ Openais mai

Re: [Openais] where to start

2010-08-19 Thread Ryan O';Hara
On Thu, Aug 19, 2010 at 10:56:21AM +, Antony Mayi wrote: > Hi, > > need to implement distributed application with global state and believe > openais > is the right framework for me. however there is no documentation available - > any > API description any examples. the last link > on http

Re: [Openais] OpenAIS, Corosync and Pacemaker relationship

2010-05-24 Thread Ryan O';Hara
On Sat, May 22, 2010 at 10:44:37PM -0700, Dean Patterson wrote: > Hello Digimer, > > >From what I gathered, corosync is a subset of openais meant for > >situations that do not require the full openais standard. They are > >the communications layer for pacemaker. I am using drbd so > >corosync is

[Openais] Announce: openais 1.1.3 released

2010-05-19 Thread Ryan O';Hara
I am pleased to announce the immediate availability of openais 1.1.3. This release can be downloaded from our website, http://www.openais.org. This release includes: * Fix macro in spec file. * Fix sleep time to be 10 msec. * Change CKPT service exec_dump_fn to only print section info when debu

Re: [Openais] Low performance of OpenAIS messaging

2010-05-03 Thread Ryan O';Hara
On Mon, May 03, 2010 at 09:18:02PM +0400, Sergey Tumaev wrote: > * Ryan O'Hara [Mon, 3 May 2010 09:55:30 -0500]: >> On Sun, May 02, 2010 at 07:53:12PM +0400, Sergey Tumaev wrote: >> > Hi, >> > >> > I have measured the performance of Openais messaging

Re: [Openais] Low performance of OpenAIS messaging

2010-05-03 Thread Ryan O';Hara
On Sun, May 02, 2010 at 07:53:12PM +0400, Sergey Tumaev wrote: > Hi, > > I have measured the performance of Openais messaging with the primitive > client/server setup: > 1. Server - receives the message from client and sends it back: > ... > while(1){ >result = saM

Re: [Openais] Does AMF can be enable and used in openais-0.84

2010-04-30 Thread Ryan O';Hara
On Fri, Apr 30, 2010 at 04:57:05PM +0800, Chi.Xu wrote: > Hi All > > I try to test AMF as the description of README.amf, but I did not see > any testamf1 > start running. It seems that AMF not enable. > I execute all command as root. The version is openais-0.84. > > Does openais Support AMF? I f

[Openais] openais: ckpt_dump_fn prints section info at DEBUG level

2010-04-26 Thread Ryan O';Hara
This is a proposed patch for the ckpt_dump_fn routine such that information about sections will be printed at DEBUG level. Information aabout checkpoints will still be printed at NOTICE level. The reason for this proposed patch is that dumping information for all sections in a checkpoint can be o

[Openais] [PATCH] openais: fix sleep time to be 10 msec

2010-04-26 Thread Ryan O';Hara
The sleep time in openais-instantiate.c was incorrectly set to 1 nsec. It should be 1000 nsec (10 msec). This patch corrects this value. Ryan Index: services/openais-instantiate.c === --- services/openais-instantiate.c (

Re: [Openais] openais trunk - modify makefile.am to build read and write checkpoint test cases

2010-03-29 Thread Ryan O';Hara
Ack. On Thu, Mar 25, 2010 at 11:51:23AM -0700, Steven Dake wrote: > Ryan, > > See subject > > Regards > -steve > Index: test/Makefile.am > === > --- test/Makefile.am (revision 2124) > +++ test/Makefile.am (working copy) > @@ -22

Re: [Openais] openais trunk - modify ckpt-wr to work properly

2010-03-29 Thread Ryan O';Hara
Ack. On Thu, Mar 25, 2010 at 11:52:25AM -0700, Steven Dake wrote: > Ryan, > > This test case doesn't work properly when it is built. > > See attached patch. > > Regards > -steve > Index: test/ckpt-wr.c > === > --- test/ckpt-wr.c

Re: [Openais] openais trunk - modify ckpt-wr to work properly

2010-03-29 Thread Ryan O';Hara
On Thu, Mar 25, 2010 at 11:52:25AM -0700, Steven Dake wrote: > Ryan, > > This test case doesn't work properly when it is built. > > See attached patch. > > Regards > -steve Can you be more descriptive? Thanks. > Index: test/ckpt-wr.c >

Re: [Openais] [PATCH] openais: fix message service API calls for thresholds

2010-03-23 Thread Ryan O';Hara
Thanks, Angus. On Wed, Mar 24, 2010 at 02:02:34PM +1100, Angus Salkeld wrote: > On Tue, 2010-02-09 at 13:23 +1100, Angus Salkeld wrote: > > > I'm open to patches for bumping lib versions. > > > > > > > Here you go. > > > > Committed as revision 2123. > > -Angus > ___

Re: [Openais] [PATCH] openais: return queue_id with queue open callback

2010-02-17 Thread Ryan O';Hara
0. Ryan > On Wed, 2010-02-17 at 11:44 -0600, Ryan O'Hara wrote: > > Here is a patch that fixes the behavior of the callback generated by a > > saMsgQueueOpenAsync. The existing code contains two problems: > > > > 1. The queue_id should be send as part of the call

[Openais] [PATCH] openais: return queue_id with queue open callback

2010-02-17 Thread Ryan O';Hara
Here is a patch that fixes the behavior of the callback generated by a saMsgQueueOpenAsync. The existing code contains two problems: 1. The queue_id should be send as part of the callback request, not returned in the response structure for the open async API call. This allows us to copy the queue

Re: [Openais] Overview of openais.conf and amf.conf

2010-02-15 Thread Ryan O';Hara
On Mon, Feb 15, 2010 at 11:58:17AM -0500, Digimer wrote: > Hi all, > >I've been working on some docs for clustering, and have wanted to > cover the options in openais.conf and amf.conf. I've had a heck of a > time finding a list of what options are valid in each and how altering > their val

Re: [Openais] [PATCH] openais: fix message service API calls for thresholds

2010-02-08 Thread Ryan O';Hara
On Sun, Feb 07, 2010 at 09:42:44AM +0100, Fabio Massimo Di Nitto wrote: > On 2/6/10 10:15 PM, Ryan O'Hara wrote: > > > > Two of the message service API calls related to capacity thresholds > > had incorrect names. These API calls were named: > > &g

[Openais] [PATCH] openais: fix marshalling code for queue capacity thresholds

2010-02-06 Thread Ryan O';Hara
This patch fixed a bug in the marshalling code that handles queue capacity thresholds. Specifically, the three functions were not completely handling the array values due to an error in the for loop. The upper bound on the for loop should be "less than or equal to", not "less than". Ryan Index:

[Openais] [PATCH] openais: fix message service API calls for thresholds

2010-02-06 Thread Ryan O';Hara
Two of the message service API calls related to capacity thresholds had incorrect names. These API calls were named: saMsgQueueCapacityThresholdSet saMsgQueueCapacityThresholdGet The correct API calls are: saMsgQueueCapacityThresholdsSet saMsgQueueCapacityThresholdsGet This patch correct the n

Re: [Openais] [PATCH corosync_trunk] move sync_v2_init() into main_service_ready

2010-02-03 Thread Ryan O';Hara
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

Re: [Openais] No connection from crm, cib, ... to ais components

2010-02-02 Thread Ryan O';Hara
On Tue, Feb 02, 2010 at 11:14:46AM +0100, Michael Schwartzkopff wrote: > Am Dienstag, 26. Januar 2010 09:59:07 schrieb Michael Schwartzkopff: > > hi, > > > > I have a problem starting pacemaker from corosync. From the pacemaker > > mailing list Beekhof directed me here. > > > > System: opensuse-11.

[Openais] [announce] openais 1.1.2 released

2010-01-26 Thread Ryan O';Hara
I am pleased to announce the immediate availability of openais 1.1.2. This release includes: * Updated LICENSE file. * Updated openais.spec file. * Updated init script to be more generic and LSB compliant. * Fix CKPT service to prevent checkpoint interation during sync. * Fix bug in dispatch func

Re: [Openais] [OpenAIS] The openais died suddenly

2010-01-18 Thread Ryan O';Hara
On Mon, Jan 18, 2010 at 05:41:06PM -0700, hj lee wrote: > On Fri, Jan 15, 2010 at 2:51 PM, hj lee wrote: > > > > > On Thu, Jan 7, 2010 at 3:50 PM, Steven Dake wrote: > > > >> Check for a corefile in /var/lib/openais. If there is one, install the > >> openais-debuginfo package and use gdb's bt c

Re: [Openais] openais: forward port of whitetank 2096 revision

2010-01-15 Thread Ryan O';Hara
On Fri, Jan 15, 2010 at 11:49:32AM +0100, Jan Friesse wrote: > Included is forward ported 2096. In Whitetank without similar patch, GFS > can have problems with non-existing locks. I'm pretty sure, same problem > can happen be in cluster3, without this patch. > > Regards, > Honza > ACK. > c

[Openais] [PATCH] openais: fix loop in tmr service dispatch

2010-01-14 Thread Ryan O';Hara
The saTmrDispatch routine can get into a tight loop if a callback is undefined (NULL). If callback is NULL, we should simply break out of the switch statement rather than continue. Same problem that Christine found in lck service. Ryan Index: tmr.c ===

[Openais] [PATCH] openais: fix loop in msg service dispatch

2010-01-14 Thread Ryan O';Hara
The saMsgDispatch routine can get into a tight loop if a callback is undefined (NULL). If callback is NULL, we should simply break out of the switch statement rather than continue. Same problem that Christine found in lck service. Ryan Index: msg.c ===

[Openais] [PATCH] openais: fix loop in lck service dispatch

2010-01-14 Thread Ryan O';Hara
The saClmDispatch routine can get into a tight loop if a callback is undefined (NULL). If callback is NULL, we should simply break out of the switch statement rather than continue. This should be equivalent to the fix that Christine posted for the lck service. Only difference is this patch calls

[Openais] PATCH] openais: fix loop in clm service dispatch

2010-01-14 Thread Ryan O';Hara
The saClmDispatch routine can get into a tight loop if a callback is undefined (NULL). If callback is NULL, we should simply break out of the switch statement rather than continue. Same problem that Christine found in lck service. Ryan Index: clm.c ==

[Openais] [PATCH] openais: fix loop in ckpt service dispatch

2010-01-14 Thread Ryan O';Hara
The saCkptDispatch routine can get into a tight loop if a callback is undefined (NULL). If callback is NULL, we should simply break out of the switch statement rather than continue. Thanks to Christine for finding this problem. Ryan Index: ckpt.c

Re: [Openais] [PATCH][openais] LckDispatch can get into a tight loop

2010-01-14 Thread Ryan O';Hara
On Thu, Jan 14, 2010 at 09:35:51AM -0700, Steven Dake wrote: > On Thu, 2010-01-14 at 13:31 +, Christine Caulfield wrote: > > On 13/01/10 20:32, Ryan O'Hara wrote: > > > On Wed, Jan 13, 2010 at 09:58:29AM +, Christine Caulfield wrote: > > >> If a callb

Re: [Openais] [PATCH][openais] LckDispatch can get into a tight loop

2010-01-13 Thread Ryan O';Hara
On Wed, Jan 13, 2010 at 09:58:29AM +, Christine Caulfield wrote: > If a callback is set to NULL and a message is received for that > callback, libSaLck will get into a tight loop because the continue > doesn't call coroipcc_dispatch_put. > > This patch fixes > > Chrissie I don't think the

[Openais] [announce] openais 1.1.1 released

2009-12-03 Thread Ryan O';Hara
I am pleased to announce the immediate availability of openais 1.1.1. This release includes: * Fix bug in CLM service (saClmTrackStart). * Fix init scripts to load openais properly. The software is immediately available for download from http://www.openais.org Ryan

Re: [Openais] [openais] [whitetank] - Patch totemsrp so orf_token_mcast will not fall in case message_item->iov_len == IOVLEN

2009-10-27 Thread Ryan O';Hara
On Tue, Oct 27, 2009 at 06:18:44PM +0100, Jan Friesse wrote: > See patch. I hope this will fix > https://bugzilla.redhat.com/show_bug.cgi?id=525280. > > Regards, > Honza > Do we really need SORT_QUEUE_ITEM_MAXIOVS? Perhaps using "MAXIOVS + 1" in the EVT code is sufficient. Ryan > diff --git

Re: [Openais] [CLM] Crash if saClmClusterTrackStop() is not called before saClmFinalize()

2009-10-06 Thread Ryan O';Hara
n't think I will be able to use the scripts on my development nodes. > > On Tue, 2009-10-06 at 09:33 +0200, Jerome Flesch wrote: > > > On Mon, Oct 05, 2009 at 03:18:03PM -0500, Ryan O'Hara wrote: > > > > > > > > I downloaded your app and compiled it. I

Re: [Openais] [CLM] Crash if saClmClusterTrackStop() is not called before saClmFinalize()

2009-10-05 Thread Ryan O';Hara
On Mon, Oct 05, 2009 at 09:16:02AM -0500, Ryan O'Hara wrote: > On Mon, Oct 05, 2009 at 03:49:42PM +0200, Jerome Flesch wrote: > > Hello, > > Hi, Jerome. > > > I'm still stress-testing Corosync/Openais (trunk) on FreeBSD, and I've > > found out a

Re: [Openais] [CLM] Crash if saClmClusterTrackStop() is not called before saClmFinalize()

2009-10-05 Thread Ryan O';Hara
On Mon, Oct 05, 2009 at 03:49:42PM +0200, Jerome Flesch wrote: > Hello, Hi, Jerome. > I'm still stress-testing Corosync/Openais (trunk) on FreeBSD, and I've found > out a tiny bug: > > On peer A, my test program calls: > - saClmInitialize() > - saClmClusterTrack(SA_TRACK_CURRENT | SA_TRACK_CHAN

[Openais] [PATCH]: openais/trunk: Temporary fix for saMsgQueueGroupInsert

2009-09-21 Thread Ryan O';Hara
There is a design flaw in the message service that causes problems when adding a queue for multiple queue groups. The fix for this issue is currently being developed. In the meantime, here is a patch that check to see if the queue is already in a group, and if so, returns SA_AIS_ERR_NOT_SUPPORTED.

[Openais] [PATCH]: openais/trunk: Change sync_mode to CS_SYNC_V2 for msg service

2009-09-14 Thread Ryan O';Hara
Subject says it all. Ryan Index: msg.c === --- msg.c (revision 2059) +++ msg.c (working copy) @@ -817,7 +817,7 @@ .exec_engine= msg_exec_engine, .exec_engine_count = sizeof (msg_exec_engi

[Openais] [PATCH]: openais/trunk: Change MAX_NUM_LOCKS in lock service

2009-09-10 Thread Ryan O';Hara
Here is a patch that provide two very small changes to the LCK service. 1. Change the name of MAX_NUM_LOCKS to LCK_MAX_NUM_LOCKS. This is just a minor detail, as I want to keep the names of the limits consistent. 2. Increase the value of LCK_MAX_NUM_LOCKS to 4096. This limit defines the maximum

[Openais] PATCH]: openais/trunk: Move LCK service limits to ipc_msg.h

2009-09-09 Thread Ryan O';Hara
This patch simply moves the definitions of LCK service limits to ipc_msg.h, which is consistent with the MSG service. This allows us to use the limit in the IPC request/response structs for the service. Also, the saLckLimitGet function can be handled entirely in the library due to this change. Ry

[Openais] [PATCH]: openais/trunk: Add marshall call for mar_msg_queue_thresholds_t

2009-09-01 Thread Ryan O';Hara
This patch adds two marshall calls to mar_msg.h for handling mar_msg_queue_thresholds_t data. The library now uses these calls in the saMsgQueueCapacityThresholdSet and saMsgQueueCapacityThresholdGet API calls. Also, I've fixed a couple other routines in mar_msg.h that have for loops that begin w

Re: [Openais] [PATCH]: openais/trunk: Message service

2009-09-01 Thread Ryan O';Hara
On Tue, Sep 01, 2009 at 08:52:09AM -0700, Steven Dake wrote: > On Mon, 2009-08-31 at 21:44 -0500, Ryan O'Hara wrote: > > > > > The "regular" printfs are in library code only. I thought we agreed it > > was ok to leave these in place until we finished with s

Re: [Openais] [PATCH]: openais/trunk: Message service

2009-08-31 Thread Ryan O';Hara
emove the regular printfs and then merge. The "regular" printfs are in library code only. I thought we agreed it was ok to leave these in place until we finished with saftest. > On Mon, 2009-08-31 at 09:33 -0500, Ryan O'Hara wrote: > > Here is a massive patch for the OpenA

[Openais] Sync v2 bug

2009-08-11 Thread Ryan O';Hara
It appears there is a rather nasty bug in the corosync 1.0 sync v2 code. When a service calls sync_process, if it returns 1 then the sync engine should call sync_process again. It does not. I believe that I have ruled out any bugs in my code by reverting to sync v1 and verifying that sync_process

Re: [Openais] [PATCH]: openais/trunk: Remove resource from cleanup list on close

2009-07-09 Thread Ryan O';Hara
saLckDispatch/2-3.c and saLckResourceUnlockAsync/3.c, we are passing 100%). Right. Normally that would be fine. But this was a bug reported on the day we were set to release OpenAIS. Luckily we found the problem and fixed it prior to release. > Ryan O'Hara wrote: > > Where is the BZ

[Openais] [PATCH]: openais/trunk: Remove printf from timer service library

2009-07-08 Thread Ryan O';Hara
Remove printf from timer service library. Ryan Index: lib/tmr.c === --- lib/tmr.c (revision 2034) +++ lib/tmr.c (working copy) @@ -68,7 +68,7 @@ SaTmrHandleT tmrHandle; }; -DECLARE_HDB_DATABASE(tmrHandleDatabase,NULL)

[Openais] [PATCH]: openais/trunk: Only cleanup when saLckResourceClose is local

2009-07-08 Thread Ryan O';Hara
These was a bug introduced in the cleanup patch I posted last night. The problem is that we should only remove a resource from the cleanup list for the local node/process. Here is a patch tha fixes the problem. Index: test/Makefile.am =

Re: [Openais] [PATCH]: openais/trunk: Remove resource from cleanup list on close

2009-07-08 Thread Ryan O';Hara
s fall of corosync on assert (cleanup != NULL) in one of > test (not sure which, I will explore it more tomorrow). Are you 100% > sure that this patch is correct? > > Anyway, I will fill bugzilla for you > > Regards, > Honza > > Ryan O'Hara wrote: > > Whe

[Openais] [PATCH]: openais/trunk: Remove resource from cleanup list on close

2009-07-07 Thread Ryan O';Hara
When calling saLckResourceClose, we must remove that resource from the cleanup list for the process calling saLckResourceClose. Without this, it is possible that when the process exits and calls lck_lib_exit_fn, the resource will have its reference count decremented again. This can result in a res

[Openais] [PATCH]: openais/trunk: Remove debug stuff from lck_sync_init

2009-07-07 Thread Ryan O';Hara
The lck_print_resource_list call in lck_sync_init is causing problems since it is ifdef'd out. This problem was introduced in a recent patch made to trunk. It isn't needed, so just remove it. Ryan Index: services/lck.c === --- servi

[Openais] [PATCH]: openais/trunk: Remove printf from lock service library

2009-07-07 Thread Ryan O';Hara
Get rid of these printf's in the lock service library. Ryan Index: lib/lck.c === --- lib/lck.c (revision 2023) +++ lib/lck.c (working copy) @@ -166,9 +166,6 @@ struct lckInstance *lckInstance; SaAisErrorT error =

[Openais] [PATCH]: openais/trunk: Fix tabs and goto statement in saMsg service

2009-07-06 Thread Ryan O';Hara
In saMsgQueueOpen and saMsgQueueOpenAsync, fix goto statement to jump to error_exit instead of error_put. Also fixed up some tabs. Ryan Index: lib/msg.c === --- lib/msg.c (revision 2022) +++ lib/msg.c (working copy) @@ -419,13

[Openais] [PATCH]: openais/trunk: Code cleanup for lock service

2009-07-01 Thread Ryan O';Hara
Just code cleanup. Remove some unused code, add a comment or two, etc. Ryan Index: services/lck.c === --- services/lck.c (revision 2017) +++ services/lck.c (working copy) @@ -68,9 +68,6 @@ #include "../include/saLck.h" #

[Openais] [PATCH]: openais/trunk: Retuen SA_AIS_OK when unlocking pending lock request

2009-06-29 Thread Ryan O';Hara
When unlocking a pending lock request, we must send a response to the library. The error for such an operation should be SA_AIS_OK. Previously, this operation would return an error of SA_AIS_ERR_TIMEOUT. This was an arbitrary decision since the spec does not clearly define what the error should b

Re: [Openais] [PATCH]: openais/trunk: Skip callbacks if resource handle does not exist

2009-06-29 Thread Ryan O';Hara
Committed to trunk, revision 2011. On Mon, Jun 29, 2009 at 12:08:21PM -0700, Steven Dake wrote: > looks good for merge > > regards > -steve > On Mon, 2009-06-29 at 11:20 -0500, Ryan O'Hara wrote: > > Here is a patch that effectively cancels any pending callbacks if

[Openais] [PATCH]: openais/trunk: Skip callbacks if resource handle does not exist

2009-06-29 Thread Ryan O';Hara
Here is a patch that effectively cancels any pending callbacks if the resource handle no longer exists. In saLckDispatch, we check that the resource handle associated with the callback exists in the handle database. If not, we skip it. This requires that we pass the resource handle in the callbac

[Openais] [PATCH]: openais/trunk: Remove lock in saLckResourceUnlockCallback

2009-06-26 Thread Ryan O';Hara
This patch changes the behavior of saLckResourceUnlock, saLckResourceUnlockAsync, and saLckDispatch. The old code would remove a lock as soon as either Unlock or UnlockAsync received a result from the exec without error. The two calls were exactly the same except that the async call generated a c

Re: [Openais] [PATCH]: openais/trunk: Fix saLckOptionCheck

2009-06-26 Thread Ryan O';Hara
I forgot to commit this patch. It is in trunk now, revision 2002. Ryan On Fri, Jun 05, 2009 at 11:18:19AM -0500, Ryan O'Hara wrote: > > Here is a patch to fix saLckOptionCheck. We only support > SA_LCK_OPT_ORPHAN_LOCKS, so the API call simply returns 0x1. > > Ryan &g

[Openais] [PATCH]: openais/trunk: Move list_init's in saLckResourceOpenAsync

2009-06-26 Thread Ryan O';Hara
This patch moves the list_init calls in saLckResourceOpen and saLckResourceOpenAsync such that they occur before we send the request to the executive. This fix is really only required for the async call, but for consistency I changed the sync call as well. The reason for this fix is that is is po

Re: [Openais] [corosync] [patch] - hdb_handle_refcount_get - initialize and lock

2009-06-24 Thread Ryan O';Hara
On Wed, Jun 24, 2009 at 04:00:55PM +0200, Jan Friesse wrote: > hdb_handle_refcount_get uses handle without lock and do unlock. This > shouldn't ever happend. The hdb_handle_refcount_get call definitely needs the hdb_database_lock (&handle_database->lock). I definitely do not understand why we wou

[Openais] [PATCH]: corosync/trunk: Add hdb_handle_refcount_get call

2009-06-23 Thread Ryan O';Hara
Here is a patch that adds a call to hdb.h that will give the refcount for a specific handle in a given handle database. This is very useful for debugging code that make use of the hdb interface (ie. openais services). Ryan Index: include/corosync/hdb.h ===

Re: [Openais] [PATCH]: openais/trunk: Remove unnecessary lock grant callback

2009-06-22 Thread Ryan O';Hara
it and see if we suddenly fail other test cases before I remove it. I still have a bit of code cleanup to do anyway. > regards > -steve > > On Sun, 2009-06-21 at 22:57 -0500, Ryan O'Hara wrote: > > When unlocking (cancelling) a pending lock request, and that lock > > re

[Openais] [PATCH]: openais/trunk: Remove unnecessary lock grant callback

2009-06-21 Thread Ryan O';Hara
When unlocking (cancelling) a pending lock request, and that lock request was created with saLckResourceLockAsync, we do not need to send a lock grant callback. This patch removes the callback in this case. Index: lck.c === --- lck.c

[Openais] [PATCH]: openais/trunk: Use list_splice when grant pending PR locks

2009-06-11 Thread Ryan O';Hara
The lck_unlock routine will grant pending locks. When those locks are pending PR locks, we grant all of them. This patch uses list_splice to pending PR lock requests from pr_lock_pending_list_head to pr_lock_granted_list_head. Not only is this method cleaner, but it also fixes a memory error that

Re: [Openais] [PATCH]: openais/trunk: Check for valid lock_id before invoking saLckLockGrantCallback

2009-06-11 Thread Ryan O';Hara
Yet another small change. Move the hdb_handle_put below the callback. On Thu, Jun 11, 2009 at 09:24:31AM -0500, Ryan O'Hara wrote: > > Same patch but with a hdb_handle_put if hdb_handle_get returned OK. > > Ryan > > > On Wed, Jun 10, 2009 at 11:57:31AM -0500, Ryan

Re: [Openais] [PATCH]: openais/trunk: Check for valid lock_id before invoking saLckLockGrantCallback

2009-06-11 Thread Ryan O';Hara
Same patch but with a hdb_handle_put if hdb_handle_get returned OK. Ryan On Wed, Jun 10, 2009 at 11:57:31AM -0500, Ryan O'Hara wrote: > > If we request a lock via saLckLockRequestAsync, which is granted, an > saLckLockGrantCallback will be generated. The callback request is

[Openais] [PATCH]: openais/trunk: Check for valid lock_id before invoking saLckLockGrantCallback

2009-06-10 Thread Ryan O';Hara
If we request a lock via saLckLockRequestAsync, which is granted, an saLckLockGrantCallback will be generated. The callback request is sent to the dispatcher, but it is possible to unlock this lock before the callback is invoked. The specification clearly states that this should result in saLckLoc

Re: [Openais] [PATCH]: openais/trunk: Only send response/callback when unlocking pending locks

2009-06-10 Thread Ryan O';Hara
add as check to saLckDispatch to verify the lock_id is valid before we issue the callback. I have a patch that I am testing. > Ryan O'Hara wrote: > > On Wed, Jun 10, 2009 at 04:20:51PM +0200, Jan Friesse wrote: > >> Ryan, > >> this patch breaks SAF Test SaLckLo

Re: [Openais] [PATCH]: openais/trunk: Only send response/callback when unlocking pending locks

2009-06-10 Thread Ryan O';Hara
st case? It is an interesting idea -- but I am not sure the code can/will ever to this far with a lock that does not exist. I need to think about this a bit more. > Regards, > Honza > > Ryan O'Hara wrote: > > When unlocking a pending lock request, we must send a r

[Openais] [PATCH]: openais/trunk: Send response immediately if lock status is NOT_QUEUED

2009-06-09 Thread Ryan O';Hara
If a lock request specifies the SA_LCK_LOCK_NO_QUEUE flag and the request is blocked, the lock is not queued and lock_status is set to SA_LCK_LOCK_NOT_QUEUED and a response should be sent to the library. The existing code does not send a response to the library as needed. In short, the existing c

[Openais] [PATCH]: openais/trunk: Only send response/callback when unlocking pending locks

2009-06-09 Thread Ryan O';Hara
When unlocking a pending lock request, we must send a response (or callback) to the library indicating an error occured. This patch simply adds a check that the lock is pending before we send the response. Without this fix, callbacks are sent when they are not needed. For example, if we close a r

Re: [Openais] [lck 2/3] lib/lck: Remove ipc_handle from saLckResourceLock

2009-06-08 Thread Ryan O';Hara
NACK. You can't do this. The saLckResourceLock function can block -- that is why we create a new ipc connection. On Mon, Jun 08, 2009 at 05:25:31PM +0200, Jan Friesse wrote: > This seems to me like a resudium of rewritten code and it looks like > it is not used. > --- > trunk/lib/lck.c | 23

Re: [Openais] [lck 3/3] lib/lck: Unlink calls lckLockIdInstanceFinalize

2009-06-08 Thread Ryan O';Hara
ACK. On Mon, Jun 08, 2009 at 05:25:32PM +0200, Jan Friesse wrote: > This prevents previous invalid read in close, because previous code > doesn't removes lock from list. > --- > trunk/lib/lck.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/trunk/lib/lck.c b/tr

Re: [Openais] [lck 1/3] lib/lck: Remove service_disconnect call of unitialized variable in saLckResourceLockAsync

2009-06-08 Thread Ryan O';Hara
ACK. This is just old code that should have been commented out with the when I removed the uncessary coroipcc_service_connect. The async version of ResourceLock doesn't need a new ipc connection. On Mon, Jun 08, 2009 at 05:25:30PM +0200, Jan Friesse wrote: > --- > trunk/lib/lck.c |4 >

[Openais] [PATCH]: openais/trunk: Fix saLckOptionCheck

2009-06-05 Thread Ryan O';Hara
Here is a patch to fix saLckOptionCheck. We only support SA_LCK_OPT_ORPHAN_LOCKS, so the API call simply returns 0x1. Ryan Index: lib/lck.c === --- lib/lck.c (revision 1940) +++ lib/lck.c (working copy) @@ -274,7 +274,7 @@

[Openais] [PATCH]: openais/trunk: Add code for saLckLimitGet

2009-06-04 Thread Ryan O';Hara
Here is a patch that adds code to get saLckLimitGet to work correctly. Index: include/ipc_lck.h === --- include/ipc_lck.h (revision 1938) +++ include/ipc_lck.h (working copy) @@ -173,10 +173,12 @@ struct req_lib_lck_limitget {

[Openais] [PATCH]: openais/trunk: Send LockGrantCallback whenever status != 0

2009-06-04 Thread Ryan O';Hara
In the case where we request a lock with saLckResourceLockAsync and the request is not granted (eg. status is SA_LCK_LOCK_NOT_QUEUED or SA_LCK_LOCK_ORPHANED) we should send a callback. The existing code only sends a LockGrantCallback when the lock is actually granted, which is wrong. Honzaf, this

Re: [Openais] [lck 2/4] Test lockId to NULL

2009-06-04 Thread Ryan O';Hara
ACK. On Thu, Jun 04, 2009 at 06:12:14PM +0200, Jan Friesse wrote: > --- > trunk/lib/lck.c | 10 ++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/trunk/lib/lck.c b/trunk/lib/lck.c > index 5d2dbce..6a43447 100644 > --- a/trunk/lib/lck.c > +++ b/trunk/lib/lck.c > @

Re: [Openais] [lck 3/4] test lockFlags in saLckResourceLock(Async)

2009-06-04 Thread Ryan O';Hara
ACK On Thu, Jun 04, 2009 at 06:12:15PM +0200, Jan Friesse wrote: > --- > trunk/lib/lck.c | 10 ++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/trunk/lib/lck.c b/trunk/lib/lck.c > index 6a43447..4b453fb 100644 > --- a/trunk/lib/lck.c > +++ b/trunk/lib/lck.c > @@

Re: [Openais] [lck 4/4] Test lockStatus

2009-06-04 Thread Ryan O';Hara
ACK On Thu, Jun 04, 2009 at 06:12:16PM +0200, Jan Friesse wrote: > --- > trunk/lib/lck.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/trunk/lib/lck.c b/trunk/lib/lck.c > index 4b453fb..95b2c1e 100644 > --- a/trunk/lib/lck.c > +++ b/trunk/lib/lck.c > @@ -773,7 +

Re: [Openais] [lck 1/4] Return SA_AIS_ERR_NOT_EXIST in saLckResourceUnlock

2009-06-04 Thread Ryan O';Hara
On Thu, Jun 04, 2009 at 06:12:13PM +0200, Jan Friesse wrote: > This is very controversal, and I'm still not sure about correctnes > of this. Becuase: > - AIS B.03.01 don't have ERR_BAD_HANDLE as a posibility of returned code > and can return only SA_AIS_ERR_NOT_EXIST > - AIS B.01.01 can return ERR_

[Openais] [PATCH]: openais/trunk: Finalize lckResourceHandle in close operation

2009-06-03 Thread Ryan O';Hara
When closing a resource via saLckResourceClose, we must finalize (destroy) the lckResourceHandle. Without this we'll won't get BAD_HANDLE errors if we close a resource and then do an operation on that resource (ie. saLckResourceLock). I believe this solves the problem that Jan Friesse was seeing

Re: [Openais] [lck 0/7] LCK service patches

2009-06-02 Thread Ryan O';Hara
On Tue, Jun 02, 2009 at 12:12:50PM -0700, Steven Dake wrote: > On Tue, 2009-06-02 at 14:02 -0500, Ryan O'Hara wrote: > > On Tue, Jun 02, 2009 at 05:34:02PM +0200, Jan Friesse wrote: > > > Included are lck service patches. Many of them solves really big > > > pr

Re: [Openais] [lck 0/7] LCK service patches

2009-06-02 Thread Ryan O';Hara
granted) and the process exits immediately, the dispatch thread won't handle the callback. Make sense? On Tue, Jun 02, 2009 at 02:02:55PM -0500, Ryan O'Hara wrote: > On Tue, Jun 02, 2009 at 05:34:02PM +0200, Jan Friesse wrote: > > Included are lck service patches. Many of the

Re: [Openais] [lck 0/7] LCK service patches

2009-06-02 Thread Ryan O';Hara
On Tue, Jun 02, 2009 at 05:34:02PM +0200, Jan Friesse wrote: > Included are lck service patches. Many of them solves really big > problems (writing to uninitialized memory, testing some variable to > NULL *BEFORE* it is used as a structure, ...) > > Ryan, > it looks there is some huge problem with

Re: [Openais] [lck 0/7] LCK service patches

2009-06-02 Thread Ryan O';Hara
LockGrantCallback until that lock is granted. I'll look at the saftest code. It is in the tree, no? > Ryan O'Hara wrote: > > On Tue, Jun 02, 2009 at 05:34:02PM +0200, Jan Friesse wrote: > >> Included are lck service patches. Many of them solves really big > >

Re: [Openais] [lck 5/7] Test validity of handle in *resourceLock(Async)

2009-06-02 Thread Ryan O';Hara
rough a few other bugs and I'll dig into this issue afterwards. > Ryan O'Hara wrote: > > NACK. What is the purpose of introducing a new function? > > > > On Tue, Jun 02, 2009 at 05:34:07PM +0200, Jan Friesse wrote: > >> This patch also split lck_resourcelock_r

  1   2   3   >