Commit Graph

107 Commits

Author SHA1 Message Date
Jan Friesse
16007acbef Use nodeid provided in nodelist
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-20 11:08:35 +01:00
Jan Friesse
de70c0007c Support udpu members in nodelist
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-20 11:08:35 +01:00
Jan Friesse
c8a62d8b3c Add local_node_pos icmap key
Key contains local node position in nodelist

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-20 11:08:35 +01:00
Jan Friesse
2acf8920a3 Set default multicast port if not specified
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-19 15:02:24 +01:00
Jan Friesse
eef9028465 Store auto generated mcast addr and port to icmap
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-18 09:12:26 +01:00
Jan Friesse
07e58e111a Add cluster_name option
Option is used for automatic generating of multicast address. If both
cluster_name and mcastaddr options are specified, mcastaddr takes
precedence.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-18 08:43:37 +01:00
Steven Dake
7e1c9771f2 unshare exec/icmap.so
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-12 07:29:41 -07:00
Steven Dake
8ad583a54c Move logsys.c into corosync binary instead of a shared object
Our preferred shared logging system is exported via the libqb library.  As
a result, the corosync project no longer needs to export logsys.so and the
code can be directly included in the binary.  The header file can also be
removed.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2012-01-06 18:19:59 -07:00
Angus Salkeld
7ef81f1235 Fix some iterator based mem leaks
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-06 12:25:08 +11:00
Jan Friesse
8a45e2b152 Move corosync core to use icmap
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-15 09:19:17 +01:00
Angus Salkeld
f5a31e55a2 Add calls to missing object_find_destroy() to fix mem leaks
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-11-11 08:12:13 +11:00
Jan Friesse
f6c2a8dab7 totemconfig: change minimum RRP threshold
RRP threshold can be lower value then 5.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2011-09-08 09:52:16 +02:00
Jan Friesse
752239eaa1 rrp: Higher threshold in passive mode for mcast
There were too much false positives with passive mode rrp when high
number of messages were received.

Patch adds new configurable variable rrp_problem_count_mcast_threshold
which is by default 10 times rrp_problem_count_threshold and this is
used as threshold for multicast packets in passive mode. Variable is
unused in active mode.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed by: Steven Dake <sdake@redhat.com>
2011-09-01 11:21:09 +02:00
Angus Salkeld
37e17e7a94 libqb: logging & trace
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-08-09 10:37:16 +10:00
Angus Salkeld
f717bc60e1 libqb: make timer api a wrapper around qb_loop timers.
- change timeout value to nano seconds
- fix timer handles (don't alloc on stack)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-08-09 10:37:14 +10:00
Jan Friesse
a48c8e517d totemconfig: Change default FAIL_TO_RECV_CONST
Previous default (50) was too low for most modern switch hardware. This
may trigger abort because the aru doesn't increase for 50 token
rotations combined with a defect in how failed to recv conditions are
handled.  By increasing this tunable, the condition should no longer
trigger the errant code.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-07-18 11:46:21 +02:00
Jiaju Zhang
5dc33c2824 RRP: redundant ring automatic recovery
This patch automatically recovers redundant ring failures.

Please note that this patch introduced rrp_autorecovery_check_timeout
in totem config hence breaks internal ABI. The internal ABI users
of totem.h need to rebuild their binaries.

Signed-off-by: Jiaju Zhang <jjzhang@suse.de>
Signed-off-by: Steven Dake <sdake@redhat.com>
Tested-by: Jan Friesse <jfriesse@redhat.com>
Tested-by: Florian Haas <florian.haas@linbit.com>
Tested-by: Jiaju Zhang <jjzhang@suse.de>
2011-07-05 09:13:48 -07:00
Jerome Flesch
00434a4f10 Fix usage of strerror_r()/perror()
Signed-off-by: Jerome Flesch <jerome.flesch@netasq.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-28 09:56:58 +02:00
Jan Friesse
6b9297131c totemconfig: discard check of objdb_get_string ret
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-06-03 10:58:15 +02:00
Jerome Flesch
fe51e70367 Corosync: Fix build when done with --enable-fatal-warnings
Signed-off-by: Jerome Flesch <jerome.flesch@netasq.com>
Reviewed-by: Jan Friesse<jfriesse@redhat.com>
2011-05-27 13:29:12 +02:00
Angus Salkeld
0ad2494ae7 Fix some "set but not used" warnings [-Wunused-but-set-variable]
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-03-16 07:13:42 +11:00
Angus Salkeld
c9dee9eaa7 Remove the ttl option from udpu and rely on the kernel ttl setting.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2011-03-15 19:35:23 +11:00
Angus Salkeld
86ada30aa4 Fix the ttl defaults and range
1) both IPv4 and IPv6 mcast should default to ttl=1
2) the range should be 0..255
   0 is valid meaning localhost only (cluster of one)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2011-03-15 19:34:46 +11:00
Steven Dake
6646a864b4 Handle delayed multicast packets that occur with switches
Some switches delay multicast packets vs the unicast token.  This patch works
around that problem by providing a new tuneable called miss_count_const.  This
tuneable works by counting the number of times a message is found missing
and once reaching the const value, marks it as missing in the retransmit list.

This improves performance and doesn't display warning messages about missed
multicast messages when operating in these switching environments.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
2011-01-11 10:34:46 -07:00
Angus Salkeld
2c46de5ac1 Add totem/interface/ttl config option.
This adds a per-interface config option to
adjust the TTL.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2010-11-24 14:35:56 +11:00
Steven Dake
bb05aed93f Add the UDPU transport
The UDPU transport is useful for those deployments which can't use multicast.
UDPU works by using UDP unicast, which is fully supported by every switch
manufacturer by default and doesn't rely on a functional IGMP implementation.

An example of the UDPU transport is contained in the corosync.conf.example.udpu
file which shows a 16 node cluster.  This file should be copied to each node
in the cluster and IP addresses changed as appropriate.

Amended to remove dead udpu REUSEADDR socket option.

Signed-off-by: Steven Dake <sdake@redhat.com>
2010-11-18 14:21:30 -07:00
Angus Salkeld
10be299e7b Check for a properly configured multicast address.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3057 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-09-27 22:41:26 +00:00
Steven Dake
8fa6f4f58e Remove consensus check for two node cluster cases which can have smaller
consensus values.  Document in man page the behavior of consensus.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3005 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-07-27 19:00:37 +00:00
Angus Salkeld
0c790c067a cov 10388: fix check for no mcast address
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2850 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-18 00:46:35 +00:00
Angus Salkeld
5eba844916 cov 10401: error_string never set
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2834 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-16 21:28:13 +00:00
Christine Caulfield
576614109e Fix a couple of small bugs that happen when the configuration is reloaded.
1. the reload callback was not sent to the library,
2. totem exponentially added new callbacks because the old ones were not
   removed properly.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2684 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-16 09:53:18 +00:00
Angus Salkeld
20f3331d0e convert strerror() into strerror_r()
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2665 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:28:36 +00:00
Angus Salkeld
ec6e57dd42 Allow empty (default) consensus timeout.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2638 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-12-08 07:48:53 +00:00
Steven Dake
b3e19b2905 Force consensus timer to be at minimum 1.2 * token to prevent one group of
nodes from executing a token timeout in the COMMIT state while another node
executes a consensus timeout, showing to applications as a temporary network
partition.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2567 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-12-06 01:35:05 +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
Jim Meyering
74a2fa1194 maint: remove trailing blanks
By running this command from a git-cloned directory:
git grep -z -l -E '[[:blank:]]+$' | xargs -0 perl -pi -e 's/[ \t]+$//'

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2266 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 11:34:50 +00:00
Fabio M. Di Nitto
2135d91c27 Fix handling of sysconfdir
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2265 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 07:02:55 +00:00
Jan Friesse
c54e74e3f6 Make /etc/corosync/corosync.conf default configuration file
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2235 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-12 10:22:32 +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
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
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
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
Fabio M. Di Nitto
c3c75acfd2 Add logsys v3
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2091 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-20 04:28:33 +00:00
Jim Meyering
62e71c31d6 coroapi.h, confdb.h, objdb.h: big s/int/size_t/ change
* exec/mainconfig.c (objdb_get_string, objdb_get_int):
* exec/totemconfig.c (objdb_get_string, objdb_get_int)
(totem_config_keyread, totem_key_change_notify):
* include/corosync/confdb.h (confdb_callbacks_t):
* include/corosync/engine/coroapi.h (group_len, object_len)
(key_len, validate_callback, object_key_change_notify_fn_t)
(object_create_notify_fn_t, object_destroy_notify_fn_t)
(object_notify_callback_fn_t, object_reload_notify_fn_t)
(object_create, object_key_create, object_find_create)
(object_key_get, object_key_replace, object_key_delete)
(object_iter, object_key_iter, object_name_get)
(object_key_iter_from, object_key_increment)
(object_key_decrement):
* include/corosync/engine/objdb.h (object_key_change_notify_fn_t)
(object_create_notify_fn_t, object_destroy_notify_fn_t)
(object_len, key_len, validate_callback, object_create)
(object_key_create, object_find_create, object_key_get)
(object_key_replace, object_key_delete, object_iter)
(object_key_iter, object_name_get, object_key_iter_from)
(object_key_increment, object_key_decrement):
* lib/confdb.c (confdb_object_create, confdb_key_create)
(confdb_key_delete, confdb_key_get, confdb_key_increment)
(confdb_key_decrement, confdb_key_replace, confdb_object_find)
(confdb_object_iter, confdb_key_iter):
* lib/sa-confdb.c (confdb_sa_object_create, confdb_sa_key_create)
(confdb_sa_key_delete, confdb_sa_key_get)
(confdb_sa_key_increment, confdb_sa_key_decrement)
(confdb_sa_key_replace, confdb_sa_object_find)
(confdb_sa_object_iter, confdb_sa_key_iter):
* lib/sa-confdb.h:
* services/confdb.c (message_handler_req_lib_confdb_key_replace):
* services/votequorum.c (objdb_get_string, objdb_get_int)
(quorum_key_change_notify, votequorum_objdb_reload_notify):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2040 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:16 +00:00
Jim Meyering
66c168efee totemconfig.c: don't hard-code "128"...
* exec/totemconfig.c (read_keyfile): Don't hard-code "128".
Use sizeof(...) instead.
Avoid duplicate "close(fd)" calls.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2039 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:07 +00:00
Jim Meyering
4995054ca2 totemconfig.c: don't let a key of length > 128 clobber memory
* exec/totemconfig.c (totem_config_keyread): Reject a key with length
greater than that of our private_key buffer.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2038 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:28:56 +00:00
Steven Dake
870046d065 Patch to use snprintf where appropriate to avoid buffer overrun.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1990 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-02 18:49:24 +00:00
Jim Meyering
8bcbde3c08 totem*: add "const" to avoid 3 more warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1937 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:12:31 +00:00
Jim Meyering
3ec95b158b totem*: add "const" to avoid 1 more warning
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1936 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:12:19 +00:00
Jim Meyering
f7152d349a totem*: add "const" to avoid 1 more warning
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1935 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:12:11 +00:00