]> git.proxmox.com Git - mirror_corosync.git/log
mirror_corosync.git
7 years agototem: Remove unnecessary NSS headers
Fabio M. Di Nitto [Fri, 22 Sep 2017 08:25:40 +0000 (10:25 +0200)]
totem: Remove unnecessary NSS headers

Also fix corosync.spec.in to depend on libknet.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoconfig: Allow dynamic link configuration
Christine Caulfield [Fri, 15 Sep 2017 12:12:01 +0000 (13:12 +0100)]
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>
7 years agototemudp: Retry if bind fails
Masse Nicolas [Fri, 15 Sep 2017 14:52:15 +0000 (16:52 +0200)]
totemudp: Retry if bind fails

If bind call fails it's retried for BIND_MAX_RETRIES.
If it's still unsuccessful, corosync exists instead
of working incorrectly.

Slightly modified by reviewer.

Signed-off-by: Masse Nicolas <nicolas.masse@stormshield.eu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocorosync.conf.5: watchdog support is conditional
Ferenc Wágner [Wed, 13 Sep 2017 13:29:32 +0000 (15:29 +0200)]
corosync.conf.5: watchdog support is conditional

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agowd: default to not using a watchdog
Ferenc Wágner [Mon, 11 Sep 2017 16:44:56 +0000 (18:44 +0200)]
wd: default to not using a watchdog

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agowd: remove extra capitalization typo
Ferenc Wágner [Mon, 11 Sep 2017 16:26:33 +0000 (18:26 +0200)]
wd: remove extra capitalization typo

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocorosync.conf.5: add warning about slow watchdogs
Ferenc Wágner [Mon, 11 Sep 2017 11:40:05 +0000 (13:40 +0200)]
corosync.conf.5: add warning about slow watchdogs

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agototemknet: fix debug message typo
Jonathan Davies [Thu, 7 Sep 2017 08:21:08 +0000 (10:21 +0200)]
totemknet: fix debug message typo

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocorosync.conf.5: Fix watchdog documentation
Ferenc Wágner [Wed, 6 Sep 2017 12:43:00 +0000 (14:43 +0200)]
corosync.conf.5: Fix watchdog documentation

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agowd: fix typo
Ferenc Wágner [Thu, 8 Jun 2017 09:17:37 +0000 (11:17 +0200)]
wd: fix typo

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoInclude fcntl.h for F_* and O_* defines
Khem Raj [Thu, 31 Aug 2017 00:28:55 +0000 (17:28 -0700)]
Include fcntl.h for F_* and O_* defines

Fixes errors like
utils.c:95:22: error: use of undeclared identifier 'O_WRONLY'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agostats: add knet 'handle' stats
Christine Caulfield [Tue, 22 Aug 2017 08:22:07 +0000 (09:22 +0100)]
stats: add knet 'handle' stats

knet handle stats show compression and crypto statistics. With these
you can see the effectiveness of compression and the overheads of both
crypto and compression.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agomain: use syslog & printf directly for early log messages
Christine Caulfield [Tue, 22 Aug 2017 08:51:09 +0000 (09:51 +0100)]
main: use syslog & printf directly for early log messages

libqb seems funny about logging things before its fully configured.
This corosync commit didn't help either:
8b6bd86a55b8bda9f3a8ff67bdff908263976fa3

So to make sure that messages about the config file not being opened
get delivered to the user/syslog we send them directly.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agototempg: Allow space for incoming overflow
Christine Caulfield [Mon, 14 Aug 2017 13:04:31 +0000 (14:04 +0100)]
totempg: Allow space for incoming overflow

totempg needs to store the current message + any
overflow for the next message which can be up to (nearly) the MTU size.
in knet that's large, but for UDP it's just 1500.

The reason we've never seen it before is because the actual max message
size is 1024 less than 1MB and after all the headers are stripped out the overflow is
usually 1024 bytes or less.
The 1024*1024 size of the assembly buffer is large enough to hold a max message (1047552) +
1024 bytes of a new UDP message. So we never saw any problems.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocpghum: Add options to change flood start/mult/end sizes (#237)
Chrissie Caulfield [Fri, 11 Aug 2017 14:28:02 +0000 (15:28 +0100)]
cpghum: Add options to change flood start/mult/end sizes (#237)

I ran out of sensible short options for cpghum so added some long
ones to cope with them.

Also added is the ability to specify most size values in a sensible format
eg 64M for 64 Megabytes or 48K for 48 Kilobytes.

Strictly those are MiB and KiB of course, but I'm old-fashioned.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agototemknet: Use knet's LOOPBACK transport (#236)
Chrissie Caulfield [Fri, 4 Aug 2017 11:59:16 +0000 (12:59 +0100)]
totemknet: Use knet's LOOPBACK transport (#236)

knet now has a built-in LOOPBACK transport so use that
rather than special-casing it for ourself.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoCFG: Remove ring-reenable code
Christine Caulfield [Thu, 3 Aug 2017 08:58:27 +0000 (09:58 +0100)]
CFG: Remove ring-reenable code

RRP doesn't exist any more so all the ring re-enable code is redundant.

I've removed it from the library and all the code that does anything,
but I've left the hole in the IPC just in case old libraries are
hanging around.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agomain: Add support for libcgroup
Jan Friesse [Fri, 28 Jul 2017 14:32:58 +0000 (16:32 +0200)]
main: Add support for libcgroup

When corosync is started in environment where it ends in cgroup without
properly set rt_runtime_us it's impossible to get RT priority.

Already implemented workaround is to use higher non-RT priority.

This patch implements another solution. It moves corosync into root cpu
cgroup. Root cpu cgroup hopefully has enough RT budget.

Another solution was mentioned on ML
https://lists.freedesktop.org/archives/systemd-devel/2017-July/039353.html
but this means to generate some "random" values.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
(cherry picked from commit c56086c701d08fc17cf6d8ef603caf505a4021b7)

7 years agostats: Add map with on-demand statistics
Christine Caulfield [Mon, 3 Jul 2017 13:54:33 +0000 (14:54 +0100)]
stats: Add map with on-demand statistics

Icmap is factored out so it's possible to add other
maps for cmap. API call to switch maps from application
end is added.

Corosync-cmapctl is enhanced with -m option.

Stats contains all statistics previously found in runtime.connections,
runtime.services and runtime.totem prefixes together with new knet
related. All stats are read only.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoipc: Check for the libraries sending invalid message IDs
Christine Caulfield [Fri, 14 Jul 2017 13:06:49 +0000 (14:06 +0100)]
ipc: Check for the libraries sending invalid message IDs

If the library sent an invalid (ie too high) message ID to
corosync, then it could cause the daemon to crash.

Now we check the message ID before indexing the function array

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agomain: Add option to set priority
Jan Friesse [Fri, 7 Jul 2017 15:49:46 +0000 (17:49 +0200)]
main: Add option to set priority

Option -P takes numeric value with same meaning
as nice or values min / max, meaning maximal / minimal priority (so
minimal / maximal nice value).

Scheduler / priority setting is moved in code so it is now executed
after logsys is configured so errors are logged.

Setting maximal priority is also used as fallback when realtime
scheduling is requested and sched_setscheduler fails.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
(cherry picked from commit a008448efb2b1d45c432867caf08f0bcf2b4b9b0)

7 years agototemknet: Prevent dead-loop in log_flush_messages
Jan Friesse [Mon, 3 Jul 2017 13:40:29 +0000 (15:40 +0200)]
totemknet: Prevent dead-loop in log_flush_messages

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
7 years agocorosync-keygen: Display number of needed bits
Jan Friesse [Mon, 3 Jul 2017 11:16:33 +0000 (13:16 +0200)]
corosync-keygen: Display number of needed bits

Instead of currently read bits, number of already read bits is
displayed to let the user know how long it's needed to "press keys"

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agototemknet: Flush knet log messages
Jan Friesse [Fri, 30 Jun 2017 08:35:57 +0000 (10:35 +0200)]
totemknet: Flush knet log messages

When initialization fails knet logs messages into pipe. Previously they
were never processed. Solution is to add log_flush_messages which takes
care to call log_deliver_fn.

Call of log_flush_messages is also added to totemknet_finalize because
this removes log pipe fd from qb_loop so similar problem can happen.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agocorosync-keygen: Make less-secure default
Jan Friesse [Fri, 23 Jun 2017 12:31:53 +0000 (14:31 +0200)]
corosync-keygen: Make less-secure default

/dev/urandom is good enough for crypto keys and it's not blocking. If
superb randomness is really needed, it's possible to use newly added
option -r.

Also manpage is reworked a bit to use .nf instead of many .br.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agocorosync-keygen: Adapt to knet key sizes
Jan Friesse [Fri, 23 Jun 2017 12:18:08 +0000 (14:18 +0200)]
corosync-keygen: Adapt to knet key sizes

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agototemconfig: Make crypto work again
Jan Friesse [Fri, 23 Jun 2017 09:22:09 +0000 (11:22 +0200)]
totemconfig: Make crypto work again

Knet needs longer key and supports various key lengths. Split
TOTEM_PRIVATE_KEY_LEN into TOTEM_PRIVATE_KEY_LEN_MIN and
TOTEM_PRIVATE_KEY_LEN_MAX (both using KNET_*_KEY_LEN).

Fix incorrect "Could only read..." message.

Make sure key is properly initialized/zeroed.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoknet: Compile with latest knet API
Christine Caulfield [Thu, 29 Jun 2017 09:02:21 +0000 (10:02 +0100)]
knet: Compile with latest knet API

extra parameter added to knet_link_get_status()

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agototem: Propagate totem initialization failure
Jan Friesse [Thu, 15 Jun 2017 09:07:19 +0000 (11:07 +0200)]
totem: Propagate totem initialization failure

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agototemknet: Use new knet_link_set_config() API
Christine Caulfield [Fri, 9 Jun 2017 12:28:46 +0000 (13:28 +0100)]
totemknet: Use new knet_link_set_config() API

TC_PRIO_INTERACTIVE is now a link option in knet, so we have
to provide it at link config time.

This needs the latest knet git to compile as this is an updated API.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agocoroapi: Use size_t for private_data_size
Michael Jones [Thu, 25 May 2017 18:29:19 +0000 (13:29 -0500)]
coroapi: Use size_t for private_data_size

Unsigned int and size_t represent two different concepts.

Same problem was present in ipc_glue.

Signed-off-by: Michael Jones <jonesmz@jonesmz.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agovotequorum: Report errors from votequorum_exec_send_reconfigure
Christine Caulfield [Fri, 26 May 2017 12:55:24 +0000 (13:55 +0100)]
votequorum: Report errors from votequorum_exec_send_reconfigure

If votequorum_exec_send_reconfigure() returns an error (ie the
packet could not be sent) then we should either return it to the
sender (for a library call) or, for an internal call, log it.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocpghum: remove space after delimiter
Christine Caulfield [Thu, 25 May 2017 09:35:45 +0000 (10:35 +0100)]
cpghum: remove space after delimiter

machine-readable stats do not need extra spaces!

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocpghum: Add interim RTT to cpghum
Christine Caulfield [Thu, 25 May 2017 09:18:32 +0000 (10:18 +0100)]
cpghum: Add interim RTT to cpghum

when -f is selected the interim stats show the RTTs for that
size of packet.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoconfigure: Enable C99 language standard
Michael Jones [Mon, 10 Oct 2016 01:51:46 +0000 (20:51 -0500)]
configure: Enable C99 language standard

Also disable some obsolete warnings.

Signed-off-by: Michael Jones <jonesmz@jonesmz.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agomain: Display reason why cluster cannot be formed
Jan Friesse [Thu, 18 May 2017 15:15:14 +0000 (17:15 +0200)]
main: Display reason why cluster cannot be formed

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agonotifyd: Add the community name to an SNMP trap
Hideo Yamauchi [Thu, 18 May 2017 14:55:46 +0000 (23:55 +0900)]
notifyd: Add the community name to an SNMP trap

Signed-off-by: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocpghum: Add machine-readable output
Christine Caulfield [Mon, 15 May 2017 13:19:38 +0000 (14:19 +0100)]
cpghum: Add machine-readable output

and fix a few small counter bugs.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agotest: Fold cpgbench into cpghum (#205)
Chrissie Caulfield [Thu, 11 May 2017 07:51:34 +0000 (08:51 +0100)]
test: Fold cpgbench into cpghum (#205)

* test: Fold cpgbench into cpghum

cpgbench and cpghum share a lot of code & concepts so it makes
sense to merge them into a single test program that can both
benchmark and sanity check CPG.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoknet: Allow space for encapsulated messages
Christine Caulfield [Tue, 9 May 2017 08:05:12 +0000 (09:05 +0100)]
knet: Allow space for encapsulated messages

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoMain: Call mlockall after fork
Andrew Price [Tue, 25 Apr 2017 12:44:33 +0000 (14:44 +0200)]
Main: Call mlockall after fork

Man page of mlockall is clear:
Memory locks are not inherited by a child created via fork(2) and are
automatically removed (unlocked) during an execve(2) or when the
process terminates.

So calling mlockall before corosync_tty_detach is noop when corosync is
executed as a daemon (corosync -f was not affected).

This regression is caused by ed7d054e552b4cb2a0cb502b65f84310ce6da844
(setprio for logsys/qblog was correct, mlockall was not).

Solution is to move corosync_mlockall call on correct place.

Signed-off-by: Andrew Price <anprice@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoFix typos in README.recovery
Michael Schwarz [Fri, 21 Apr 2017 09:26:10 +0000 (11:26 +0200)]
Fix typos in README.recovery

Signed-off-by: Michael Schwarz <michi.schwarz@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocoroparse: Use readdir instead of readdir_r
Bin Liu [Thu, 20 Apr 2017 06:49:03 +0000 (08:49 +0200)]
coroparse: Use readdir instead of readdir_r

readdir_r is deprecated in glibc 2.24 in favor of readdir (which became
thread safe). Also because corosync never calls read_uidgid_files_into_icmap
in muliple threads, no problem should appears even with libc where
readdir is thread-safe.

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agototemknet: Handle logpipe creation failure
Bin Liu [Thu, 20 Apr 2017 06:46:00 +0000 (08:46 +0200)]
totemknet: Handle logpipe creation failure

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agowd: Report error when close of wd fails
Bin Liu [Thu, 20 Apr 2017 06:43:45 +0000 (08:43 +0200)]
wd: Report error when close of wd fails

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoQnetd lms: Use UTILS_PRI_RING_ID printf format str
Bin Liu [Thu, 20 Apr 2017 06:42:11 +0000 (08:42 +0200)]
Qnetd lms: Use UTILS_PRI_RING_ID printf format str

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocpghum: Fix printf of size_t variable
Bin Liu [Thu, 20 Apr 2017 06:41:21 +0000 (08:41 +0200)]
cpghum: Fix printf of size_t variable

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agototemknet: Got back to recvmsg() from recvmmsg()
Christine Caulfield [Tue, 11 Apr 2017 12:44:08 +0000 (13:44 +0100)]
totemknet: Got back to recvmsg() from recvmmsg()

The kernel team have recommended us not to use recvmmsg and as it
confers no particular speed advantage (especially given the extra
memory consumption) I'm going back to single message recvmsg() again.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agototemconfig: Prefer nodelist over bindnetaddr
Bin Liu [Mon, 10 Apr 2017 02:45:10 +0000 (10:45 +0800)]
totemconfig: Prefer nodelist over bindnetaddr

In a two-node cluster, I 've one node configured with open-vswtich:
5: br-fixed: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN group default
inet 192.168.124.88/24 scope global br-fixed
inet 192.168.124.87/24 scope global secondary br-fixed
inet 192.168.124.83/24 brd 192.168.124.255 scope global secondary
tentative br-fixed
inet 192.168.124.89/24 scope global secondary br-fixed

while I use 192.168.124.83 in node list of corosync.conf with udpu, and
the bind_addr is 192.168.124.0. After upgrading corosync on this node,
the it uses 192.168.124.88 instead of 192.168.124.83. As we can see:

corosync-cfgtool -s
Printing ring status.
Local node ID 1084783704

corosync-quorumtool -s
Membership information:
Nodeid Votes Name
1084783697 1 d52-54-77-77-01-02
1084783699 1 d52-54-77-77-01-01 (local)

while the other node can only see itself:
corosync-cfgtool -s
Printing ring status.
Local node ID 1084783697
RING ID 0
id = 192.168.124.81
status = ring 0 active with no faults

corosync-quorumtool -s
Membership information:
Nodeid Votes Name
1084783697 1 d52-54-77-77-01-02.virtual.cloud.suse.de (local)

this patch will check if there are both nodelist and bindnetaddr and if
so, display warning and use nodelist information.

Signed-off-by: Bin Liu <bliu@suse.com>
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoknet: Close libknet down cleanly at shutdown
Christine Caulfield [Tue, 11 Apr 2017 08:03:26 +0000 (09:03 +0100)]
knet: Close libknet down cleanly at shutdown

By tidily shutting down knet in totekmknet_finalize we
make sure all the links are cleanly taken down and,
more importantly for us, the corosync LEAVE message gets
sent so we don't get fenced on a clean exit.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoman: Document -a option to corosync-quorumtool
Christine Caulfield [Fri, 7 Apr 2017 15:10:17 +0000 (17:10 +0200)]
man: Document -a option to corosync-quorumtool

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agocpghum test: Improve error codes
Jan Friesse [Fri, 7 Apr 2017 07:32:07 +0000 (09:32 +0200)]
cpghum test: Improve error codes

Return error when unknown option is found. Also return error code 2 if
one of send/crc/length/sequence error happened. Finally make sure abort
returns same error code and not 999 (what is nonsense code anyway).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
7 years agoquorumtool: Add option to show all node addresses
Christine Caulfield [Tue, 4 Apr 2017 09:08:33 +0000 (10:08 +0100)]
quorumtool: Add option to show all node addresses

New -a option shows all of the names/ip address of nodes
in a multi-homed environment.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agocpghum: Stop cpghum from reporting fake CRC errors
Christine Caulfield [Tue, 14 Mar 2017 16:38:19 +0000 (16:38 +0000)]
cpghum: Stop cpghum from reporting fake CRC errors

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agologconfig: Do not overwrite logger_subsys priority
Bin Liu [Fri, 10 Mar 2017 07:22:13 +0000 (15:22 +0800)]
logconfig: Do not overwrite logger_subsys priority

logfile_priority and syslog_priority could be modified by
logging.logger_subsys.{logfile_priority|syslog_priority}. which could
lead to the following output(which are at notice level):

corosync[21419]:   [QUORUM] Using quorum provider corosync_votequorum
corosync[21419]:   [QUORUM] Members[1]: 1084777643
corosync[21419]:   [QUORUM] This node is within the primary component
                   and will provide service.
corosync[21419]:   [QUORUM] Members[3]: 1084777563 1084777584 1084777643

even the syslog_priority is warning. This patch could avoid the
overwrite.

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agototem: Fix buffer sizes
Christine Caulfield [Thu, 2 Mar 2017 14:57:39 +0000 (14:57 +0000)]
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>
7 years agomain: Don't ask libqb to handle segv, it doesn't work
Christine Caulfield [Mon, 27 Feb 2017 15:14:41 +0000 (15:14 +0000)]
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>
7 years agoLogsys: Change logsys syslog_priority priority
Jan Friesse [Fri, 24 Feb 2017 15:23:50 +0000 (16:23 +0100)]
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>
7 years agoknet: improve logging messages by adding knet subsystem
Fabio M. Di Nitto [Fri, 24 Feb 2017 08:41:35 +0000 (09:41 +0100)]
knet: improve logging messages by adding knet subsystem

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agocpghum: Add abort_on_error option
Christine Caulfield [Fri, 17 Feb 2017 14:50:27 +0000 (14:50 +0000)]
cpghum: Add abort_on_error option

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agocpghum: Add min rtt and print stats every alarm
Christine Caulfield [Thu, 16 Feb 2017 15:59:52 +0000 (15:59 +0000)]
cpghum: Add min rtt and print stats every alarm

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agocpghum: Add Round Trip Time (RTT) reporting
Christine Caulfield [Wed, 15 Feb 2017 14:09:09 +0000 (14:09 +0000)]
cpghum: Add Round Trip Time (RTT) reporting

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoknet: Change nodeids to knet_node_id_t for new knet compatibility
Fabio M. Di Nitto [Tue, 14 Feb 2017 05:08:45 +0000 (06:08 +0100)]
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>
7 years agoknet: Fix MTU sizes & allow transport config in corosync.conf
Christine Caulfield [Mon, 13 Feb 2017 16:54:30 +0000 (16:54 +0000)]
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>
7 years agoknet: PMTUd data_mtu already accounts for IP and knet header overheads
Fabio M. Di Nitto [Sat, 11 Feb 2017 05:41:38 +0000 (06:41 +0100)]
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>
7 years agoknet: switch from write to sendto()
Fabio M. Di Nitto [Sat, 11 Feb 2017 05:24:12 +0000 (06:24 +0100)]
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>
7 years agoknet: Change nodeids to 8 bit for new knet compatibility
Christine Caulfield [Fri, 3 Feb 2017 09:38:32 +0000 (09:38 +0000)]
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>
7 years agodoc: document watchdog_device parameter
Adrian Vondendriesch [Tue, 17 Jan 2017 14:26:45 +0000 (15:26 +0100)]
doc: document watchdog_device parameter

Commit 8d8d4a936ab73d8449a3574f969b17a90ef9428e 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>
7 years agoknet: Fix member_remove to shut down existing links first
Christine Caulfield [Mon, 16 Jan 2017 13:16:15 +0000 (13:16 +0000)]
knet: Fix member_remove to shut down existing links first

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoSpec: make internal dependencies arch-qualified
Jan Pokorný [Mon, 9 Jan 2017 18:45:46 +0000 (19:45 +0100)]
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>
7 years agoSpec: drop unneeded dependency
Jan Pokorný [Mon, 9 Jan 2017 18:42:57 +0000 (19:42 +0100)]
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>
7 years agoknet: Reduce default pong count to 2 for faster startup
Christine Caulfield [Tue, 3 Jan 2017 13:30:26 +0000 (13:30 +0000)]
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.

7 years agototemknet: Make it compile with kronosnet git master
Christine Caulfield [Thu, 22 Dec 2016 10:25:11 +0000 (10:25 +0000)]
totemknet: Make it compile with kronosnet git master

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoQdevice: fix spell errors in qdevice
Bin Liu [Fri, 9 Dec 2016 08:10:20 +0000 (16:10 +0800)]
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>
7 years agoRemove redundant header file inclusion
Takeshi MIZUTA [Sun, 4 Dec 2016 16:23:46 +0000 (01:23 +0900)]
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>
7 years agoRemove deprecated doxygen flags
Richard B Winters [Thu, 23 Apr 2015 22:35:22 +0000 (18:35 -0400)]
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>
7 years agoupstart: Add softdog module loading example
yuusuke [Fri, 2 Dec 2016 07:35:50 +0000 (16:35 +0900)]
upstart: Add softdog module loading example

Signed-off-by: yuusuke <yusk.iida@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoTotempg: remove duplicate memcpy in mcast_msg func
Bin Liu [Fri, 2 Dec 2016 02:37:27 +0000 (10:37 +0800)]
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>
7 years agoman: Modify man-page according to command usage
Takeshi MIZUTA [Wed, 30 Nov 2016 17:45:16 +0000 (02:45 +0900)]
man: Modify man-page according to command usage

Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoinit: Add doc URIs to the systemd service files
Ferenc Wágner [Wed, 18 May 2016 20:59:40 +0000 (22:59 +0200)]
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>
7 years agoFix typo: Destorying -> Destroying
Ferenc Wágner [Sun, 30 Oct 2016 12:33:40 +0000 (13:33 +0100)]
Fix typo: Destorying -> Destroying

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoman: Fix typos in man page
Takeshi MIZUTA [Fri, 25 Nov 2016 16:12:03 +0000 (01:12 +0900)]
man: Fix typos in man page

Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agototempg: totempg_groups_join return valid error
Takeshi MIZUTA [Wed, 23 Nov 2016 03:06:13 +0000 (12:06 +0900)]
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>
7 years agosystemd: Delete unnecessary soft_margin
yuusuke [Wed, 16 Nov 2016 09:43:57 +0000 (18:43 +0900)]
systemd: Delete unnecessary soft_margin

Signed-off-by: yuusuke <yusk.iida@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agoknet: Support reload of link parameters
Christine Caulfield [Thu, 17 Nov 2016 11:41:54 +0000 (11:41 +0000)]
knet: Support reload of link parameters

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agolist: Unify the list processing with qb_list func
Takeshi MIZUTA [Sun, 13 Nov 2016 15:59:59 +0000 (00:59 +0900)]
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>
7 years agoknet: Allow configuration of more params
Christine Caulfield [Tue, 15 Nov 2016 09:32:09 +0000 (09:32 +0000)]
knet: Allow configuration of more params

knet_pmtud_interval &
knet_pong_count

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoknet: Don't lose log messages when knet gets busy (#165)
Chrissie Caulfield [Mon, 14 Nov 2016 15:01:34 +0000 (15:01 +0000)]
knet: Don't lose log messages when knet gets busy (#165)

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agolibvotequorum: Bump version
Jan Friesse [Mon, 7 Nov 2016 16:39:12 +0000 (17:39 +0100)]
libvotequorum: Bump version

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
7 years agolist: Replace for_each by safe version where need
Jan Friesse [Tue, 25 Oct 2016 10:36:56 +0000 (12:36 +0200)]
list: Replace for_each by safe version where need

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agolist: Remove list.h
Jan Friesse [Tue, 25 Oct 2016 09:31:15 +0000 (11:31 +0200)]
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>
7 years agolist: Replace uses of list.h with qblist.h
Michael Jones [Wed, 12 Oct 2016 03:00:08 +0000 (22:00 -0500)]
list: Replace uses of list.h with qblist.h

Signed-off-by: Michael Jones <jonesmz@jonesmz.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years ago[build] Fix build on RHEL7.3 latest
Fabio M. Di Nitto [Sun, 23 Oct 2016 06:23:52 +0000 (08:23 +0200)]
[build] Fix build on RHEL7.3 latest

header inclusion have changed

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoChange a type of NodeID.
HideoYamauchi [Wed, 11 May 2016 07:35:50 +0000 (16:35 +0900)]
Change a type of NodeID.

Signed-off-by: HideoYamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
7 years agovqsim: Fix Makefile.am
Christine Caulfield [Thu, 13 Oct 2016 13:59:12 +0000 (14:59 +0100)]
vqsim: Fix Makefile.am

Make it conditional on BUILD_VQSIM being defined

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoconfigure: Remove RDMA (again)
Christine Caulfield [Thu, 13 Oct 2016 13:33:07 +0000 (14:33 +0100)]
configure: Remove RDMA (again)

How did that creep back in again?

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agovqsim: Add Quorum simulator program
Christine Caulfield [Thu, 13 Oct 2016 13:21:04 +0000 (14:21 +0100)]
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>
7 years agoBuild: Fail configure if knet is not installed
Jan Friesse [Thu, 13 Oct 2016 08:02:21 +0000 (10:02 +0200)]
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>
7 years agototem: add totemknet.[ch]
Christine Caulfield [Thu, 13 Oct 2016 07:46:34 +0000 (08:46 +0100)]
totem: add totemknet.[ch]

it seems git is better at deleting files than adding them

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agocfg: Prevents use of uninitialized buffer
Michael Jones [Mon, 10 Oct 2016 16:18:25 +0000 (11:18 -0500)]
cfg: Prevents use of uninitialized buffer

Signed-off-by: Michael Jones <jonesmz@jonesmz.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>