Commit Graph

3821 Commits

Author SHA1 Message Date
Christine Caulfield
16770a4153 totem: Fix buffer sizes
knet needs buffers to be KNET_MAX_PACKET_SIZE or messages will
get lost or corrupted.

UDPU packets shouldn't be that big so I introduced UDP_FRAME_SIZE_MAX
for that transport.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-03-02 14:57:39 +00:00
Christine Caulfield
30771a39a8 main: Don't ask libqb to handle segv, it doesn't work
segv should be handled by corosync, libqb is not the
place to be handling emergency signals.

This currently requires the head of libqb git tree to
generate a blackbox & coredump in the event of a segfault,
but it's better than the write() spin that currently happens.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-02-27 15:14:41 +00:00
Jan Friesse
8b6bd86a55 Logsys: Change logsys syslog_priority priority
LibQB adds default "*" syslog filter so we have to set syslog_priority
as low as possible so filters applied later in
_logsys_config_apply_per_file takes effect.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2017-02-24 16:23:50 +01:00
Fabio M. Di Nitto
36ef2af5a7 knet: improve logging messages by adding knet subsystem
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2017-02-24 09:41:35 +01:00
Christine Caulfield
40c246fb44 cpghum: Add abort_on_error option
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-02-17 14:50:27 +00:00
Christine Caulfield
16a865e573 cpghum: Add min rtt and print stats every alarm
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-02-16 15:59:52 +00:00
Christine Caulfield
7170754919 cpghum: Add Round Trip Time (RTT) reporting
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-02-15 14:09:09 +00:00
Fabio M. Di Nitto
19232f6052 knet: Change nodeids to knet_node_id_t for new knet compatibility
after some feedback on github, people prefers to have the option
to support up to 64K node_id's.

libknet added knet_node_id_t to mask the size and type, currently
set to uint16_t.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2017-02-14 06:08:45 +01:00
Christine Caulfield
c0f1d576d6 knet: Fix MTU sizes & allow transport config in corosync.conf
Corosync layers don't need to know the knet MTU size - this way
corosync fragments buffers only when they get larger than the
KNET buffer size (64K) and knet fragments below that based on
the actual MTU and transport considerations.

It is also now possible to configure knet to use UDP or SCTP
transports in corosync.conf. This is currently done per-link
so if you have more than 1 link you need several interface{}
stanzas inside totem{} to make it use other than the default
of UDP. if it's useful I might add the option of a global
default.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-02-13 16:54:30 +00:00
Fabio M. Di Nitto
970549ddfc knet: PMTUd data_mtu already accounts for IP and knet header overheads
provide some more space for data and small (+1% perf boost)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2017-02-11 06:41:38 +01:00
Fabio M. Di Nitto
18fef0ae7f knet: switch from write to sendto()
this provides another 9.6% performance boost on 2 node clusters

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2017-02-11 06:24:12 +01:00
Christine Caulfield
d9df98ceba knet: Change nodeids to 8 bit for new knet compatibility
I've also put an assert in totemknet_member_add() to check
for invalid nodeids. Later on we need to fix the rest of the
corosync code to only use 8bit nodeids (or force people to use
UDPU if they want large nodeids).

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-02-03 09:38:32 +00:00
Adrian Vondendriesch
16ca44ccdc doc: document watchdog_device parameter
Commit 8d8d4a936a introduced the
configuration parameter resources.watchdog_device. This commit
introduces the resources section and watchdog_device parameter in
corosync.conf.5.

Signed-off-by: Adrian Vondendriesch <adrian.vondendriesch@credativ.de>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-01-18 10:39:55 +01:00
Christine Caulfield
2d478505e5 knet: Fix member_remove to shut down existing links first
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-01-16 13:16:15 +00:00
Jan Pokorný
d1d929a7cf Spec: make internal dependencies arch-qualified
To prevent any mismatch of this kind for sure.

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-01-10 09:08:45 +01:00
Jan Pokorný
c91c4825ca Spec: drop unneeded dependency
corosynclib-devel doesn't need to have a dependency on corosync package.

It's expected that libraries are still working properly (e.g. indicating
errors to their users) when there's no corosync process around in that
moment, and from this perspective it doesn't matter whether it is
installed at all for some purposes, especially having linkage with them
in mind.

Note that the inverse dependency, main corosync package on corosynclib,
is already there (not strictly needed, likely just to enforce package
version match -- otherwise RPM's dependency generator will handle this
on its own using SONAMEs -- hence the comments to that effect are also
added), so breaking this symmetry:
- is supposed to be harmless modulo cases that should be fixed to
  express explicit dependency on corosync's runtime anyway
  (but only for runtime, i.e., Requires as opposed to BuildRequires)
- will effectively enable more lightweight get-build-deps-and-build
  process for programs linking with corosynclibs (e.g. pacemaker),
  as corosync package won't need to be installed needlessly

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-01-10 09:05:16 +01:00
Christine Caulfield
029b8ebad6 knet: Reduce default pong count to 2 for faster startup
The default PONG_COUNT of 5 made corosync slow to connect to other
nodes.
This helps.
2017-01-03 13:30:26 +00:00
Christine Caulfield
950cca886e totemknet: Make it compile with kronosnet git master
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-12-22 10:25:11 +00:00
Bin Liu
5cf587554f Qdevice: fix spell errors in qdevice
There are somwe spell errors in qdevice-net-algo-test.c,
qnetd-algo-2nodelms.c, qnetd-algo-test.c qnetd-algo-ffsplit.c

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-12-12 11:32:20 +01:00
Takeshi MIZUTA
4939c75629 Remove redundant header file inclusion
Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-12-05 09:59:08 +01:00
Richard B Winters
c3775f9dad Remove deprecated doxygen flags
Running 'doxygen -u Doxyfile.in' in the source root produces the
following results:

 - SYMBOL_CACHE_SIZE at line 301 has become obsolete. This tag
   has been removed.
 - SHOW_DIRECTORIES at line 507 has become obsolete. This tag
   has been removed.
 - HTML_ALIGN_MEMBERS at line 881 has become obsolete. This tag
   has been removed.
 - USE_INLINE_TREES at line 1067 has become obsolete. This tag
   has been removed.
 - XML_SCHEMA at line 1311 has become obsolete. This tag has been
   removed.
 - XML_DTD at line 1317 has become obsolete. This tag has been
   removed.

Signed-off-by: Richard B Winters <rik@mmogp.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-12-05 09:50:30 +01:00
yuusuke
1d05569fa9 upstart: Add softdog module loading example
Signed-off-by: yuusuke <yusk.iida@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-12-05 09:46:17 +01:00
Bin Liu
819d66ca1c Totempg: remove duplicate memcpy in mcast_msg func
In function mcast_msg of totempg.c, line 923, there is a memcpy call in
"else" branch, and also another memcpy out of the "else" branch, while
the two calls have the same parameters. It is possibleto remove the memcpy
in "else" branch.

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-12-05 09:40:55 +01:00
Takeshi MIZUTA
034553c080 man: Modify man-page according to command usage
Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-12-01 16:32:42 +01:00
Ferenc Wágner
8a940f9a18 init: Add doc URIs to the systemd service files
These are used by systemctl help.

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-11-28 09:58:09 +01:00
Ferenc Wágner
66c6a9b200 Fix typo: Destorying -> Destroying
Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-11-28 09:52:30 +01:00
Takeshi MIZUTA
fef5e117aa man: Fix typos in man page
Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-11-28 09:28:15 +01:00
Takeshi MIZUTA
9c5b39d438 totempg: totempg_groups_join return valid error
totempg_groups_join() is called by sync_init().
sync_init() judge that totempg_groups_join() failed if return code of
totempg_groups_join() is -1.
Therefore, the return code should return in -1 when
totempg_groups_join() fails.

Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-11-23 09:22:21 +01:00
yuusuke
818b2682c5 systemd: Delete unnecessary soft_margin
Signed-off-by: yuusuke <yusk.iida@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-11-21 18:04:53 +01:00
Christine Caulfield
401f483cce knet: Support reload of link parameters
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-11-17 11:41:54 +00:00
Takeshi MIZUTA
f5dcc4a5f2 list: Unify the list processing with qb_list func
Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-11-15 12:19:13 +01:00
Christine Caulfield
7cec6a131d knet: Allow configuration of more params
knet_pmtud_interval &
knet_pong_count

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-11-15 09:32:09 +00:00
Chrissie Caulfield
65219a6300 knet: Don't lose log messages when knet gets busy (#165)
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-11-14 15:01:34 +00:00
Jan Friesse
17a6387f55 libvotequorum: Bump version
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-11-07 17:40:00 +01:00
Jan Friesse
1f90c31ba7 list: Replace for_each by safe version where need
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-27 14:56:52 +02:00
Jan Friesse
7a8732d85a list: Remove list.h
List.h is no longer needed.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-27 14:56:52 +02:00
Michael Jones
b4c06e52f3 list: Replace uses of list.h with qblist.h
Signed-off-by: Michael Jones <jonesmz@jonesmz.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-10-27 14:56:52 +02:00
Fabio M. Di Nitto
e204e871ec [build] Fix build on RHEL7.3 latest
header inclusion have changed

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2016-10-23 08:23:52 +02:00
HideoYamauchi
98333774f2 Change a type of NodeID.
Signed-off-by: HideoYamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-10-17 09:47:45 +02:00
Christine Caulfield
7523a5b40c vqsim: Fix Makefile.am
Make it conditional on BUILD_VQSIM being defined

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-13 14:59:12 +01:00
Christine Caulfield
10075a018d configure: Remove RDMA (again)
How did that creep back in again?

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-13 14:33:07 +01:00
Christine Caulfield
71e885d7f9 vqsim: Add Quorum simulator program
vqsim is a small program that allows node up/down/split/join
operations to be simulated without the use of an actual cluster.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-13 14:21:04 +01:00
Jan Friesse
c7bb68e9ff Build: Fail configure if knet is not installed
Libknet is now requirement.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-13 14:43:13 +02:00
Christine Caulfield
86de6ce1e6 totem: add totemknet.[ch]
it seems git is better at deleting files than adding them

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-13 08:46:34 +01:00
Michael Jones
a24d26c46a cfg: Prevents use of uninitialized buffer
Signed-off-by: Michael Jones <jonesmz@jonesmz.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-10-12 16:19:05 +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
HideoYamauchi
f1ffe31ce5 coropase: Set a poll_period value for wd monitor
Signed-off-by: HideoYamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-10-06 15:48:38 +02:00
Christine Caulfield
c4683be9b0 votequorum: simplify reconfigure message handling
As we now have update_node_expected_votes(), we can use that
when receiving a new EXPECTED_VOTES value from another node
rather than having our own loop.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-09-13 15:55:58 +01:00
Christine Caulfield
bd2e6b5d9d votequorum: Don't update expected_votes display if value is too high
If expected_votes was set via the library but the calculation
decides it's too high, then an error is correctly returned but
the value is still set in the nodes' expected_votes field and
turns up in the corosync-quorumtool display.

This patch separates out the quorum calculation from the updating
of expected_votes per node to prevent this from happening.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-09-13 14:28:56 +01:00
Ferenc Wágner
cf10a754e9 Fix various typos
occured -> occurred
parantheses -> parentheses
configuraton -> configuration
aquire -> acquire
retrive -> retrieve
prefered -> preferred

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-09-12 09:50:11 +02:00