Commit Graph

255 Commits

Author SHA1 Message Date
Jan Friesse
8605bbc7b2 Fix coroipcc linking
Fixes rhbz#499918
	
Functions from ckpt library (like aCkptCheckpointOpen,
saCkptSectionIterationInitialize, ...) internally uses corosync functions
reply_receive, reply_receive_in_buf, ... This functions are included in
coroipcc.c source file and uses global static variable ipc_hdb.

Without patch, coroipcc is linked to shared library (libcoroipcc.so) AND linked
with every corosync libraries (like cpg, ....), so global variable ipc_hdb is
included not only in libcoroipcc.so, but also in libcpg.so, ...

dlm_controld has function retrieve_plocks, and whole binary is linked with
libcoroipcc and libcpg. So ipc_hdb is included TWICE (so has TWO addresses).

Main problem causing the bug was, that reply_receive uses address from one
library, and reply_receive_in_buf uses other. This confuses check of hdb_get
function.

After removing linking of coroipcc.o to cpg, and rather use of dynamic version,
 (this means, there is only one instance of ipc_hdb) problem disappeared.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2203 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-01 08:46:10 +00:00
Jim Meyering
1f40a10983 don't include <signal.h> when it's not used
* exec/coroparse.c: Likewise.
* exec/quorum.c: Likewise.
* exec/sync.c: Likewise.
* exec/totemmrp.c: Likewise.
* exec/totemnet.c: Likewise.
* exec/totemrrp.c: Likewise.
* exec/totemsrp.c: Likewise.
* exec/vsf_quorum.c: Likewise.
* exec/vsf_ykd.c: Likewise.
* lcr/uic.c: Likewise.
* lcr/uis.c: Likewise.
* lib/cfg.c: Likewise.
* services/cfg.c: Likewise.
* services/cpg.c: Likewise.
* services/evs.c: Likewise.
* services/pload.c: Likewise.
* services/testquorum.c: Likewise.
* services/votequorum.c: Likewise.
* test/testconfdb.c: Likewise.
* test/testcpg.c: Likewise.
* test/testcpgzc.c: Likewise.
* test/testzcgc.c: Likewise.
* tools/corosync-cfgtool.c: Likewise.
* tools/corosync-objctl.c: Likewise.
* tools/corosync-pload.c: Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2193 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 16:41:46 +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
Jim Meyering
84f1fbb53f always include <config.h> before any other file
* test/cpgbench.c: Include <config.h> before any other file.
* test/cpgbenchzc.c: Ditto.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2191 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 16:41:28 +00:00
Jim Meyering
621d734e7c avoid 'incompatible pointer type' compiler warning
* test/cpgverify.c (cpg_deliver_fn): Remove const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2168 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-04 12:37:27 +00:00
Steven Dake
2274c6c961 Add cpgverify program to test directory.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2162 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-28 06:45:26 +00:00
Steven Dake
d72f0cc03c Remove const from delivery callback to allow inplace endian changes of
message contents.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2150 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-26 02:38:46 +00:00
Steven Dake
65f8490350 use uint64_t for hdb_handle_t type and also specify some formatting
strings for printing handles out of the handle database.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2126 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-23 10:03:01 +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
Steven Dake
75c4bc0d71 Zero copy feature for IPC transmits. Also integrated into CPG library
service.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2114 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-21 23:37:49 +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
Steven Dake
d830a52db5 Remove declaration of data struct inside code.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2085 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-18 07:43:33 +00:00
Steven Dake
832b6cb7e6 Remove warning in evsbench.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2084 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-18 07:42:25 +00:00
Steven Dake
043de4d80a check result of fgets in testcpg.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2082 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-18 07:25:04 +00:00
Steven Dake
0969721db3 Rework how dispatch functions so service engines work properly.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2079 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-18 07:06:14 +00:00
Jim Meyering
e5962b419d testvotequorum1.c: don't shadow file-scoped global, "handle"
* test/testvotequorum1.c (main): Rename: s/handle/g_handle/.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2073 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-15 19:12:56 +00:00
Jim Meyering
7d457e121b don't shadow file-scoped global, "handle"
* test/testquorum.c: Rename: s/handle/g_handle/.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2069 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-15 19:12:25 +00:00
Jim Meyering
09eeca1299 testevsth.c: const+size_t: evs_deliver_fn, evs_confchg_fn
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2046 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-09 12:32:49 +00:00
Jim Meyering
3df307a36d sync the rest of the code with previous header changes
* exec/coroipcs.c (coroipcs_response_send)
(coroipcs_dispatch_send):
* exec/coroipcs.h (handler_fn_get):
* include/corosync/cpg.h (cpg_deliver_fn_t, cpg_confchg_fn_t):
* test/cpgbench.c (cpg_bm_confchg_fn, cpg_bm_deliver_fn):
* test/testcpg.c (print_cpgname, DeliverCallback)
(ConfchgCallback):
* test/testcpg2.c (deliver, confch):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2044 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:53 +00:00
Jim Meyering
00db317b82 sync the rest of the code with previous header changes
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2042 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:37 +00:00
Jim Meyering
cf2c12a988 evs.h: s/int/size_t; const-correctness changes
* exec/sync.c (barrier_data_confchg_entries):
* include/corosync/evs.h (evs_deliver_fn_t, evs_confchg_fn_t):
(evs_callbacks_t):
* lib/evs.c (MIN, evs_join, evs_leave, evs_mcast_joined):
(evs_mcast_groups, evs_membership_get):
* test/evsbench.c (evs_deliver_fn, evs_confchg_fn):
* test/evsverify.c (evs_deliver_fn, evs_confchg_fn, main):
* test/testevs.c (evs_deliver_fn, evs_confchg_fn, main):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2023 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:43:17 +00:00
Jim Meyering
6b9505992f confdb.h (confdb_reload) Add errbuf_len parameter and propagate.
* include/corosync/confdb.h (confdb_callbacks_t):
* lib/confdb.c (confdb_reload):
* lib/sa-confdb.c (confdb_sa_reload):
* lib/sa-confdb.h:
* test/testconfdb.c (main):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2004 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:31:38 +00:00
Jim Meyering
1308223dab confdb.h: error_text vs. buflen
* lib/confdb.c (MIN): Define.
(confdb_write): Use new errbuf_len parameter.
Also note bugs (Chrissie confirms) that error_text is not
set in two error-return cases.
* test/testconfdb.c (do_write_tests): Update use of confdb_write.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2002 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:31:12 +00:00
Steven Dake
870046d065 Patch to use snprintf where appropriate to avoid buffer overrun.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1990 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-02 18:49:24 +00:00
Jim Meyering
748cf03858 remove unused functions and variable
* 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.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1983 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:33:36 +00:00
Jim Meyering
3965e378e6 avoid prototype warnings
* 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.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1982 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:33:23 +00:00
Jim Meyering
5aedf3ef68 * test/testevs.c: avoid 2 warnings, decl "static"
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1981 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:33:15 +00:00
Jim Meyering
5356549f69 evsverify.c: avoid 1 warning
* test/evsverify.c: Add a const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1973 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:18:21 +00:00
Jim Meyering
4f1249eaa1 testcpg.c: avoid 1 warning
* test/testcpg.c (sigintr_handler): Mark as "noreturn".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1972 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:18:11 +00:00
Jim Meyering
a2d9895dff evsbench.c: avoid 1 warning
* test/evsbench.c (sigintr_handler): Mark as "noreturn".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1971 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:18:04 +00:00
Jim Meyering
68d86dd107 testvotequorum1.c: avoid 5 warnings
* test/testvotequorum1.c (node_state): Return "const char *".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1958 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:16:17 +00:00
Jim Meyering
f77bb880ac evsbench.c; avoid a format mismatch warning
* test/evsbench.c (evs_deliver_fn): %s vs. void*

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1957 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:16:05 +00:00
Jim Meyering
06fbaac7b6 avoid format mismatch warning
* test/testquorum.c (quorum_notification_fn): Add casts to
match formats.  Use unsigned formats for unsigned values.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1954 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:15:32 +00:00
Jim Meyering
df81971a5a testcpg2.c: avoid 1 warning
* test/testcpg2.c (main): Add a const-discarding cast.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1953 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:15:25 +00:00
Jim Meyering
d857322dc6 testevs.c: avoid 2 more warnings
* test/testevs.c: Declare global to be "static const".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1952 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:15:17 +00:00
Jim Meyering
f3d0c2485e * test/testcpg.c (main): Remove decl of unused var.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1951 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:15:05 +00:00
Jim Meyering
abd8e7c5cb avoid 9 warnings
* test/logsysbench.c (bm_finish): Make parameter "const".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1903 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 10:38:39 +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
Fabio M. Di Nitto
ae754092ca - tidy up whitespaces
- try to keep everything < 80 cols

- stop installing testing lcrso

- fix soname= invokation



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1861 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-17 18:37:03 +00:00
Christine Caulfield
927921109c Fix testconfdb use of object handles.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1844 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-12 14:30:58 +00:00
Christine Caulfield
2924b84b60 Fix some const warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1828 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 17:13:37 +00:00
Steven Dake
1b39d2c322 Remove leftover from automake merge.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1800 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 09:00:15 +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
Fabio M. Di Nitto
0419be3366 Cleanup logsys format init around to use default settings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1795 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-09 12:59:40 +00:00
Christine Caulfield
f5a64b8d64 This patch fixes some minor bugs in the expected_votes behaviour and
adds a couple of new features:

- When total_votes exceeds the expected_votes value then expected_votes
is increased to that value.

- A callback can be sent to a client whenever expected_votes is changed



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1784 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-26 14:51: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
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
Christine Caulfield
a8256ad5fc Add the votequorum service
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1745 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-26 10:46:08 +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
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