Commit Graph

1439 Commits

Author SHA1 Message Date
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
Steven Dake
0db9db340b Make width of service 6 bytes instead of 5.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1688 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-06 00:17:19 +00:00
Steven Dake
418739f8f0 Null terminate string which resulted in failure of confdb during logging.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1687 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-06 00:17:01 +00:00
Angus Salkeld
5edadb2df9 Make lib/ clean up after itself properly.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1686 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-04 01:35:15 +00:00
Angus Salkeld
fb36030f80 fix build error, can't complie if openais not installed.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1685 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-01 08:22:51 +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
Angus Salkeld
3bc868eb54 Fix a memory violation in objdb (caught by valgrind)
If the new length is larger then memory will be overwritten.

I could make this ">=" but we can save memory if the new size is smaller by using "!=".



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1680 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-30 19:32:23 +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
Christine Caulfield
44eaef35e0 Currently if a reload operation fails, any subsystems listening for
notifications will get a RELOAD_NOTIFY_START callback but not a
RELOAD_NOTIFY_END callback.

This patch adds a RELOAD_NOTIFY_FAILED callback so that interested
parties will know when the reload has finished and that it failed.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1678 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-27 08:25:53 +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
Angus Salkeld
cea080265f Remove unused global debug option from the man page.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1676 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-20 22:05:51 +00:00
Steven Dake
655d6b2f46 Remove unneeded totem_timeout_types global define.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1675 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-20 21:52:25 +00:00
Christine Caulfield
5bb7ca5da5 This is an initial pass at a top-level quorum system. As it stands, this
module doesn't provide quorum itself, merely a framework for setting and
querying it. I envisage YKD plugging into this rather than straight into
sync() eventually.

I've plugged this into the sync() routines rather than replacing them so
that quorum is itself a VSF, rather than a replacement - I'm not sure if
that is best or not. Opinions are welcome.

I've added an extra enum member to the service_handler so that we can
send IPC messages when the cluster isn't quorate. This will default to
NO (as now) but allows us to query and set quorum when we don't have it
.. a useful feature !



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1674 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-13 14:27:41 +00:00
Christine Caulfield
f1764d1f56 Add locking around objdb calls so that reloads and writes are atomic.
Also add a notification callback for reload. Both the start and the stop
are notified so that the user can decide what to do with the flurry of 
updates that occur.

Note than the reload callback notification MUST be registered against
OBJECT_PARENT_HANDLE. Registering it lower down the hierarchy makes no sense.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1673 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-06 12:14:40 +00:00
Christine Caulfield
d2795808da Fix some compile warnings.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1672 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-06 07:46:04 +00:00
Steven Dake
3837c36d98 Fix CFLAGS and LDFLAGS overrides to work for DEBUG and RELEASE modes.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1671 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-05 13:23:22 +00:00
Steven Dake
25b9eabb2a Fix makefile error in test directory.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1669 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-25 05:21:27 +00:00
Steven Dake
e4f43c8327 Add evs verify tool and allow Makefile to build in test directory properly.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1668 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-23 17:32:51 +00:00
Angus Salkeld
f9609f3217 Propagate the flow control state between AIS exec and library
This patch causes the flow control state in the library to be set
properly when the flow control is turned off (disabled).  Then it can be
read properly by the flow control apis.
This also fixes the case where the application is no longer sending
messages and it has already dispatched all its received messages
before flow control is disabled.

Also, CPG response messages with a TRY_AGAIN error did NOT contain
a valid flow control state value. This meant the library could get
stuck with flow control enabled (flow control was never enabled
for the EXEC, so no disable event occurred).
This case was hit when a new node was joining - sync_in_process()
resulted in a TRY_AGAIN for error cpg_mcast_joined).

Also, in message_handler_req_exec_cpg_mcast() the state passed
back to the library defaulted to disabled for messages received
from another node (even if flow control was still enabled)
- this meant if multiple nodes were sending CPG messages,
  then the library flow control state flip-flopped between
  enabled and disabled.

Author: Steven Dake <sdake@redhat.com> &
        Tim Beale <tim.beale@alliedtelesis.co.nz>




git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1667 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-17 19:15:00 +00:00
Angus Salkeld
531bd3adec Add support for AMF (sync_request)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1666 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-17 19:04:19 +00:00
Angus Salkeld
9655fa2fea If syslog() blocked, node-leave events were incorrectly reported
In some cases, the syslog() call may block. If this happened, the AIS worker
thread would block waiting on the syslog() call. However, the worker thread
is still holding a logsys mutex, which is needed to enqueue any more log
messages from the other AIS threads. So the main AIS thread blocks waiting
on the logsys mutex. This can then cause aisexec on other nodes to detect
the node as leaving the cluster.

Author: Tim Beale <tim.beale@alliedtelesis.co.nz>


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1665 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-17 18:22:58 +00:00
Fabien Thomas
781946258a use getifaddrs to enumerate interface on FreeBSD and Darwin (patch from Mathieu Virbel)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1664 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-16 15:35:09 +00:00
Christine Caulfield
a7885395d2 Reinstate key_iter_reset that got removed by mistake in 1660
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1663 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-03 10:01:31 +00:00
Christine Caulfield
1d2d771f99 This patch adds key_increment and key_decrement calls to the objdb and
confdb subsystems.

This is useful to provide atomic counters (ag handle numbers) for
long-running (though not persistent) connections. It's not currently
possible via confdb to atomically get a new number from objdb due to the
lack of locking. Doing it via increment operations in the IPC thread
provides enough atomicity to make it useful. Fabio has already
identified a use for these calls.

It could also provide some form of basic co-operative locking mechanism
for IPC-using processes (not direct objdb calls).



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1662 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-03 07:58:08 +00:00
Christine Caulfield
c60fc43bcb Fix the names of confdb_object_find_destroy and confdb_object_iter_destroy.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1661 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-27 13:30:52 +00:00
Christine Caulfield
2bab5b36cc Remove the disliked *_from calls from the objdb and recast
the confdb library to use the new find_create/find_next/find_destroy API
calls instead.

I've kept the libcondfb API the same as before with the single change of
adding a confdb_object_find_destroy to tidy up the find handle after
use. If you don't call this then libcondfb will do it for you when
confdb_finalize is called.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1660 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-26 07:34:22 +00:00
Angus Salkeld
b56ce92fab Zero out unused totemsrp my_proc_list entries
When making my_proc_list smaller, ensure that the
now non-used entries are zero-ed out. There are some suspect
assert's that assume that there is always 2 entries in the list.
These fail when my_proc_list is reduced to 1 entry (and the
valid [0] entry is the same as the 'unused' [1] entry).

Author: Mark Wutzke <mark.wutzke@alliedtelesis.co.nz>



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1659 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-20 01:07:29 +00:00
Angus Salkeld
5828bee144 aisexec crash on exit
Cause:
As part of its exit procedure, ais cancels its worker thread then manually
processes any outstanding items that were still in the worker thread's queue.
The worker thread has a low priority so normally it does not execute any
further before ais finishes exiting, but if the main thread's exiting is
delayed for any reason, there is a chance the worker thread could execute and
try to process items which have already been processed and freed by the main
thread - often leading to the worker thread seeing NULL data and ultimately
causing a segmentation fault.

Fix:
Modified worker_thread_group_exit() so it does a pthread_join() after the
pthread_cancel() call, so that the worker thread always shuts down cleanly
before the main thread does its cleanup.

Author: Author: Mark McKinstry <mark.mckinstry@alliedtelesis.co.nz>




git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1658 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-20 01:02:43 +00:00
Angus Salkeld
280ef18d61 Fix to display strings safely in debug messages.
Display strings safely, even if they are invalid, e.g. data in a received
message was corrupted.

Author: Tim Beale <tim.beale@alliedtelesis.co.nz>



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1657 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-20 01:00:44 +00:00
Angus Salkeld
31aa88aefb Provide a way to configure (at compile time) message and queue sizes.
This patch makes it possible to override the following #defines:
MESSAGE_SIZE_MAX
MESSAGE_QUEUE_MAX
SIZEQUEUE
FLOW_CONTROL_ENTRIES_ENABLE

If MESSAGE_SIZE_MAX is defined as 1024*64 (64K) and
MESSAGE_QUEUE_MAX defined as 512 you can change corosync's
memory footprint from ~48M to ~8M

So if you define MESSAGE_QUEUE_MAX, the queue size will
not be based on the message size any more.

To use this define the defines on the command line:
make CFLAGS="-DMESSAGE_SIZE_MAX=1024*64 -DMESSAGE_QUEUE_MAX=512"



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1656 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-20 00:57:40 +00:00
Angus Salkeld
94a523702f Fix an assert caused by faulty sort-queue management.
sq.h
  - sq_items_release(): When clearing the items_inuse array, ensure that
    all of the memory is cleared. items_inuse is a uint array, not a
    byte array.

Author: Mark Wutzke <markw@alliedtelesis.co.nz>



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1655 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-20 00:53:38 +00:00
Steven Dake
4042395616 Repair typo which caused init script not to start corosync daemon.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1649 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 07:10:01 +00:00
Steven Dake
ec4a06ec3c Make rpmlint pass without warnings.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1648 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 07:09:16 +00:00
Steven Dake
9ffa85602a Set the override for LCRSODIR properly.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1647 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 06:18:33 +00:00
Steven Dake
01b8bc6ab2 Finish the renaming of openais to corosync in the tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1646 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 06:15:26 +00:00
Steven Dake
e58b38dc3f Fix build breakage.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1645 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 19:07:03 +00:00
Steven Dake
a6dc6e300c New and improved loc command.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1644 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 18:35:15 +00:00
Steven Dake
6d1068b765 New LOC command.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1643 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 18:25:22 +00:00
Steven Dake
f74946472c turn on executeable bit for loc.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1642 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 18:16:40 +00:00
Steven Dake
58b94cf976 Install saAis.h header file.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1641 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 18:13:49 +00:00
Steven Dake
817b07cd79 Update svn commit scripts so they work properly and have proper permissions.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1640 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 17:50:44 +00:00
Steven Dake
75c31f7e7f Move QUICKSTART to proper directory.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1639 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 17:30:29 +00:00
Steven Dake
439df6fc5f Few man page cleanups and removal of amf.conf.5.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1638 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 17:12:01 +00:00
Steven Dake
dd3991c0bb Proper rename of openais usage to corosync throughout tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1637 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:54:46 +00:00
Steven Dake
e1f531380a Revert patch 1633 which breaks build.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1636 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:44:26 +00:00
Steven Dake
deca66e25f Move openais* to corosync* in man pages.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1635 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:08:15 +00:00
Steven Dake
db7dff0539 Build corosync-keygen.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1634 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:05:32 +00:00