Commit Graph

76 Commits

Author SHA1 Message Date
Steven Dake
2ad0cdc832 Update copyright header dates in exec directory
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-13 17:05:04 -07:00
Fabio M. Di Nitto
a2b960d109 service: fix service unload regression introduced by lcrso dropping
service exec_exit_fn was not honored because the loop was looking
into the wrong icmap key

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2012-01-31 10:16:16 +01:00
Steven Dake
007e5c9458 Honor exec_init_fn call
exec_init_fn now either returns NULL (success) or a string which indicates
the error that occured during service engine initialization.  If an error
occurs, corosync will exit.  This patch adds ykd and makes other suggestions
from Fabio Di Nitto.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-30 14:05:09 -07:00
Angus Salkeld
3131601ce2 Remove all unneccessary "\n" from log messages
These look ugly, are inconsistently done and just have
to be removed later in libqb before calling syslog.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-23 13:08:23 +11:00
Fabio M. Di Nitto
74619e9550 quorum: fix votequorum service initialization
the problem is that votequorum was listed as part of default
services.

At service_link_and_init, votequorum library and exec were being
made available, even when votequorum was not in used at all, creating
all kind of problems.

By changing the service_link_and_init to be clever, we restore the
original and wanted behavior to link the service only when required.

This also fixed N*votequorum API calls segfaults, init segfaults
and a few dozen other small issues...

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2012-01-17 14:49:55 +01:00
Steven Dake
e423e43bc6 Finish up quorum integration
Signed-off-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio Di Nitto <fdinitto@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-16 09:31:01 -07:00
Steven Dake
43e148276f Remove some lcr ifdef'ed code in service.c
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-16 09:30:57 -07:00
Steven Dake
75bc06d916 Remove lcr directory, files, and references since it is no longer needed
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-16 09:30:40 -07:00
Steven Dake
f763d3ba4a Initial removal of plugins
Quorum is broken in this patch.
service.h needs to be cleaned up significantly

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-16 09:30:26 -07:00
Steven Dake
7e1c9771f2 unshare exec/icmap.so
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-12 07:29:41 -07:00
Steven Dake
7c8e83ac34 Change all ais references to corosync
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-12 07:29:15 -07:00
Steven Dake
e5aba30a49 Move coroapi out of external headers
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkled <asalkeld@redhat.com>
2012-01-07 17:47:45 -07:00
Steven Dake
8ad583a54c Move logsys.c into corosync binary instead of a shared object
Our preferred shared logging system is exported via the libqb library.  As
a result, the corosync project no longer needs to export logsys.so and the
code can be directly included in the binary.  The header file can also be
removed.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2012-01-06 18:19:59 -07:00
Jan Friesse
8a45e2b152 Move corosync core to use icmap
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-15 09:19:17 +01:00
Angus Salkeld
94b11502cb LOG: get the logging to work from loaded quorum modules
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-15 10:10:54 +11:00
Angus Salkeld
f5a31e55a2 Add calls to missing object_find_destroy() to fix mem leaks
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-11-11 08:12:13 +11:00
Angus Salkeld
37e17e7a94 libqb: logging & trace
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-08-09 10:37:16 +10:00
Angus Salkeld
bd150728bf libqb: Improve IPC dispatch and async handling
Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-09 10:37:16 +10:00
Angus Salkeld
b785c5ed08 libqb: use the main loop to shutdown
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-08-09 10:37:15 +10:00
Angus Salkeld
c6895faa05 libqb: change ipc -> qb_ipc
IPC: return 0/-ENOBUFS from message handler
IPC: use the new rate_limit API to improve perf.
CPG: add send_async API & hook up flow control
IPC: Fix flow control getting stuck.
IPC: Port the remaining libs to use libqb IPC
IPC: remove libqb flowcontrol API
TEST: put cpg_dispatch() in it's own thread
IPC: cleanup ipc_glue.c name everything cs_ipcs_*()
IPC: add back statistics
IPC: remove coroipcc_ symbols from lib*.versions
IPC: init each se's IPC as it is loaded.
IPC: use the new connection_closed() event to free the context.
IPC: re-add zero copy functionality back
IPC: remove cpg_mcast_joined_async() and make it the default
 -> now cpg_mcast_joined() == cpg_mcast_joined_async()
libqb: expose a libqb error converter
libqb: add missing error conversions
libqb: remove repeat try loop in lib/cpg.c
CPG: fix zero copy mcast
CPG: use newer return codes
Add ENOTCONN to qb_to_cs_error()
libqb: fix error conversion from errno to cs_error_t in confdb
libqb: change errno_to_cs to qb_to_cs_error
libqb: add a cs_strerror() to get a more meaningful message
libqb: fix some confusing error conversions.
libqb: set the timeout on recv's to -1 (wait forever)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-08-09 10:37:14 +10:00
Angus Salkeld
07d06c0c0f Add monitoring and watchdog services.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3053 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-09-27 21:12:03 +00:00
Angus Salkeld
43d4f9d040 cov 10389: remove unneccessary check.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2836 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-16 21:31:28 +00:00
Angus Salkeld
2f21e126be cov 10371: check return of lcr_ifact_reference
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2835 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-16 21:29:30 +00:00
Angus Salkeld
59826dd14e Fix unloading of evs (service id == 0)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2731 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:16:32 +00:00
Jan Friesse
5a8200c1cb Fix corosync shutdown process
This patch change corosync shutdown process, so now:
- exit function of service engine is called
- all IPC connections are closed and removed from poll
- service engine is unlocked


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2657 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-16 11:29:14 +00:00
Steven Dake
60e406f355 Resolve shutdown problems for pacemaker use case.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2531 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-20 21:07:50 +00:00
Angus Salkeld
73a24c0352 Add totem stats to objdb.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2517 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 17:30:20 +00:00
Angus Salkeld
f78e719713 Add per service-function statistics.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2515 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 00:39:39 +00:00
Angus Salkeld
73b7aa19bb Add value types to objdb keys.
This allows you to create a key with a know type.
And then get the type with the key value.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2511 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-10 03:20:38 +00:00
Christine Caulfield
2433ee3b2c This patche fixes a couple of small problems with votequorum:
- if a single node is booted with votequorum loaded then
   corosync-quorumtool shows zero nodes and no votes.
- votequorum doesn't always tell the main quorum module when a new node 
has joined the cluster (principally itself. this bug is actually tied 
into the above)

I've also added quorum to the default list of services. As quorum has 
been decoupled from sync it will not interfere with normal operations as 
it used to do and it makes more sense to have it there than not.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2510 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-06 12:57:35 +00:00
Jan Friesse
d11f1f90c2 Fix found_service_ver handling
Sometimes, when object_key_get doesn't return found_service_ver it
doesn't change old value and this value is then used in atoi what
will can cause fall of corosync. Patch fixes this case by setting
found_service_ver to NULL before call of object_key_get.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2391 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-19 09:57:28 +00:00
Jan Friesse
a1db33fc99 Handle NULL ver string in service
In case user not enter ver: in service section, whole
corosync falled with segfaul, because atoi was called
on NULL.

Now, in case of NULL, we rather not use atoi, and
return 0 directly.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2370 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-23 14:50:56 +00:00
Jim Meyering
74a2fa1194 maint: remove trailing blanks
By running this command from a git-cloned directory:
git grep -z -l -E '[[:blank:]]+$' | xargs -0 perl -pi -e 's/[ \t]+$//'

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2266 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 11:34:50 +00:00
Andrew Beekhof
e2c5b834f0 Decouple the decouples shutdown/startup order of lcrso's from the internal objdb order.
This is needed as the objdb order will change as modules are loaded/unloaded and is 
also set up to unload non-default services last (which is the opposite of what 
something like Pacemaker needs).

In the worst case, the current behavior leads to cluster services (dlm, ocfs2, etc) 
failing during shutdown.  This patch also ensures that if, for example, cpg is unloaded 
then anything that depends on it is unloaded first.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2224 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-09 16:07:11 +00:00
Jim Meyering
d44aad2eea don't include <assert.h> when it's not used
* exec/apidef.c: Likewise.
* exec/mainconfig.c: Likewise.
* exec/service.c: Likewise.
* exec/timer.c: Likewise.
* exec/totemconfig.c: Likewise.
* exec/totemmrp.c: Likewise.
* exec/vsf_quorum.c: Likewise.
* services/testquorum.c: Likewise.
* test/cpgbench.c: Likewise.
* test/cpgbenchzc.c: Likewise.
* tools/corosync-fplay.c: Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2192 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 16:41:37 +00:00
Steven Dake
8126cf7458 Reworking of include file dependencies.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2119 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 09:01:30 +00:00
Jim Meyering
904a10ed38 remove all trailing blanks
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2117 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 08:03:55 +00:00
Fabio M. Di Nitto
c3c75acfd2 Add logsys v3
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2091 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-20 04:28:33 +00:00
Jim Meyering
8bc74e52db service.c: avoid 5 warnings
* exec/service.c (struct default_service): Make "name" const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1961 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:16:44 +00:00
Jim Meyering
7c2ddcbe40 service.[ch]: remove 7 const-related warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1925 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:10:45 +00:00
Steven Dake
c5fc824d7f Abstracted Shared Memory IPC library
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1885 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-22 15:28:54 +00:00
Fabio M. Di Nitto
031c02f589 - Every .c file should include "config.h" to get the right defines...
- services/Makefile.am: add include search paths for config.h

- include/corosync/cs_config.h.in exports LCRSODIR and SOCKETDIR

- tools/Makefile.am: drop -D defines for dirs that are now in
cs_config.h or config.h

- configure.ac: sanitize prefix and exec_prefix paths. Export DIRS in
*config.h

- lib/Makefile.am: : drop -D defines for dirs that are now in
cs_config.h or config.h. Add rule to build lcr_ifact.o or building from
lib/ fails miserably



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1877 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 12:58:53 +00:00
Steven Dake
072231129e Use hdb_handle_t for handle type in service.c.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1840 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 23:06:18 +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
Christine Caulfield
035ec6f113 Don't automatically load the quorum service.
This will, for the time being, unbreak synchronisation.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1750 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-27 08:59:14 +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
Steven Dake
6198080084 performance loading service engine first implementation.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1682 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-30 22:41:34 +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