]> git.proxmox.com Git - mirror_corosync.git/log
mirror_corosync.git
8 years agoqnetd: move 2nodelms algo files to the right directory
Christine Caulfield [Fri, 16 Oct 2015 08:42:07 +0000 (09:42 +0100)]
qnetd: move 2nodelms algo files to the right directory

No, I don't know how that happened.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agoqdevice-net: add a 2node Last Man Standing algorithm
Christine Caulfield [Fri, 9 Oct 2015 13:11:10 +0000 (14:11 +0100)]
qdevice-net: add a 2node Last Man Standing algorithm
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agoqdevice-net: Implement missing messages handlers
Jan Friesse [Thu, 8 Oct 2015 16:01:42 +0000 (18:01 +0200)]
qdevice-net: Implement missing messages handlers

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agoqnetd-certutil: Fix master node variable
Jan Friesse [Thu, 8 Oct 2015 15:44:50 +0000 (17:44 +0200)]
qnetd-certutil: Fix master node variable

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agocorosync-qnetd-certutil: Delete tabs
Jan Friesse [Tue, 6 Oct 2015 15:53:49 +0000 (17:53 +0200)]
corosync-qnetd-certutil: Delete tabs

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agocorosync-qnetd-certutil: Delete dev comment
Jan Friesse [Tue, 6 Oct 2015 15:52:37 +0000 (17:52 +0200)]
corosync-qnetd-certutil: Delete dev comment

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agoqnetd: Move algorithms_register into qnetd-algorithms.c
Christine Caulfield [Tue, 6 Oct 2015 15:52:40 +0000 (16:52 +0100)]
qnetd: Move algorithms_register into qnetd-algorithms.c

and fix qnetd_algorithm_vote_info_reply_received

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agocorosync-qnetd-certutl: Improvements
Jan Friesse [Tue, 6 Oct 2015 15:31:20 +0000 (17:31 +0200)]
corosync-qnetd-certutl: Improvements

- Location of certificates is now correctly set depending on operation
  (qnetd/node)
- Added quick start mode

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agoqnetd: Make it easier to add algorithms
Christine Caulfield [Tue, 6 Oct 2015 12:40:03 +0000 (13:40 +0100)]
qnetd: Make it easier to add algorithms

Put the algorithms into an array of structure pointers
(a bit like corosync services) so we can easily add more
without having huge switch statements.

I haven't added any code to the client end that parses the
name into the enum. Yet.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agoDon't attempt to free a string we haven't been given.
Christine Caulfield [Tue, 6 Oct 2015 09:51:46 +0000 (10:51 +0100)]
Don't attempt to free a string we haven't been given.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agoqnetd: Improvements
Jan Friesse [Fri, 2 Oct 2015 06:54:05 +0000 (08:54 +0200)]
qnetd: Improvements

- Move adding client to cluster to init phase instead of preinit
- Implement missing ask for vote and vote info messages
- Fix cluster name memory leak
- Refactor unexpected message handler to one generic function
- Move qnetd_client_send_err to new file
- Add qnetd_client_send_vote_info

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agoqnetd: Add skel of ffsplit algo and cluster list
Jan Friesse [Thu, 1 Oct 2015 14:23:03 +0000 (16:23 +0200)]
qnetd: Add skel of ffsplit algo and cluster list

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agoQnetd improvements
Jan Friesse [Thu, 1 Oct 2015 07:58:01 +0000 (09:58 +0200)]
Qnetd improvements

- Complete config and membership node list callbacks
- Add client disconnect callback
- Always send msg_seq_num in node list
- Store config and last membership node list

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agoQnet improvements
Jan Friesse [Wed, 30 Sep 2015 08:07:23 +0000 (10:07 +0200)]
Qnet improvements

- Support for membership node list
- Initial support for "pluggable" algorithms

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agoQdevices-net improvements
Jan Friesse [Wed, 9 Sep 2015 14:10:13 +0000 (16:10 +0200)]
Qdevices-net improvements

- Implement node list
- Implement send buffer list
- Add nodelist message type
- Add ring_id, config_version, data_center_id, node_state, node_info,
  node_list_type and vote msg options

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agovotequorum: Make display of qdevice more intuitive.
Christine Caulfield [Tue, 8 Sep 2015 12:41:37 +0000 (13:41 +0100)]
votequorum: Make display of qdevice more intuitive.

corosync-quorumtool displays the votes of the qdevice whether
or not it is active. This is confusing because if it is not active
then the display looks like there is a vote being contributed to
quorum when there is not.

This patch displays 0 for qdevice votes if the device is present
(but inactive) and adds the votes after the name. If the device is
contributing votes then they are displayed as normal.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agoImprove qnet
Jan Friesse [Tue, 1 Sep 2015 15:25:53 +0000 (17:25 +0200)]
Improve qnet

8 years agoInitial commit of qdevice net
Jan Friesse [Mon, 15 Jun 2015 14:42:18 +0000 (16:42 +0200)]
Initial commit of qdevice net

8 years agoconfig: get_cluster_mcast_addr error is not fatal
Jan Friesse [Tue, 28 Jun 2016 11:54:50 +0000 (13:54 +0200)]
config: get_cluster_mcast_addr error is not fatal

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agolow:typo fix in sam.h
bliu [Mon, 27 Jun 2016 09:11:41 +0000 (17:11 +0800)]
low:typo fix in sam.h

Signed-off-by: bliu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix typo: Diabled -> disabled
Ferenc Wágner [Wed, 18 May 2016 21:16:51 +0000 (23:16 +0200)]
Fix typo: Diabled -> disabled

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix typo: alocated -> allocated
Ferenc Wágner [Wed, 18 May 2016 21:07:08 +0000 (23:07 +0200)]
Fix typo: alocated -> allocated

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix typo: retrive -> retrieve
Ferenc Wágner [Wed, 18 May 2016 21:06:50 +0000 (23:06 +0200)]
Fix typo: retrive -> retrieve

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix typo: aquire -> acquire
Ferenc Wágner [Wed, 18 May 2016 21:03:32 +0000 (23:03 +0200)]
Fix typo: aquire -> acquire

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix typo: Uknown -> Unknown
Ferenc Wágner [Wed, 18 May 2016 21:02:41 +0000 (23:02 +0200)]
Fix typo: Uknown -> Unknown

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix typo: interger -> integer
Ferenc Wágner [Thu, 12 May 2016 11:27:53 +0000 (13:27 +0200)]
Fix typo: interger -> integer

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix typo: funtion -> function
Ferenc Wágner [Thu, 12 May 2016 11:26:03 +0000 (13:26 +0200)]
Fix typo: funtion -> function

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agocmap_track_add.3.in: fix typo: bellow -> below
Ferenc Wágner [Mon, 5 Oct 2015 12:04:39 +0000 (14:04 +0200)]
cmap_track_add.3.in: fix typo: bellow -> below

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agologconfig: Fix logging reload disabling logfiles v2.3.6
Christine Caulfield [Fri, 27 May 2016 10:39:52 +0000 (11:39 +0100)]
logconfig: Fix logging reload disabling logfiles

In my previous logconfig patch, adding a subsys so the
logging stanzas could disable logging to a file, because
the subsys closed the file used by the main logging.

This patch only applies defaults to higher-level logging and
non-deprecated keys.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agowd: Warn if values are out of range
yuusuke [Fri, 11 Sep 2015 08:03:01 +0000 (17:03 +0900)]
wd: Warn if values are out of range

Signed-off-by: yuusuke <yusk.iida@gmail.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agoparser: WD Read type correctly from corosync.conf
yuusuke [Fri, 11 Sep 2015 08:00:31 +0000 (17:00 +0900)]
parser: WD Read type correctly from corosync.conf

Signed-off-by: yuusuke <yusk.iida@gmail.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agoAdd some more RO keys
Christine Caulfield [Tue, 24 May 2016 10:08:17 +0000 (11:08 +0100)]
Add some more RO keys

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoReapply config defaults corosync.conf reload
Christine Caulfield [Tue, 24 May 2016 09:44:22 +0000 (10:44 +0100)]
Reapply config defaults corosync.conf reload

There were several places where defaults were not restored
if the keys were removed from corosync.conf and the file reloaded.

This patch adds those back so that reloading corosync.conf
has the expected effect when keys are deleted.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoschedwrk: Cleanup and make it work on PPC BE
Jan Friesse [Fri, 13 May 2016 15:06:09 +0000 (17:06 +0200)]
schedwrk: Cleanup and make it work on PPC BE

Schedwrk is passing hdb handle (64-bit) to
totempg_callback_token_create as a context. Context is defined to be
pointer, so there is conversion function which stores 64-bit hdb_handle
into pointer. Potentially, pointer can be 32-bit. This means, check
part of hdb is discarded (and have to get special no_check value in
schedwrk_do) later. This works quite well on 32-bit Little-Endian
system. Sadly on Big-Endian system, check partition of hdb is stored
instead of value. Result is error of hdb_handle_get call.

Proposed solution is to pass handle pointer to
totempg_callback_token_create as context. This means full hdb (check +
value) can be used in schedwrk_do (easier detection of memory
corruption).

Main reason for this patch is to remove usage of pointer as integer
value.

Small drawback of given solution is that handle pointer must be memory
allocated on heap or static memory, making API more bug-prone. Current
usage of schedwrk API across corosync always use memory in .text
section (safe), so it's not a problem.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agocmapctl: Handle corosync errors in print_key func
Jan Friesse [Tue, 17 May 2016 10:04:13 +0000 (12:04 +0200)]
cmapctl: Handle corosync errors in print_key func

print_key handles only CS_ERR_TRY_AGAIN error. If different error is
returned, print_key loops forewer.

Solution is to handle all errors.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agoAdds doxygen stubs to include directory
Michael Jones [Sat, 30 Apr 2016 00:02:41 +0000 (20:02 -0400)]
Adds doxygen stubs to include directory

Signed-off-by: Michael Jones <jonesmz@jonesmz.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoAdd clang-format configuration file
Michael Jones [Fri, 29 Apr 2016 22:50:10 +0000 (18:50 -0400)]
Add clang-format configuration file

This .clang-format file is written for clang-format version 3.7.1

I've attempted to set the options for clang-format so that the
difference between the current code, and the result of the clang format
call is as small as possible.

Unfortunately, clang-format doesn't yet have the ability to handle every
single possible formatting option, so it's not perfect yet.

Signed-off-by: Michael Jones <jonesmz@jonesmz.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agowd: make watchdog device configurable
Valentin Vidic [Tue, 3 May 2016 07:05:54 +0000 (09:05 +0200)]
wd: make watchdog device configurable

Add configuration option resources.watchdog_device allowing runtime
selection of watchdog device.  Useful for newer servers having more
than one watchdog available (IPMI and iTCO).

Special value "off" disables watchdog in configuration rather than
just using build options.  Useful when watchdog device is needed
elsewhere (SBD cluster stonith service).

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agologging: Use our own version of basename
Christine Caulfield [Tue, 3 May 2016 10:05:02 +0000 (11:05 +0100)]
logging: Use our own version of basename

basename() function has some potentially odd issues on
other platforms.

So, to be safe, here's an internal version.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agologsys: fix TOTEM logging when corosync built out of tree
Christine Caulfield [Tue, 26 Apr 2016 08:49:53 +0000 (09:49 +0100)]
logsys: fix TOTEM logging when corosync built out of tree

If corosync is built out-of-tree (passing --srcdir to configure) then
TOTEM logging doesn't print anything.

This is caused by the source filenames (from __FILE__ at compilation
time) having the configured path in them - in this example
../corosync/exec/totemudp.c etc. The list of totem source filenames
passed to libqb logging facility only has the basenames so the filenames
never match up as libqb does an exact string match.

I looked into fixing this in libqb but it causes a regression. We can't
simply basename() __FILE__ at the point of calling log_printf as it's i
common also to use __FILE__ to generate the logging source, and
using basename() on both removes the distinction between similarly named
files from different directories which could be a requirement.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agoparser: Make config file parser more hierarchy
Christine Caulfield [Thu, 21 Apr 2016 12:47:47 +0000 (13:47 +0100)]
parser: Make config file parser more hierarchy

pass 'state' down the stack so that the state of the
hierarchy doesn't get lost when there are unexpected items
in the config hierarchy.

Don't bother setting 'state' on SECTION_END as there's no point
now we're going back up the stack.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agototemconfig: Explicitly pass IP version
Jan Friesse [Wed, 6 Apr 2016 13:49:09 +0000 (15:49 +0200)]
totemconfig: Explicitly pass IP version

If resolver was set to prefer IPv6 (almost always) and interface section
was not defined (almost all config files created by pcs), IP version was
set to mcast_addr.family. Because mcast_addr.family was unset (reset to
zero), IPv6 address was returned causing failure in totemsrp.
Solution is to pass correct IP version stored in
totem_config->ip_version.

Patch also simplifies get_cluster_mcast_addr. It was using mix of
explicitly passed IP version and bindnet IP version.

Also return value of get_cluster_mcast_addr is now properly checked.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
8 years agocpg: Handle ipc error in cpg_zcb_alloc/free
Jan Friesse [Wed, 24 Feb 2016 15:02:31 +0000 (16:02 +0100)]
cpg: Handle ipc error in cpg_zcb_alloc/free

- Error returned by coroipcc_msg_send_reply_receive is now correctly
  handled.
- If munmap fails, error is set to proper value and handle is put back
  into handle_db

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agocpg: Memory not unmapped in cpg_zcb_free
Athira Rajeev [Wed, 24 Feb 2016 13:15:31 +0000 (18:45 +0530)]
cpg: Memory not unmapped in cpg_zcb_free

Function in cpg_zcb_alloc (from code lib/cpg.c) creates
/dev/shm/corosync_zerocopy-XXXXX and does mmap

The memory is allocated by corosync service (function zcb_alloc
in exec/cpg.c) also and both shares this memory via mmap
(uses MAP_SHARED in mmap call)

Corosync calls unlink which deletes the file from /dev/shm while
closing the file descriptor, but unmap is not happening correctly
while calling cpg_zcb_free.

So:
- still the deleted file holds the memory
- As munmap is not happening correctly, the number of mappings per
  process gets exceeded and corosync dies with ENOMEM

From gdb, the size passed to munmap appears to be zero and address
looks wrong. Also in the code return code of munmap is not checked.

The patch adds check for:
-  munmap return code and getting correct address for munmap

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agototempg: Fix memory leak
Jan Friesse [Wed, 10 Feb 2016 11:36:52 +0000 (12:36 +0100)]
totempg: Fix memory leak

Previously there were two free lists. One for operational and one for
transitional state. Because every node starts in transitional state and
always ends in the operational state, assembly was always put to normal
state free list and never in transitional free list, so new assembly
structure was always allocated after new node connected.

Solution is to have only one free list.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Steven Dake <stdake@cisco.com>
8 years agoFix spelling error in binary corosync
Richard B Winters [Thu, 23 Apr 2015 20:46:58 +0000 (16:46 -0400)]
Fix spelling error in binary corosync

 - Changed paramater to parameter in exec/logcconfig.c

Change-Id: I8a24b0ef5c6621dc6c19d7decbdfe7a255afd10d
Signed-off-by: Richard B Winters <rik@mmogp.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix spelling error in binary corosync-cfgtool
Richard B Winters [Thu, 23 Apr 2015 20:40:45 +0000 (16:40 -0400)]
Fix spelling error in binary corosync-cfgtool

 - Changed reenable to re-enable in tools/corosync-cfgtool.c

Change-Id: I0457bf3040a454a44f0d8343dd2cd8bf8fad16e0
Signed-off-by: Richard B Winters <rik@mmogp.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix spelling error in manual sam_overview 8
Richard B Winters [Thu, 23 Apr 2015 20:36:21 +0000 (16:36 -0400)]
Fix spelling error in manual sam_overview 8

 - Changed usefull to useful

Change-Id: I2d7872b21e889202cd2b7752db4c76f18fffa95d
Signed-off-by: Richard B Winters <rik@mmogp.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agocmap_keys.8: Fix spelling and grammar errors
Jan Friesse [Wed, 27 Jan 2016 17:22:36 +0000 (18:22 +0100)]
cmap_keys.8: Fix spelling and grammar errors

- "There are informations" changed to "There is information"
- Other occurrences of informations changed to information

Original patch was created by Richard B Winters <rik@mmogp.com>, so
thanks for it.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
8 years agoFix spelling errors in manual corosync.conf 5
Richard B Winters [Thu, 23 Apr 2015 20:24:51 +0000 (16:24 -0400)]
Fix spelling errors in manual corosync.conf 5

 - dont to don't
 - overriden to overridden
 - informations to information

Change-Id: If6644694d750c30ba9f5f43b4eb852485613d64a
Signed-off-by: Richard B Winters <rik@mmogp.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix grammer error in manual votequorum_trackstart
Richard B Winters [Thu, 23 Apr 2015 20:18:27 +0000 (16:18 -0400)]
Fix grammer error in manual votequorum_trackstart

"allows to" was updated to read "allows one to"

- With a subject it's grammatically correct.

Change-Id: I9559e31c780e211b651744c6eaa056ce8d4c3db1
Signed-off-by: Richard B Winters <rik@mmogp.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoAdd section in manual title for cpg_zcb_free 3
Richard B Winters [Thu, 23 Apr 2015 20:13:02 +0000 (16:13 -0400)]
Add section in manual title for cpg_zcb_free 3

Change-Id: Ib80face38dce0345e649297d16cf8a63c5b0e8c1
Signed-off-by: Richard B Winters <rik@mmogp.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoAdd section in manual title for cpg_zcb_alloc 3
Richard B Winters [Thu, 23 Apr 2015 20:11:36 +0000 (16:11 -0400)]
Add section in manual title for cpg_zcb_alloc 3

Change-Id: I8c5d6af915203533c80e4eaa574e305a46d74815
Signed-off-by: Richard B Winters <rik@mmogp.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix incorrect spelling of retrieve from retreive
Richard B Winters [Thu, 23 Apr 2015 19:48:57 +0000 (15:48 -0400)]
Fix incorrect spelling of retrieve from retreive

Corrected the spelling of retrieve, where it was spelled as retreive.

 - There were two cases of this mispelling; one
   upper-case and one lower-case

Change-Id: Ic97fd210d8d3ae7e568e5a2e5d97c6220d2ff628
Signed-off-by: Richard B Winters <rik@mmogp.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoUpdate corosync.spec source link
Jan Friesse [Tue, 5 Jan 2016 16:11:07 +0000 (17:11 +0100)]
Update corosync.spec source link

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agoUpdate gitignore files
Jan Friesse [Tue, 5 Jan 2016 16:03:46 +0000 (17:03 +0100)]
Update gitignore files

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agoRemove all links to old ML
Jan Friesse [Tue, 5 Jan 2016 16:02:43 +0000 (17:02 +0100)]
Remove all links to old ML

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agototemsrp: Fix clang warning (tautological compare)
Ruben Kerkhof [Fri, 18 Dec 2015 18:55:06 +0000 (18:55 +0000)]
totemsrp: Fix clang warning (tautological compare)

gsfrom is always >= 0

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoconfigure.ac: Make location of .pc overrideable
Ruben Kerkhof [Fri, 18 Dec 2015 20:34:19 +0000 (20:34 +0000)]
configure.ac: Make location of .pc overrideable

FreeBSD stores them in /usr/local/libdata/pkgconfig

This allows us to remove some local hooks in the process.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoRemove a few unused variables and functions
Ruben Kerkhof [Fri, 18 Dec 2015 18:56:17 +0000 (18:56 +0000)]
Remove a few unused variables and functions

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoconfigure.ac: We don't need no C++ compiler
Ruben Kerkhof [Fri, 18 Dec 2015 14:21:04 +0000 (14:21 +0000)]
configure.ac: We don't need no C++ compiler

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoconfigure.ac: Remove deprecated AC_PROG_LIBTOOL
Ruben Kerkhof [Fri, 18 Dec 2015 14:06:09 +0000 (14:06 +0000)]
configure.ac: Remove deprecated AC_PROG_LIBTOOL

AC_PROG_LIBTOOL is deprecated version of LT_INIT. Because LT_INIT is
called we can remove it.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoconfigure.ac: Remove AC_PROG_RANLIB
Ruben Kerkhof [Fri, 18 Dec 2015 14:05:31 +0000 (14:05 +0000)]
configure.ac: Remove AC_PROG_RANLIB

It was obsoleted by libtool and we don't use ranlib standalone.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoconfigure.ac: make foreign apply to all Makefiles
Ruben Kerkhof [Fri, 18 Dec 2015 13:58:15 +0000 (13:58 +0000)]
configure.ac: make foreign apply to all Makefiles

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoRemove unused, obsolete check
Ruben Kerkhof [Fri, 18 Dec 2015 13:45:18 +0000 (13:45 +0000)]
Remove unused, obsolete check

From autoconf info Obsolete Macros:

"These days, it is portable to assume C89, and that signal
handlers return void, without needing to use this macro or RETSIGTYPE."

And we indeed assume so.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix detection of qb_log_thread_priority_set
Ruben Kerkhof [Tue, 15 Dec 2015 21:31:23 +0000 (22:31 +0100)]
Fix detection of qb_log_thread_priority_set

This fixes detection of libqb function qb_log_thread_priority_set
if it was installed outside of the standard library search
path, in my case /opt.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agocpghum: Fix type of recv_crc
Ruben Kerkhof [Tue, 15 Dec 2015 11:31:28 +0000 (12:31 +0100)]
cpghum: Fix type of recv_crc

Fixes build on FreeBSD which doesn't have ulong

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoCheck for fdatasync
Ruben Kerkhof [Tue, 15 Dec 2015 11:24:16 +0000 (12:24 +0100)]
Check for fdatasync

If we don't have it, fall back to fsync

Fixes the build on FreeBSD

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoFix detection of warning flags for clang
Ruben Kerkhof [Fri, 23 Jan 2015 01:14:14 +0000 (02:14 +0100)]
Fix detection of warning flags for clang

Using ./configure CC=clang, the following flags are detected
as supported:

checking whether clang supports "-Wgnu89-inline"... yes
checking whether clang supports "-Wno-strict-aliasing"... yes

Which results in a lot of warnings during make:

warning: unknown warning option '-Wunsigned-char'
[-Wunknown-warning-option]
warning: unknown warning option '-Wgnu89-inline'
[-Wunknown-warning-option]

Clang doesn't support these flags, but the compile check returns a
warning, not an error:

configure:16649: checking whether clang supports "-Wunsigned-char"
configure:16662: clang -E  -Wunsigned-char conftest.c
warning: unknown warning option '-Wunsigned-char'
[-Wunknown-warning-option]
1 warning generated.
configure:16662: $? = 0
configure:16663: result: yes

Use -Wunknown-warning-option -Werror if supported

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agoquorum: Display node id as unsigned int.
Hideo Yamauchi [Thu, 19 Nov 2015 23:53:17 +0000 (08:53 +0900)]
quorum: Display node id as unsigned int.

Signed-off-by: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agocts: InitClusterManager is now BootCluster
Jan Friesse [Mon, 23 Nov 2015 10:08:31 +0000 (11:08 +0100)]
cts: InitClusterManager is now BootCluster

This is forward port of flatiron-cts
fbe1721e676eafd1f25f470234b646904f54e3f3.

Thanks to bliu <bliu@suse.com> for pointing out.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
8 years agototemudp: Move udp bind() so that multicast works with IPv6
Christine Caulfield [Mon, 16 Nov 2015 16:00:36 +0000 (16:00 +0000)]
totemudp: Move udp bind() so that multicast works with IPv6

It seems that the IPv6 multicast parameters only take effect when bind()
is called, so I've moved the mcast recv socket bind() to the bottom of
totemudp_build_sockets_ip().

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agocfgtool: Display nodeid as unsigned int
Hideo Yamauchi [Fri, 13 Nov 2015 05:16:19 +0000 (14:16 +0900)]
cfgtool: Display nodeid as unsigned int

Signed-off-by: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
8 years agovotequorum: Don't send multiple callbacks when nodes join
Christine Caulfield [Thu, 22 Oct 2015 10:45:26 +0000 (11:45 +0100)]
votequorum: Don't send multiple callbacks when nodes join

This patch aligns the votequorum callbacks so that they are
the same as the quorum ones. Previously it was quite common
for votequorum to send one callback for every node in the cluster
when a single new node joined (because it sent one for every
nodeinfo message it received).

This new system makes much more sense in itself and being
consistent with the internal quorum is also an advantage!

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoman: Add synopsis for cpg_zcb_alloc and free
Ferenc Wágner [Fri, 28 Aug 2015 13:10:24 +0000 (15:10 +0200)]
man: Add synopsis for cpg_zcb_alloc and free

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoman html index: Update index
Ferenc Wágner [Fri, 28 Aug 2015 12:21:18 +0000 (14:21 +0200)]
man html index: Update index

- add link to cmap_keys(8)
- remove link to cpg_groups_get(3)
- add missing cpg_* and votequorum_qdevice_* functions
- corosync-fplay has already been removed by ab32894

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agovotequorum: Make sure cs_error_t is defined
Ferenc Wágner [Thu, 27 Aug 2015 12:32:02 +0000 (14:32 +0200)]
votequorum: Make sure cs_error_t is defined

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoClose Doxygen group in include/corosync/cmap.h
Ferenc Wágner [Thu, 13 Aug 2015 12:06:32 +0000 (14:06 +0200)]
Close Doxygen group in include/corosync/cmap.h

This avoids warning: end of file while inside a group.

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoDoxygen fix for cmap_iter_next()
Ferenc Wágner [Thu, 13 Aug 2015 10:57:01 +0000 (12:57 +0200)]
Doxygen fix for cmap_iter_next()

Remove the extra cmap_ prefix of the iter_handle parameter.

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoconfigure: Correct help entry for logdir
Ferenc Wágner [Thu, 13 Aug 2015 09:33:54 +0000 (11:33 +0200)]
configure: Correct help entry for logdir

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agototmesrp: Fix typo in log message
Ferenc Wágner [Thu, 13 Aug 2015 10:46:28 +0000 (12:46 +0200)]
totmesrp: Fix typo in log message

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoconfigure: typo in include
Ferenc Wágner [Thu, 13 Aug 2015 10:34:25 +0000 (12:34 +0200)]
configure: typo in include

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoman page: Correct option letter for DBus
Ferenc Wágner [Tue, 28 Jul 2015 13:31:36 +0000 (15:31 +0200)]
man page: Correct option letter for DBus

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agowd: fix setting of watchdog timeouts
Christine Caulfield [Tue, 14 Jul 2015 09:04:06 +0000 (10:04 +0100)]
wd: fix setting of watchdog timeouts

Fix setting of initial watchdog timeout, and also changing of timeout.

Remove redundant starting of timer in exec_init_fn

Signed-off-by: Kazunori INOUE <kazunori.inoue3@gmail.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
9 years agoCFG: Prevent CFG orignating messages during SYNC
Jason HU [Sun, 28 Jun 2015 16:16:06 +0000 (16:16 +0000)]
CFG: Prevent CFG orignating messages during SYNC

During SYNC, corosync-cfgtool -R/-H commands can pass through IPC then
send totem messages. This may corrupts
assembly_list_inuse/assembly_list_free if those messages are recedived
after SYNC is done.

The solution is marking related CFG APIs as
CS_LIB_FLOW_CONTROL_REQUIRED.

Signed-off-by: Jason HU <huzhijiang@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoDon't link with libz when not needed v2.3.5
Jan Friesse [Mon, 22 Jun 2015 14:00:07 +0000 (16:00 +0200)]
Don't link with libz when not needed

Commit 8cc8e513633a1a8b12c416e32fb5362fcf4d65dd added check for libz
resulting in linking with lib z for all libraries. This is not expected
behavior. Patch solves it by making defining automake conditional so
cpghum is linked only if libz is available and LIBS variable is not
modified at all.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
9 years agoLog: Add logrotate configuration file
Jan Friesse [Fri, 19 Jun 2015 15:42:09 +0000 (17:42 +0200)]
Log: Add logrotate configuration file

In cman era corosync was depending on logrotate file distributed by
cman. It's good idea to logrotate also on systems without cman (new
clusters).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
9 years agoAdd note about rrp active beeing unsupported
Jan Friesse [Fri, 19 Jun 2015 14:16:18 +0000 (16:16 +0200)]
Add note about rrp active beeing unsupported

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
9 years agovotequorum: Fix auto_tie_breaker behaviour in odd-sized clusters
Christine Caulfield [Thu, 18 Jun 2015 08:57:59 +0000 (09:57 +0100)]
votequorum: Fix auto_tie_breaker behaviour in odd-sized clusters

auto_tie_breaker can behave incorrectly in the case of a cluster
with an odd number of nodes. It's possible for a partition to
have quorum while the other side has the ATB node, and both will
continue working. (Of course in a properly configured cluster one side
will be fenced but that becomes an indeterminate race .. just what ATB
is supposed to avoid).

This patch prevents ATB from running in a partition if the 'other'
partition might have quorum, and also mandates the use of wait_for_all
in clusters with an odd number of nodes so that a quorate partition
cannot start services or fence an existing partition with the tie
breaker node.

Signed-Off-By: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agototemsrp: Improve logging of left/down nodes
Christine Caulfield [Fri, 12 Jun 2015 15:16:45 +0000 (16:16 +0100)]
totemsrp: Improve logging of left/down nodes

This patch from Hideo Yamauchi improves the logging of
whether nodes leave the cluster cleanly or uncleanly,
making it easier to determine if a node ws shut down
by the operator. There is also the possibility that a
LEAVE message could get missed (due to the node being
in flush state) so this can also make that clearer.

The modifications are as follows.

Change 1) I added the list which maintained LEAVE node to totemsrp.
Change 2) I added registration, a search, the handling of to clear LEAVE
node.
Change 3) I added the output to log.
Change 4) I changed an output level of the log.

Signed-off-by: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agototem: Log a message if JOIN or LEAVE message is ignored
Christine Caulfield [Fri, 17 Apr 2015 14:49:53 +0000 (15:49 +0100)]
totem: Log a message if JOIN or LEAVE message is ignored

As per recent email thread, this patch adds a log message if a JOIN or
LEAVE message is discarded while corosync is flushing the receive queue.

While ignoring a JOIN message is harmless (it will be resent), ignoring
a LEAVE message can cause a longer state transition as it is treated as
a node crashing rather than leaving gracefully, so the system admin
might be confused as to the cause.

Unfortunately, we can't (at the totemudp level) distinguish between JOIN
or LEAVE messages without a lot more protocol-specific code creeping in
the lower layer so the message is left ambiguous.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
9 years agototemconfig: Check for duplicate nodeids
Christine Caulfield [Fri, 10 Apr 2015 13:22:07 +0000 (14:22 +0100)]
totemconfig: Check for duplicate nodeids

Having duplicate nodeids in corosync.conf can play havoc with a cluster,
so (as suggested by someone on this list) here is some code to check
that all nodeids are unique. Even if a nodeid is not specified it will
check to be sure that the ID generated from the IP address (ipv4 only)
does not clash with one that is provided.

It logs all non-unique nodeids to syslog, but only the last is reported
on the command-line to the user which should be enough to get them to
check further. At startup this will cause corosync to fail to start.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
9 years agoquorum: don't allow quorum_trackstart to be called twice
Christine Caulfield [Mon, 16 Mar 2015 11:37:52 +0000 (11:37 +0000)]
quorum: don't allow quorum_trackstart to be called twice

If quorum_trackstart() or votequorum_trackstart() are called twice with
CS_TRACK_CHANGES then the client gets added twice to the notifications
list effectively corrupting it. Users have reported segfaults in
corosync when they did this (by mistake!).

As there's already a tracking_enabled flag in the private-data, we check
that before adding to the list again and return an error if
the process is already registered.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoReally add cpghum
Jan Friesse [Tue, 10 Mar 2015 12:20:37 +0000 (13:20 +0100)]
Really add cpghum

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
9 years agocpg: Add support for messages larger than 1Mb
Christine Caulfield [Thu, 5 Mar 2015 16:45:15 +0000 (16:45 +0000)]
cpg: Add support for messages larger than 1Mb

If a cpg client sends a message larger than 1Mb (actually slightly
less to allow for internal buffers) cpg will now fragment that into
several corosync messages before sending it around the ring.

cpg_mcast_joined() can now return CS_ERR_INTERRUPT which means that the
cpg membership was disrupted during the send operation and the message
needs to be resent.

The new API call cpg_max_atomic_msgsize_get() returns the maximum size
of a message that will not be fragmented internally.

New test program cpghum was written to stress test this functionality,
it checks message integrity and order of receipt.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agototemsrp: Format member list log as unsigned int
Andrey N. Groshev [Tue, 3 Mar 2015 02:56:12 +0000 (05:56 +0300)]
totemsrp: Format member list log as unsigned int

Signed-off-by: Andrey N. Groshev <greenx@yandex.ru>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoDon't allow both two_node and auto_tie_breaker in corosync.conf
Christine Caulfield [Mon, 2 Mar 2015 15:50:21 +0000 (15:50 +0000)]
Don't allow both two_node and auto_tie_breaker in corosync.conf

The two_node and auto_tie_breaker options are incompatible as they
specify conflicting methods of determining the quorate half of a cluster
partition.

This patch detects this error in corosync.conf, issues a message and
disables two_node if auto_tie_breaker is present.

Signed-Off-By: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoVotequorum: Fix auto_tie_breaker default
Christine Caulfield [Mon, 2 Mar 2015 15:48:01 +0000 (15:48 +0000)]
Votequorum: Fix auto_tie_breaker default

The default for auto_tie_breaker should be 'lowest' - which is what it
was before the extended ATB functionality of auto_tie_breaker_node was
added, and what the documentation states.

However this was broken so that if auto_tie_breaker_node was not
specified then auto_tie_breaker itself was ignored. This patch fixes
that.

It also fixes a typo in a comment.

Signed-Off-By: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
9 years agoHandle adding and removing UDPU members atomically
Jan Friesse [Wed, 21 Jan 2015 12:30:48 +0000 (13:30 +0100)]
Handle adding and removing UDPU members atomically

When config file is reloaded with removed UDPU member, internal icmap
index of nodelist.node can change. This can result in removal and then
adding back node. This, with UDPU alive filtering (where member is by
default considered as not a member) makes corosync not sending messages
to such members resulting in new membership creation.

Solution is to properly test which members were really deleted and added
(instead of relying on internal and dynamic naming of icmap hash table
key name).

Also trully dynamic add and remove node (via cmap) is now handled by
same function so totem_config->interfaces is now updated properly.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
9 years agocorosync_ring_id_store: Use safer permissions
Jan Friesse [Tue, 20 Jan 2015 09:24:34 +0000 (10:24 +0100)]
corosync_ring_id_store: Use safer permissions

corosync_ring_id_store should use same (safer) permissions as
corosync_ring_id_create_or_load for (eventually) newly created ringid
file.

Credit to Sjerek for finding this problem.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>