Christine Caulfield
94e4234c99
Fix corosync-cfgtool -a so that it actaully produces some output!
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2227 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-10 07:33:19 +00:00
Christine Caulfield
3855b4285e
Don't let corosync-keygen fail if /etc/ais already exists
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2207 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-04 16:12:08 +00:00
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
Fabio M. Di Nitto
75c9085204
Fix logsys TAG handling
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2180 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-13 03:59:47 +00:00
Christine Caulfield
e9660ee62f
Add libnss security support to corosync.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2145 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-25 14:05:27 +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
d86737ac9c
remove empty lines at end-of-file
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2118 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 08:04:06 +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
Jim Meyering
f5edd27d1d
corosync-cfgtool.c: handle strdup failure gracefully
...
* tools/corosync-cfgtool.c (xstrdup): New function.
(main): Use it in place of strdup.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2100 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-20 18:26:22 +00:00
Steven Dake
221dddd0dd
add schedwrk_create and schedwrk_destroy coroapi functions.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2089 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-18 14:39:57 +00:00
Jim Meyering
3081a12f18
corosync-fplay.c: don't shadow file-scoped global, "record"
...
* tools/corosync-fplay.c: Rename: s/record/g_record/.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2074 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-15 19:13:03 +00:00
Jim Meyering
567ea5464c
corosync-fplay.c: avoid shadowin: s/index/idx/
...
* tools/corosync-fplay.c (printer_totempg_mcast_fits):
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2072 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-15 19:12:48 +00:00
Jim Meyering
f2ceecc700
corosync-keygen.c: diagnose a few more failures
...
* tools/corosync-keygen.c (main): Diagnose short reads, failed mkdir
and fchmod; detect write failure. Close file descriptors.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2059 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-15 06:47:34 +00:00
Steven Dake
ee82f48345
Remove warning in keygen and report error on fchown appropriately.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2052 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-10 02:44:51 +00:00
Steven Dake
2827180b36
Remove warning in corosync-objctl.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2051 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-10 02:40:33 +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
781d3454c2
confdb.h: continue API changes: const+size_t
...
* include/corosync/confdb.h (confdb_object_create_notify_fn_t):
(confdb_object_delete_notify_fn_t):
* tools/corosync-objctl.c (tail_object_created, tail_object_deleted):
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2001 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:30:54 +00:00
Jim Meyering
41cc0e06b4
print "?" in place of non-printing bytes of obj/key/val values
...
* tools/corosync-objctl.c: Include <ctype.h>
(print_name): New function.
(tail_key_changed): Use it to avoid printing garbage to screen.
* include/corosync/confdb.h (confdb_key_change_notify_fn_t): Convert
type of "int" length params to "size_t".
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2000 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:30:41 +00:00
Jim Meyering
1701b32f1d
confdb.h (confdb_key_change_notify_fn_t): Make 3 params "const"
...
* include/corosync/confdb.h (confdb_key_change_notify_fn_t):
Make 3 params const.
* tools/corosync-objctl.c (find_object_of_type_t, callbacks):
(tail_key_changed): Don't write into would-be-const members.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1999 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:30:33 +00:00
Jim Meyering
a8bad8dee2
corosync-objctl.c: remove a just-added "const"
...
* tools/corosync-objctl.c (get_key): Remove just-added const from
2nd parameter.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1989 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 17:55:41 +00:00
Jim Meyering
05f2a7afee
remove unused file-scoped global
...
* tools/corosync-fplay.c (records_printed): Remove.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1985 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:34:01 +00:00
Jim Meyering
d2430bce4d
avoid prototype warnings, constify
...
* tools/corosync-fplay.c: Make many parameters and local pointers const.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1984 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:33:49 +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
9bd1a8e728
declare many functions "static" (also avoids missing prototype warnings)
...
* 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):
* tools/corosync-cfgtool.c (service_load_do, service_unload_do):
(shutdown_do, showaddrs_do, killnode_do, usage_do):
* tools/corosync-fplay.c (totemip_print, print_string_len):
(sync_printer_confchg_set_sync, sync_printer_set_sync_state):
(sync_printer_process_currentstate):
(sync_printer_process_get_shouldsync):
(sync_printer_checkpoint_release):
(sync_printer_checkpoint_transmit, sync_printer_section_transmit):
(sync_printer_checkpoint_receive, sync_printer_section_receive):
(sync_printer_nada, sync_printer_confchg_fn):
(printer_totemsrp_mcast, printer_totemsrp_delv):
(printer_totempg_mcast_fits, sync_printer_service_process):
* tools/corosync-objctl.c (get_child_name, get_parent_name):
(get_key):
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1980 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:33:07 +00:00
Jim Meyering
51cad562ae
add "void" parameter list to avoid "isn't prototype" warning
...
* 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):
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1977 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:32:32 +00:00
Jim Meyering
b7e9fcaa1b
corosync-fplay.c: make more robust, avoid warnings
...
* tools/corosync-fplay.c (main): Diagnose malloc,open, and read failures
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1926 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:10:53 +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
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
Fabio M. Di Nitto
20e0336de5
configure.ac:
...
- Fix white space for --help.
- Drop LCRSODIR as global and move it to local directory.
all */Makefile.am:
- export -DDIRECTORY_NAME as required (for now only LCRSO and
SYSCONFDIR)
top level Makefile.am:
- drop hardcoded ETCDIR that is just wrong and use the configured one
*.c files around:
- drop hardcoded ETCDIR and use configured one.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1853 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-16 13:54:40 +00:00
Fabio M. Di Nitto
0e4f5a04c7
Fix more build/install glitches
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1837 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 11:33:19 +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
Christine Caulfield
9ff50d8e38
The IPC patch broke CFG shutdown in several places, this patches fixes
...
all of them.
In particular, cfg_try_shutdown asks all applications that are
registered for callbacks if they approve the shutdown. This caused a bit
of a re-entrancy problem because it also asked the process that called
for the shutdown! The patch causes cfg to only ask OTHER applications in
the assumption that any application that calls
corosync_cfg_tryshutdown() will approve of the action :-)
In addition it adds the response to cfg_replyto_shutdown which was
missing (it couldn't be used with the old system but is mandatory now),
and removes a double-free in the library finalise code.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1794 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-06 10:07:35 +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
7e5a3e4c87
Add corosync_cfg_local_get() call to get the local NodeID in libcfg
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1759 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-13 09:21:57 +00:00
Christine Caulfield
9884749683
Make all the bicapitalised names in cfg more sensible.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1732 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-19 08:31:21 +00:00
Christine Caulfield
bcbc007ecd
add corosync_cfg_get_node_addrs() call.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1726 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-14 09:27:40 +00:00
Steven Dake
240abb3138
Patch to fix compilation of macosx and linux in some platform configurations.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1705 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-08 16:11:07 +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
75bd25e195
LINT: tweek the lint make rules.
...
Makefile.inc: add -unrecog (don't complain about things like strdup().
tools/Makefile: don't use *.c as it complains about duplicate main() functions
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1695 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 17:28:22 +00:00
Angus Salkeld
fd25950970
LINT: fix or ignore unchecked return values.
...
If we don't care about the return value then typecase the return
value to void.
Else do something useful with the return value.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1693 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 17:25:22 +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
bb57c27e56
Add a top level "make lint"
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1684 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-01 08:19:18 +00:00
Christine Caulfield
39b505682d
This patch adds two extra features to the CFG service in corosync, these
...
are taken (conceptually at least) from cman.
1. corosync_cfg_killnode() this will tell a remote node to exit.
2. corosync_cfg_tryshutdown() this will do a semi-controlled shutdown in
that it will consult any interested attached daemons if they are willing
to let corosync be shut down. If they all agree then the rest of the
cluster will be informed before the node dies.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1683 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-31 13:20:29 +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
0c631e24fc
Logsys flight recorder.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1681 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-30 22:25:56 +00:00
Christine Caulfield
c08559c0ba
Improve the usage message of corosync_objctl.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1679 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-27 15:56:46 +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