Commit Graph

1026 Commits

Author SHA1 Message Date
Steven Dake
ff7b157742 Modify totemnet to work properly on Solaris by setting variables in sendmsg
data structure.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2232 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-10 17:57:22 +00:00
Fabio M. Di Nitto
2dad767cfa Shared libs should not call exit but return error
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2231 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-10 17:00:15 +00:00
Steven Dake
ae8fd0a6e0 Fix semun definitions for various platforms.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2228 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-10 14:28:16 +00:00
Steven Dake
0d98fca548 Use PF_LOCAL to match BSD semantics of api calls.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2226 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-09 21:40:44 +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
Steven Dake
6a72079e3b Remove quorum.c from lcrso build list since its linked into main binary.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2223 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 18:56:36 +00:00
Steven Dake
3d7f87779a Add support for buildling on Solaris platforms.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2222 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:53:56 +00:00
Steven Dake
ae5895c3f7 Call initializer directly for broken platforms which don't honor ctors in the shared object on dlopen.
This could probably be more tidy to detect those OS platforms which don't do this instead of hardcoding
to a specific platform we intend to port to.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2221 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:47:10 +00:00
Steven Dake
6fd822c485 Include limits.h in coroparse.c to properly define PATH_MAX.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2220 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:36:44 +00:00
Steven Dake
1bd8aba6bb Change NAME_MAX to FILENAME_MAX to compile properly on Posix OS.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2219 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:36:11 +00:00
Steven Dake
71f21b95c5 Define MSG_NOSIGNAL if it is undefined by the base OS such as Solaris.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2218 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:31:40 +00:00
Steven Dake
d847720b0d Conditionally compile on Solaris platforms msg_* flags in sendmsg header.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2217 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:31:14 +00:00
Steven Dake
1e0d40cdeb Make readdir operation portable by removing BSDism from coroparse.c.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2215 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 02:30:13 +00:00
Steven Dake
0140854704 Add strsep_cs to replace strsep.
-This line, and those below, will be ignored--

M    exec/mainconfig.c


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2214 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 02:04:32 +00:00
Steven Dake
1e0e9a5633 First run at adding support for corosync totemip determination.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2213 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 01:46:31 +00:00
Steven Dake
e94bcd506e Make coroipcs compile on Solaris.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2212 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 00:55:00 +00:00
Steven Dake
ff8283f0b1 Rename queue datastructure to cs_queue data structure because some fail
operating system struct queue in the globally scoped headers.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2211 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 00:47:56 +00:00
Steven Dake
e8225b667e Port of totemip to Solaris.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2210 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 00:43:18 +00:00
Steven Dake
65b0fff497 Port of logsys to Solaris.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2209 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 00:42:40 +00:00
Andrew Beekhof
b62ed77691 Fix compilation on OSX/Darwin
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2206 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-03 10:46:07 +00:00
Andrew Beekhof
446eb5946c Forward port the clear_node_high_bit from whitetank
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2205 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-03 09:54:22 +00:00
Jim Meyering
6553cf14c8 totempg.c: don't truncate group list
* exec/totempg.c (totempg_groups_join): Fix typo s/=/+/ that
would mistakenly truncate totempg group list.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2204 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-02 17:44:56 +00:00
Christine Caulfield
5d8178f485 Add broadcast option to corosync
This is a forward port of the openais, whitetank, code.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2202 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-01 07:20:17 +00:00
Jan Friesse
ae22983140 Support for uidgid feature
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2198 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-20 13:30:29 +00:00
Christine Caulfield
0feb9936af Adapt the deliver_fn in the YKD quorum plugin to the new tpg API.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2196 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-20 08:37:14 +00:00
Christine Caulfield
827ae57be9 Print a list of quorum members when it changes.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2195 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-20 07:50:53 +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
62c2186d29 exec/schedwrk.c: include <config.h>
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2190 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 16:41:21 +00:00
Jim Meyering
d1c1e78fd0 remove trailing blanks
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2188 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 16:41:04 +00:00
Christine Caulfield
69ff770544 When doing a controlled shutdown of corosync, we now
send out a JOIN message with our node removed. This should
speed up the case where a lot of nodes leave at the same time as
they don't need to wait for the token timeout for each node.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2187 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 14:03:25 +00:00
Jan Friesse
94b64352a4 coroparse: Handle different EOLs and pass error_string
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2186 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 11:44:58 +00:00
Jan Friesse
caceb59f1e Remove duplicity in logsys code
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2185 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 09:42:57 +00:00
Fabio M. Di Nitto
8c7a454e2e Fix output to syslog
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2184 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-13 09:25:08 +00:00
Fabio M. Di Nitto
f96d62d0f2 Fix totem logging after logsys changes
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2181 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-13 04:27:54 +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
7609e4d0aa Fix spelling of "Received" in sync.c
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2179 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-12 09:20:21 +00:00
Jim Meyering
fd20c4e799 logsys.c: avoid possibility of buffer overrun
* exec/logsys.c (strcpy_cutoff): Add buf_len parameter, and never
write more than this number of bytes into "dest".
Change type of "cutoff" parameter from int to size_t.
Sentinel value changes from -1 to 0.
(log_printf_to_logs): Adapt to those changes.
Reverse condition of test so the much-shorter block is the "if-block".
Factor out a common subexpression for readability.
Exit the loop if output_buffer_idx ever reaches sizeof(output_buffer).

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2178 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-12 08:35:17 +00:00
Jim Meyering
d04702854b logsys.c: avoid redundant strlen in else-block
* exec/logsys.c (strcpy_cutoff): Also, with a field width (aka cutoff),
and a shorter-than-field-width string, don't write the same memory
twice: once with strncpy using NUL bytes, then again with spaces
via the memset.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2177 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-12 08:35:09 +00:00
Jim Meyering
fbbc934196 logsys.c: factor out some duplication
* exec/logsys.c (log_printf_to_logs): Factor out repeated calls to
strcpy_cutoff.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2176 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-12 08:35:01 +00:00
Fabio M. Di Nitto
6a9ebd8297 Add debugging code to logsys.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2175 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-12 05:36:09 +00:00
Jim Meyering
f6de37231d totemnet.c: Make totemnet_initialize definition match just-changed decl.
* exec/totemnet.c (totemnet_initialize): Declare deliver_fn's msg_len
parameter to be of type "unsigned int" (not size_t) to match decl.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2174 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-11 17:40:42 +00:00
Fabio M. Di Nitto
4572f1124a Fix logging date format and add missing daemon name
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2173 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-11 08:17:53 +00:00
Steven Dake
20d1d5faf7 Remove most iovector-ized functionality from totem and only make one malloc
and memory copy call in totemsrp_mcast.  The rest of the stack minus totempg
then uses zero copies.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2172 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-09 17:23:17 +00:00
Andrew Beekhof
28df983127 Call all configured exec_dump_fn's when SIGUSR2 is received
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2163 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-28 14:05:52 +00:00
Andrew Beekhof
ed836321a4 Minor fixes to the build process on OSX
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2161 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-27 14:51:05 +00:00
Fabio M. Di Nitto
490c262b3e Fix debug: on option for logging purposes
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2160 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-27 11:37:59 +00:00
Fabio M. Di Nitto
21902efa1b add max limit error checks in logsys
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2159 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-27 11:36:53 +00:00
Steven Dake
695ed267af Improve security of NSS implementation in totem.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2156 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-27 05:01:25 +00:00
Steven Dake
3074491eb9 Make libnss detection work properly.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2153 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-26 05:22:24 +00:00