Commit Graph

94 Commits

Author SHA1 Message Date
Christine Caulfield
33fa5dcb85 config: Fail to start if ping timers are invalid
This required adding a lot of return values to two previously
'void' functions. I did two rather than just the one that was
needed because it seemed to make sense to do them both together.

Although these functions now return errors, they are probably
still ignored higher up. this really needs a comprehensive audit.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2023-10-05 15:53:55 +02:00
Christine Caulfield
9e7f62d27d cfg: New API to get extended node/link infomation
Current we horribly over-use totempg_ifaces_get() to
retrieve information about knet interfaces. This is an attempt to
improve on that.

All transports are supported (so not only Knet but also UDP(U)).

This patch builds best against the "onwire-upgrade" branch of knet
as that's what sparked my interest in getting more information out.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2020-11-26 16:15:50 +01:00
Christine Caulfield
5f71445be0 config: Allow reconfiguration of crypto options
Needs new knet crypto API.

If it's not available, then fall back to the old
API and forbid changing crypto while running.

To avoid us being dependant on the leader node, each
node sends its own crypto_reconfig_phase messages so
we can guarantee that the reconfiguration always completes
on each node.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2020-07-09 16:54:16 +02:00
Jan Friesse
69857efb5b totem: Display IP of sender
To make finding victim of incompatible messages easier, IP of sender is
logged. Propagating IP in layers makes patch slightly larger.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2018-03-16 13:58:15 +01:00
Christine Caulfield
386d710ed1 cfg: Fix cfg_get_node_addrs so that DLM works
Also update copyright dates

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2018-03-01 14:19:45 +01:00
Christine Caulfield
fc8580bdbf totem: Use nodeid ONLY in srp_addr
This shrinks the srp_addr (and consequently every packet sent by
corosync) so that instead of containing loads of IP addresses to
identify a node, it just sends the nodeid.

This then allows us to make ring0 optional and replaceable when running
knet.

It also means that we need some other way of identifying the local
node in corosync.conf, so the nodelist.node.name entry is now mandatory
and is mapped to the local host using the same algorithm as used in
cman.

This code needs LOTS of testing as it touches a huge amount of totemsrp
and totemconfig.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2018-03-01 14:18:51 +01:00
Jan Friesse
589ed92505 build: Remove rdma/ibverbs
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2018-01-25 16:08:07 +01:00
Christine Caulfield
d9dfd41e4e stats: Add cmap key to clear the various stats.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-10-31 17:39:14 +01:00
Christine Caulfield
16f616b65d knet: Add support for knet compression
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-10-23 17:30:25 +02:00
Christine Caulfield
294a629fb5 config: Allow dynamic link configuration
Now we are using knet, it's possible to dynamically add, remove and
reconfigure links on the fly.

Also print 'n' for non-existant knet links. This will show up
only on loopback links >0. But it looks better than 'status ='

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-09-21 17:16:21 +02:00
Christine Caulfield
268cde6ee4 totem: Add Kronosnet transport.
This is a big update that removes RRP & MRP from the codebase
and makes knet the default transport for corosync. UDP & UDPU
are still (currently) supported but are deprecated. Also crypto
and mutiple interfaces are only supported over knet.

To compile this codebase you will need to install libknet from
https://github.com/fabbione/kronosnet

The corosync.conf(5) man page has been updated with info on the new
options. Older config files should still work but many options
have changed because of the knet implementation so configs should
be checked carefully. In particular any cluster using using RRP
over UDP or UDPU will not start as RRP is no longer present. If you
need multiple interface support then you should be using the knet transport.

Knet brings many benefits to the corosync codebase, it provides support
for more interfaces than RRP (up to 8), will be more reliable in the event
of network outages and allows dynamic reconfiguration of interfaces.
It also fixes the ifup/ifdown and 127.0.0.1 binding problems that have
plagued corosync/openais from day 1

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-11 10:09:42 +01:00
Jan Friesse
71f1b99649 totemudpu: Implement member_set_active
Member active is used for sending "multicast" messages only to members
of ring. This reduces network load if some nodes are intentionally down.
Only regular multicast message load is reduced (messages sent by
totemudpu_mcast_noflush_send), because special messages (like hold
cancel, join message, ...) still have to be send to all members to
ensure correct behavior.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2014-08-26 15:36:05 +02:00
Jan Friesse
4c717942cf totemnet: Add totemnet_member_set_active
totemnet_member_set_active together with transport specific
member_set_active makes possible for totemnet (and more interestingly
transport) to be informed about membership changes.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2014-08-26 15:35:59 +02:00
Jan Friesse
b7635ab9f7 Return back "Totem is unable to form..." message
This patch returns back SUBJ functionality. It rely on fact, that
sendmsg will return error, and if such error is returned for long time,
it's probably because of firewall.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-10-08 16:53:35 +02:00
Jan Friesse
3b7c2f0588 Update crypto_set API
Also few leftovers from cfg is removed and version of totempg is
increased to 5 to reflect all changes we made

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-03-15 17:33:53 +01:00
Steven Dake
2ad0cdc832 Update copyright header dates in exec directory
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-13 17:05:04 -07:00
Angus Salkeld
3131601ce2 Remove all unneccessary "\n" from log messages
These look ugly, are inconsistently done and just have
to be removed later in libqb before calling syslog.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-23 13:08:23 +11: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
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
fce8a3c3b6 libqb: convert coropoll calls to qb_loop calls.
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
ddb5214c2c Revert "totemsrp: Remove recv_flush code"
This reverts commit 1a7b7a39f4.

Reversion is needed to remove overflow of receive buffers and dropping
messages.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2011-07-26 10:05:55 +02:00
Steven Dake
1a7b7a39f4 totemsrp: Remove recv_flush code
The recv_flush code is no longer necessary because of the miss_count_count
addition.  It can in some cases lead to register corruption because of
interactions with -fstack-protector, the recursive nature of how this code
works, and interactions with the optimizer in some versions of gcc.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2011-03-24 09:21:27 -07:00
Zane Bitter
dddaeef21c Allocate packet buffers in the transport drivers
This change paves the way for eliminating a copy within the Infiniband
driver in the future by transferring responsibility for allocating and
freeing message buffers to the transport driver layer.

Tested under valgrind on a single-node cluster.

Signed-off-by: Zane Bitter <zane.bitter@gmail.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-03-11 20:38:28 -07: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
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
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
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
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
23aea08ae4 Slay the debug messages coming out at notice level in totem.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2313 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-28 05:12:27 +00:00
Steven Dake
e448603f2f Add ability to detect process pause and not implode the membership algorithm
when this occurs.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2304 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-26 21:39:44 +00:00
Steven Dake
cd564ca15a Remove warning by casting properly in totemnet.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2283 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-22 18:50:29 +00:00
Steven Dake
b8e3951ca1 Add (void *) casts for iovector assignments to remove compile warnings.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2270 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 20:43:12 +00:00
Fabio M. Di Nitto
6d5ce092a1 logsys: port to new packed rec_ident version
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2250 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-18 05:32:56 +00:00
Fabio M. Di Nitto
7595cd31e7 logsys: allow to use header files for #define's
most of the values in logsys.h are very useful for non logsys library
API users.

Allow to import them without sucking the whole lib.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2248 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-18 05:17:43 +00:00
Fabio M. Di Nitto
5597a2381f logsys: merge tags into rec_ident
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2246 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-18 05:15:10 +00:00
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
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
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
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
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
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
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
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
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
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
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
Steven Dake
1beb0c1fbd Remove saHandleXXX and friends and use hdb instead.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2125 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 17:43:54 +00:00