Commit Graph

3734 Commits

Author SHA1 Message Date
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
Ferenc Wágner
aab840256d init: corosync and cman aren't system facilities
Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-09-02 11:16:00 +02:00
Ferenc Wágner
561b885c3e conf: be explicit about the mcast src/dst ports
Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-09-02 10:23:13 +02:00
Jan Friesse
b0c850f308 Qnetd LMS: Fix two partition use case
Solves situation when in 2 node cluster tie-breaker node dies. Because
code contains two bugs, other node got NACK instead of ACK.

- Algo timer is not stack, so calling abort and schedule in timer
callback without setting reschedule is noop.
- It's needed to check not only what current node thinks about
membership, but also what other nodes thinks. If views diverge -> wait.

Thanks Christine Caulfield <ccaulfie@redhat.com> for fixing the English
in the comments somewhat.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2016-08-30 16:58:51 +02:00
Christine Caulfield
0da1b74462 man: mention qdevice incompatibilites in votequorum.5
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-08-12 14:25:39 +01:00
Jan Friesse
49a9f722bb Man: Fix corosync-qdevice-net-certutil link
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-08-09 17:06:31 +02:00
Jan Friesse
87c363b908 Spec: Qdevice require same version of corosync
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-08-04 17:34:10 +02:00
Jan Friesse
f837f95dfe Config: Flag config uidgid entries
Uidgid entries parsed from configuration files now has prefix
(uidgid.config.) so they are distinguishable from dynamically added
entries. Entries added from config file are pruned on reload if no
longer exists in config file (dynamic one stays unaffected). Also whole
uidgid.config. prefix is made read only.

This make PCMK work again after configuration reload is called.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2016-08-04 16:13:48 +02:00
Bin Liu
3e995cf29c cts: Make it run with pacemaker-1.13+
There are changes in pacemaker-cts which corosync-testagents denpends
on. With these changes, corosync-testagents can not run. This patch
fixes the issues, and makes corosync-testagents run.

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-08-04 14:08:08 +02:00
HideoYamauchi
71c9035c27 Low: totemsrp: Addition of the log.
Signed-off-by: HideoYamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-08-01 10:11:45 +02:00
Christine Caulfield
a275d88f71 qdevice: some more small man page fixes
including mentioning corosync-qdevice(5) on the
votequorum(5) and corosync.conf(5) pages.

Thanks to Jan Pokorný for reporting these.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-07-12 09:26:08 +01:00
Christine Caulfield
b6c71aa11b qdevice: Fix 'tie_breaker' in man page
the tie_breaker option was incorrectly listed as
tie-breaker on the man page.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-07-07 15:17:17 +01:00
Jan Friesse
a3dba5dea8 Qdevices: Include required files in tarball
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-30 17:18:15 +02:00
Jan Friesse
8384b51e06 Qdevice: Include man pages in tarball
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-30 17:05:38 +02:00
Jan Friesse
8f9c30c41c tmpfiles.d: Install only when required
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-30 15:58:58 +02:00
Christine Caulfield
1aa6cd52eb Qdevice: Englishify man pages
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-06-30 13:42:41 +01:00
Jan Friesse
05f5e6b54c Qdevice: Add corosync-qdevice man page
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-29 18:35:37 +02:00
Jan Friesse
d5cf8dd631 Qdevice: Add more man pages
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-29 18:35:37 +02:00
Jan Friesse
d7d7347bb1 Qdevice: Fallback mkdir of /var/run sundirectory
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
c9584c965f Qdevice: Enhance delay before reconnect
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
32123f6bb2 Qdevice: Handle /var/run on tmpfs
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
78deaec9ed Qdevice: Reconnect on algo or tb differs error
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
69ec55183c qdevice: Add qdevice-tool and qnetd-tool man pages
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
9deb4a6ee7 Qdevice: Make ffsplit algorithm default
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
b415634f95 Qdevice: Add sysconfig example
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
1925074909 Fix few bugs found by coverity
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
792b4ed061 Qdevice: Fix errors found by coverity
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
7d3979fdba Qnetd: Execute qnetd as non root user
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
b07eae70bd Qdevice: Adjust path to final location
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
13a4a823f0 Qdevice: Add qnetd configure option
Qnetd is no longer build as a part of --qneable-qdevices. Instead
--enable-qnetd is used.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Christine Caulfield
0665aca9e1 quorum: revert patch that adds qdevice (node 0) to quorum callback
Revert patch 9f54f0a1fad7dad42c55562a50dfb9d773e6a660 as it causes
more troubles than it solves. Code that uses the quorum nodelist
to get a list of actual nodes in the cluster for communication
break using this as well as the display from corosync-quorumtool

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
3cb84acd2c Qdevice-net: Make duplicate node id err non-fatal
It can happen because qnetd not yet handled disconnect of client.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
3a2d48b774 Qnetd: ffsplit: Add no active clients heuristic
On 50:50 split, ffsplit algorithm now prefers partition with
higher number of active clients. Tie-breaker is used only if both
partitions have same number of active clients.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
facfb4a772 Qdevice: Allow master_wins
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
e110080925 Qnetd: ffsplit: Enhance ffsplit
50:50 split algorithm now works in following way:
- On client configuration change, membership change or disconnect wait
  till membership is stable (= all client configuration node list are
  equal, and all partitions has equal information).
- Choose best partition >= 50%
  - If no such partition exists, send NACK to all clients
- Send NACK to all clients who should receive NACK
- After all clients who should receive NACK confirm vote reception, send
  ACK to all clients who should get ACK

This ensures that there are never two partitions with ACK and it has
much better behavior than previous version, because if tie-breaker
partition is not connected, other partition gets ACK.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
6f6c80f582 Qdevice: Send ring id in more messages
To prevent receiving vote from old membership ring id is sent to server
during init and replied back to client in every node list,
ask for vote reply and vote info messages.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
86776318a3 Qdevice: Remove unused variable
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
20839095ae Qdevice: Wait for ring id before executing model
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:42 +02:00