Commit Graph

66 Commits

Author SHA1 Message Date
Fabio M. Di Nitto
2feb8f959c Add support for SOCKETDIR
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1856 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-17 10:46:19 +00:00
Fabio M. Di Nitto
e8f4a4c606 remove hardcoded /var and use localstatedir
instead.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1854 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-17 09:53:39 +00:00
Steven Dake
fbc4b57c28 Remove warnings from ipc.c
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1829 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 04:41:23 +00:00
Steven Dake
0bc9cd90f6 Automake. The journey begins.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1798 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 08:35:41 +00:00
Steven Dake
1f05ffd27d Add reserve/release functionality to totem to reserve message queue
space.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1793 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-06 07:38:34 +00:00
Steven Dake
0d274de4ec Rework a bit of how lib_exit_fn works so that reference counts may be
used in the exit functions for services such as cpg.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1786 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-03 00:58:16 +00:00
Steven Dake
58ab8d4a65 Unification around hdb_handle_t data type.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1782 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-25 11:14:47 +00:00
Steven Dake
a68b9f3944 Fix possible segfault with IPC service.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1779 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-25 04:55:32 +00:00
Steven Dake
82bbabb663 Fix problem with 1722 commit which broke ipc.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1776 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-24 06:15:17 +00:00
Christine Caulfield
9a3ccc6059 Don't crash if a library tries to talk to a module that is not loaded
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1772 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-20 08:24:40 +00:00
Steven Dake
c077255702 Whitetank IPC Forward Port.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1766 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-19 02:23:58 +00:00
Angus Salkeld
c049f8bf21 Fix coverity bug ID 4: remove unused code & fix compile error
In evs_dispatch()  the local ignore_dispatch is not used.
So I have removed this code.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1717 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-28 09:25:17 +00:00
Angus Salkeld
e58f29f578 Fix coverity bug ID 7: add NULL pointer check
Here coverity checks that if in a function a pointer is checked
for NULL then it is checked through out the function.

So below I have just add some more checks for NULL.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1715 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-28 09:01:35 +00:00
Christine Caulfield
cfc7da3573 quorum is now an optional loadable module (though I've put it into the
defaults in services.c) and can load another module to do the quorum
work (eg YKD which I've made more compliant too). All the quorum code
has been removed from sync.c. quorum.c is simply a shim later for the
coroapi, the main module is in vsf_quorum.c

There are coroapi calls to query quorate status and also to get
notifications when it changes.

I've included the testquorum.lcrso module in this patch because I think
it's really helpful for testing. It sets the quorum state based on an 
objdb variable, this can be set or cleared using corosync-cfgtool



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1704 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-08 15:55:41 +00:00
Angus Salkeld
17c0625160 LINT: fix "Assignment of ssize_t to int" warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1696 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 18:13:47 +00:00
Angus Salkeld
efb280c511 LINT: rename the overlay struct so they are uniq.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1694 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 17:26:58 +00:00
Angus Salkeld
56eaee9561 cleanup the last of the SAF headers and types
This includes the rename of identifiers from corosync to cs.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1689 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-06 21:49:07 +00:00
Angus Salkeld
301a730dd1 remove some new warnings from corosync
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1677 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-21 21:44:29 +00:00
Christine Caulfield
5bb7ca5da5 This is an initial pass at a top-level quorum system. As it stands, this
module doesn't provide quorum itself, merely a framework for setting and
querying it. I envisage YKD plugging into this rather than straight into
sync() eventually.

I've plugged this into the sync() routines rather than replacing them so
that quorum is itself a VSF, rather than a replacement - I'm not sure if
that is best or not. Opinions are welcome.

I've added an extra enum member to the service_handler so that we can
send IPC messages when the cluster isn't quorate. This will default to
NO (as now) but allows us to query and set quorum when we don't have it
.. a useful feature !



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1674 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-13 14:27:41 +00:00
Angus Salkeld
f9609f3217 Propagate the flow control state between AIS exec and library
This patch causes the flow control state in the library to be set
properly when the flow control is turned off (disabled).  Then it can be
read properly by the flow control apis.
This also fixes the case where the application is no longer sending
messages and it has already dispatched all its received messages
before flow control is disabled.

Also, CPG response messages with a TRY_AGAIN error did NOT contain
a valid flow control state value. This meant the library could get
stuck with flow control enabled (flow control was never enabled
for the EXEC, so no disable event occurred).
This case was hit when a new node was joining - sync_in_process()
resulted in a TRY_AGAIN for error cpg_mcast_joined).

Also, in message_handler_req_exec_cpg_mcast() the state passed
back to the library defaulted to disabled for messages received
from another node (even if flow control was still enabled)
- this meant if multiple nodes were sending CPG messages,
  then the library flow control state flip-flopped between
  enabled and disabled.

Author: Steven Dake <sdake@redhat.com> &
        Tim Beale <tim.beale@alliedtelesis.co.nz>




git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1667 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-17 19:15:00 +00:00
Angus Salkeld
31aa88aefb Provide a way to configure (at compile time) message and queue sizes.
This patch makes it possible to override the following #defines:
MESSAGE_SIZE_MAX
MESSAGE_QUEUE_MAX
SIZEQUEUE
FLOW_CONTROL_ENTRIES_ENABLE

If MESSAGE_SIZE_MAX is defined as 1024*64 (64K) and
MESSAGE_QUEUE_MAX defined as 512 you can change corosync's
memory footprint from ~48M to ~8M

So if you define MESSAGE_QUEUE_MAX, the queue size will
not be based on the message size any more.

To use this define the defines on the command line:
make CFLAGS="-DMESSAGE_SIZE_MAX=1024*64 -DMESSAGE_QUEUE_MAX=512"



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1656 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-20 00:57:40 +00:00
Steven Dake
01b8bc6ab2 Finish the renaming of openais to corosync in the tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1646 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 06:15:26 +00:00
Steven Dake
dd3991c0bb Proper rename of openais usage to corosync throughout tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1637 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:54:46 +00:00
Steven Dake
e1f531380a Revert patch 1633 which breaks build.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1636 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:44:26 +00:00
Steven Dake
c4a1c7eb96 Change all occurances of openais to corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1633 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:04:01 +00:00
Fabien Thomas
0c92a5e564 reorganize include file to match installed tree to build openais without installing corosync; correct some warnings and error under FreeBSD and Darwin
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1632 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 14:59:50 +00:00
Steven Dake
617dbdf2f0 Split openais and corosync tree into two seperate repositories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1622 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-05 13:23:46 +00:00
Steven Dake
46babc95ad Initial move of corosync and openais trees into seperate directories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1582 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-21 07:59:08 +00:00
Steven Dake
46b0163813 Change all email addresses that were sdake@mvista.com to sdake@redhat.com.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1541 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-05-12 13:48:06 +00:00
Steven Dake
a2a2d486bc Build on latest glibc.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1520 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-04-22 14:36:52 +00:00
Patrick Caulfield
94561626e6 Remove some includes from .h files so they can be installed.
Also install flow.h & ipc.h for external services.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1467 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-10-10 10:33:55 +00:00
Steven Dake
e132bc580c Expose utils to the user
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1442 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 06:58:41 +00:00
Steven Dake
113a3c4f88 The logsys logging system. Read logsys_overview.8.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1428 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 06:38:10 +00:00
Steven Dake
9d27cc2f35 Fix minor leaks caused by not calling pthread_mutex_destroy throughout the tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1412 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-08-07 23:52:21 +00:00
Steven Dake
0a19a21f1b Remove this_ip from the source tree and replace with accessor functions.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1379 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-06-05 08:55:44 +00:00
Steven Dake
64fb1d1c18 Change timers to add duration and absolute timers. Use nanoseconds since
epoch to track timers.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1378 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-06-04 23:21:46 +00:00
Steven Dake
a161cc23c8 on 32 bit platforms, the message source conn info could have uninitialized
values.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1371 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-05-17 20:37:20 +00:00
Patrick Caulfield
08dd4174c6 In trunk, totemip.h and totem.h call for "../include/swab.h" - this works fine
when building openais itself but causes problems when installed as those files
will not be in the right place.

So, I've moved these includes out of totemip.h and totem.h and into the .c files
that call them.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1370 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-05-05 14:02:53 +00:00
Steven Dake
a4029d65a5 Solaris port patch to fix a few problems from last big patch.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1355 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-03-14 19:02:49 +00:00
Steven Dake
cb154572a2 Patch from Renaud to report some broken Solaris porting from past.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1353 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-03-06 16:18:44 +00:00
Fabien Thomas
cdb8452805 handle case where POLLHUP or POLLERR are not supported by OS
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1311 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-11-23 08:49:21 +00:00
Fabien Thomas
b07e2dee27 remove invalid code / warnings detected by Intel compiler
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1308 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-11-16 17:34:44 +00:00
Steven Dake
22d3403a6f Forward port of IPC code from whitetank branch to fix known defects.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1303 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-11-13 17:55:51 +00:00
Steven Dake
9db9cb1263 Improve behavior of IPC flow control for CPG service during configuration
changes.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1301 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-11-13 17:39:10 +00:00
Steven Dake
336dc17daa Forward port of flow control work from whitetank branch.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1289 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-11-04 22:29:14 +00:00
Fabien Thomas
7f1ba08543 correct broken POLLHUP, POLLERR under BSD
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1228 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-08-24 15:48:25 +00:00
Steven Dake
0add7e0611 Committed a bunch of changes for testing scalability - reverting patch
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1177 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-08-05 08:51:06 +00:00
Steven Dake
90ccff6bbc Solaris port for openais
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1175 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-08-05 02:22:12 +00:00
Steven Dake
806258b5c3 Cleanup log_printf to use gnu attributes to do automatic type checking.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1166 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-07-26 07:39:53 +00:00
Steven Dake
8f20b62d39 Increase IPC thread stack size from 100k to 200k to accomodate larger data
structures in ipc message handlers (for the CLM service).


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1149 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-07-21 09:01:12 +00:00