Commit Graph

2139 Commits

Author SHA1 Message Date
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
Andrew Beekhof
8ec3339ba3 Darwin libraries need -install_name otherwise they're not usable without DYLD_LIBRARY_PATH (which is highly unrecommended)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2417 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-16 09:02:35 +00:00
Steven Dake
f170a431ce Fix error with revision 2415.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2416 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-14 20:27:45 +00:00
Steven Dake
c14c130df5 Fix dispatch returning TRY_AGAIN when using DISPATCH_ALL parameter because of
regression caused by revision 2046:lib/coroipcc.c.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2415 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-14 18:58:08 +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
b13a7aba13 add small-memory-footprint option to configure
This adds the following option to configure:
--enable-small-memory-footprint

When enabled the following defines are set
to reduce the overall memory footprint.

MESSAGE_SIZE_MAX=1024*64
MESSAGE_QUEUE_MAX=512
PROCESSOR_COUNT_MAX=16
IPC_REQUEST_SIZE=1024*64
IPC_RESPONSE_SIZE=1024*64
IPC_DISPATCH_SIZE=1024*64




git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2410 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-09 18:58:38 +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
Christine Caulfield
7f3da97ca3 Really add corosync-quorumtool
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2407 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-08 08:19:11 +00:00
Christine Caulfield
6f3fabe398 Add corosync-quorumtool
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2406 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-08 08:14:58 +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
Fabio M. Di Nitto
8dad75ef05 Fix corosync-tools linking
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2402 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-07 07:24:15 +00:00
Jan Friesse
e25f36b653 Real add of corosync-cpgtool
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2401 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-31 15:58:12 +00:00
Jan Friesse
bc5031ff2f Initial version of corosync-cpgtool
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2400 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-31 09:57:20 +00:00
Jan Friesse
db87fb8f56 Implementation of cpg_iteration functions
This functions allows iterate available cpg groups
and their members. API is modelled like ckpt iteration
functions.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2399 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-31 09:23:16 +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
Christine Caulfield
03379a0f3a Fix nodelist passed to the quorum subsystem.
When a node left, the old nodelist was sent, sigh



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2396 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-28 09:35:18 +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
Steven Dake
3d05244ca0 Allow finalize routines to occur inside dispatch routines.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2394 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-24 17:50:12 +00:00
Jan Friesse
8eeeccbf00 Handle NULL callbacks in cpg, evs and confdb lib
Attached patches handle NULL callbacks in *_initialize
and *_dispatch. Handling is same as in quorum service. Now, when
callback is NULL -> no memcpy -> instance callbacks will have all
items set to NULL and in *_dispatch function is not called.

It changes cfg so now we are using continue instead of exit.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2392 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-20 10:50:11 +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
b130f5e434 Add test program that finds limits of cpg message size.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2389 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-17 18:22:51 +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
Steven Dake
69ced80179 Request user enter characters into terminal if entropy pool is empty for keygen
rather then exiting without creating an auth key.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2387 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-17 17:18:26 +00:00
Jrme Flesch
bfb965554c Fix value returned by lib/coroipcc_dispatch_get() in case recv() fails
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2386 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-17 07:36:17 +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
Jan Friesse
7e745c7444 Swap item in cpg_joinlist
This patch add swab of header->size so big endian architectures
works with LE list and vica versa.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2384 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-10 15:07:40 +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
547bdd85c2 Man page cleanups from Steven Whitehouse for cpg service.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2378 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-04 00:08:11 +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
Fabio M. Di Nitto
b446d4e9de Fix spec file and update macro usage
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2374 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-28 17:11:29 +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
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
Steven Dake
5eae4c135c Optimization of totemsrp and below by removing hdb usage. cpgbench shows
results of 4% to 20% increase in tps and mbs depending on hardware.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2369 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-22 22:10:35 +00:00
Jan Friesse
996850db39 Support for service.d
This patch is very similar to uidgid.d patch, but support for loading
services (so read service section).


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2368 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-22 08:25:45 +00:00
Steven Dake
5225b3809c Initial infrastructure changes to support iba. Split totemnet into
totemiba and totemudp and have totemnet call the appropriate transport
calls.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2367 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-21 18:17:15 +00:00
Steven Dake
279e297842 Darwin is missing the sched_setscheduler system call.
Patch detects it and resolves the build failure.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2366 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-21 01:31:39 +00:00
Jan Friesse
c597079a3e Cpg synchronization patch for conf change messages
The root of the theoretical problem is that cpg_join or cpg_leave
messages are being sent via the C apis between synchronization.  With
the current cpg, synchronization happens in confchg_fn, and then later
in cpg_sync_process.  cpg_sync_process is called much later after
confchg_fn and introduces a small probability of a window of time for
queued in totem (but not yet ordered by totem) for those cpg_join and
cpg_leave operations to interact with the synchronization process which
should happen in one atomic operation but currently is two distinct
operations.

This patch deletes confchg_fn and make sends joinlist/downlist
in cpg_sync_process.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2365 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-20 14:57:06 +00:00
Jan Friesse
33c0b60b58 Allow only one connection per (node, pid, grp)
This patch allows only one connection per (node, pid, grp_name) tuple.
This means, you cannot make more connection from one process to same
group_name. This is (I hope) how cpg should behave. In case, you will
try to do that, CPG_ERR_EXISTS error is returned.

Of course, there is no problem with creating:
- more connection with same (pid, grp) if nodeid is different
- more connection with same (node, grp) if pid is different (for example
  after fork, or two distinct processes)
- more connection with same (node, pid) if grp is different (connect
  one process to more cpgs).


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2364 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-20 14:53:18 +00:00