Commit Graph

1143 Commits

Author SHA1 Message Date
Steven Dake
ee226d0730 Patch to use proper IFA on Linux platforms to match interface addresses when
netmask is not 255.255.255.0.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2550 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-27 22:59:48 +00:00
Angus Salkeld
34ddb1cb14 COVERITY 12: prevent overrun of logsys output buffers.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2547 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-22 23:19:41 +00:00
Angus Salkeld
e5b94a352e COVERITY 14: free zcb_mapped if memory_map() fails.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2544 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-22 06:27:09 +00:00
Steven Dake
6ea4afe60f Revert commit 2523 which results in segfaults under some workloads.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2536 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-22 22:29:02 +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
07072bd0b1 Add a log_printf function to coroipcs so we can pass the log level
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2530 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-18 18:15:24 +00:00
Angus Salkeld
494bf45ebf Avoid array out of bound error.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2529 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-14 23:05:18 +00:00
Steven Dake
765fa65351 Patch from jflesch to fix segfault when using sysv semaphores that the thread
state is checked prior to the semaphore operation, not after it has completed.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2524 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-14 19:06:37 +00:00
Steven Dake
59ecd3ad4a totem process group optimization to not copy data into staging buffer if
it is to be immediately ordered by totemsrp.  Instead pass that data as an
iovector element.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2523 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-14 18:56:54 +00:00
Angus Salkeld
49345f48f8 stats: prevent a div by zero if totem_count is zero.
patch by Chrissie



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2522 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-14 04:06:42 +00:00
Angus Salkeld
97ed934966 Fix the OSX build (broken by stats patches)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2521 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-13 08:13:53 +00:00
Andrew Beekhof
4fba207d42 Add SIGTERM support and have the init script wait for corosync to actually terminate. Bud rh#525552
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2520 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-13 06:16:14 +00:00
Angus Salkeld
948ca19aa7 Add some missing calls to increment the relevant stats.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2519 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 21:56:23 +00:00
Angus Salkeld
4e6e33467d allow coroipcs to work without calling stats initialization.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2518 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 21:50:10 +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
afbbc5e5ff Add connection related statistics to the object db.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2514 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 00:36:55 +00:00
Angus Salkeld
e66297a886 Test the key value size for typed keys.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2513 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-11 23:46:07 +00:00
Angus Salkeld
0c9a6c49ff teach object_key_increment() key types.
This is so we can increment all integer types correctly.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2512 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-11 22:53:13 +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
Steven Dake
978b60806b Totem IBA implementation.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2481 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-25 06:23:04 +00:00
Steven Dake
6ad014a315 make main_service_ready function static.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2480 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-25 06:06:31 +00:00
Steven Dake
6ae6f6e284 Fix abort with multiple cpg clients under heavy load.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2467 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-21 18:27:37 +00:00
Steven Dake
60d50de816 Remove warning in logsys compile related to const correctness.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2463 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-20 06:56:02 +00:00
Steven Dake
215ad336f2 Fix sigpipe handling to ignore sigpipes on systems which support them.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2419 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-20 05:36:52 +00:00
Steven Dake
eb5fa99cae Make delete operation work properly in coropoll.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2418 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-20 05:34:41 +00:00
Angus Salkeld
350cc0ae42 log the built-in features at startup
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2411 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-10 01:51:32 +00:00
Angus Salkeld
147c81ffab don't return the ip address when the mask is not found
Currently totemip_copy (boundto,&ipaddr) is called even when the
required mask is not found.

This patch changes the behavior to only copy the ipaddr when the
mask is found.

The current behavior makes debugging an incorrect config really
confusing.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2409 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-09 18:55:17 +00:00
Angus Salkeld
f3b92eb6b3 Only insert the filename into the log, not the path.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2408 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-09 00:25:36 +00:00
Fabio M. Di Nitto
3ffb151aa7 Fix missing symbol error when loading plugins without executive
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2405 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-07 10:41:42 +00:00
Angus Salkeld
e1ceabc6ef Remove a double unlock in logsys.
In logsys there are a number of XYZ_unlocked() functions that are called
like this:

       pthread_mutex_lock (&logsys_config_mutex);

       XYZ_unlocked();

       pthread_mutex_unlock (&logsys_config_mutex);

The XYZ_unlocked() functions should not do any (un)locking.
But _logsys_config_subsys_get_unlocked() unlocks if it finds the subsys.
This means that there is 1 lock and 2 unlocks.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2404 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-07 08:33:23 +00:00
Christine Caulfield
898790d501 Return CS_ERR_NOT_EXIST if a client tries to contact a plugin that isn't loaded.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2403 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-07 07:28:25 +00:00
Steven Dake
519616de0c Fix off by one calculation error resulting in assertion.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2398 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-28 18:20:14 +00:00
Christine Caulfield
21fedb2495 Send CURRENT callbacks to the dispatch FD rather than the callback one.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2397 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-28 09:36:33 +00:00
Steven Dake
21825d46ea Fix incorrect assertion with frame sizes of 9000.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2395 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-28 01:19:30 +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
55db0b67a2 Fix systems without _POSIX_THREAD_PROCESS_SHARED
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2390 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-19 09:55:49 +00:00
Steven Dake
f558917703 Proper limits checking for message sizes to allow ~1mb max message sizes for corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2388 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-17 18:22:11 +00:00
Fabio M. Di Nitto
13f3c5bc6a Delay forking and closing of fds as much as possible
to allow startup wrappers (such as cman_tool) to collect
as much errors as possible in case of startup failure



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2385 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-12 06:57:53 +00:00
Fabio M. Di Nitto
498f24fa32 corosync: move logsys thread config with all the others
logsys thread priority was configured after forking the
wthread process and spread the scheduler priority config
across a large chunk of code in main.c

Now that logsys scheduler priority can be invoked at any time,
move the code together with corosync_setscheduler code.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2383 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-10 05:39:45 +00:00
Fabio M. Di Nitto
6115c85328 logsys: fix segfault in logsys_thread_priority_set
logsys_thread_priority_set expects that wthread is already running
but doesn't perform any check if it is.

if logsys_thread_priority_set is invoked before forking the thread,
a segfault is guaranteed.

this changes to logsys_thread_priority_set ensure that a request
for a new scheduler priority is queued if the wthread is not
created yet and the new scheduler parameters are applied as early
as possible after the thread is created.

At the same time:

- add a few comments on clean up that needs to be done
- remove a redundant check for policy != SCHED_OTHER as that's
  corosync need specific. logsys should simply accept the request
  and apply it.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2382 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-10 05:32:58 +00:00
Jan Friesse
9931d50b31 Support for -v (version) feature
This can be usefull for easier way to get informations
of the corosync version from users. Version and SVN
revision (get by svninfo -c) are displayed.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2381 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-04 07:39:03 +00:00
Christine Caulfield
27b55337ce This patch makes a copy of the notifications list before calling the
reload_notifications callbacks. This allows callback functions to 
manipulate the notifications list without causing corruption or strange 
loops.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2380 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-04 07:14:55 +00:00
Steven Dake
ee7ce5e328 Use unnamed shared posix semaphores on platforms which support them.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2379 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-04 00:22:41 +00:00
Steven Dake
4e3e77eb13 Always keep autogenerated node ids in totem as LE even on BE arches.
Have testcpg print out autogenerated nodeid properly on BE arch.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2377 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-04 00:04:13 +00:00
Jan Friesse
2ef1853fe2 Support for systems where clock_gettime is not available
On some systems clock_gettime is not available so we are
testing availability and value of _POSIX_MONOTONIC_CLOCK.

On system without support of clock_gettime, we are using
old behaviour with function gettimeofday.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2376 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-03 08:11:53 +00:00
Jan Friesse
c50a6bd065 Support for monotime timer
This patch should solve problems with corosync and ntp, by using
clock_gettime where it make sense.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2373 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-27 10:12:55 +00:00
Steven Dake
69928e301a Add notification when totem has completed initialization.
This triggers the initialization of the service engines which may need totem
for initialization.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2372 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-27 02:00:05 +00:00
Steven Dake
f9f663f459 Add a target token set completed callback in totemrrp and below layers.
Handle management of callback in totemsrp.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2371 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-27 00:29:32 +00:00