]> git.proxmox.com Git - mirror_corosync.git/log
mirror_corosync.git
11 years agonotifyd: fix handle dispatch functions results
Kazunori INOUE [Fri, 28 Jun 2013 07:01:03 +0000 (16:01 +0900)]
notifyd: fix handle dispatch functions results

Signed-off-by: Kazunori INOUE <inouekazu@intellilink.co.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoThe corosync message "A processor joined or left the membership" is
Christine Caulfield [Thu, 27 Jun 2013 13:44:46 +0000 (14:44 +0100)]
The corosync message "A processor joined or left the membership" is
vague and unhelpful. People have to look for the following quorum
message and try to deduce which nodes have joined or left from that
and past membership messages, even though the routine printing the
message already has this information to hand.

This patch fixes that message so that it prints the nodeids of the nodes
that have joined/left the cluster.

Signed-Off-By: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-By: Jan Friesse <jfriesse@redhat.com>
11 years agoLog: Output parse errors to syslog
Jan Friesse [Thu, 20 Jun 2013 09:59:50 +0000 (11:59 +0200)]
Log: Output parse errors to syslog

When corosync was started in daemon mode and there was parse error, no
way existed how to find out what happened (this is usual situation with
systemd enabled systems). Solution seems to be output to syslog by
default.

Also redundant line with setting logsys is removed because it's no
longer needed, because FORK and THREADED mode options has no longer
effect. FORK is handled by libqb by default and THREADED mode is forced
by calling logsys_thread_start.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agototemconfig: Prevent leak of cluster_name str
Jan Friesse [Tue, 18 Jun 2013 13:43:40 +0000 (15:43 +0200)]
totemconfig: Prevent leak of cluster_name str

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agoservice: Fix memleak in service_unlink_and_exit
Jan Friesse [Tue, 18 Jun 2013 13:38:06 +0000 (15:38 +0200)]
service: Fix memleak in service_unlink_and_exit

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agoFix patch for corosync.conf.5
Eric Raymond [Thu, 20 Jun 2013 14:09:50 +0000 (16:09 +0200)]
Fix patch for corosync.conf.5

he markup around an example is impossible to lift to XML or HTML
cleanly. Simplifying it fixes the problem.

Signed-off-by: Eric Raymond <esr@thyrsus.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agocpg: Set umask in memory_map function
Jan Friesse [Thu, 13 Jun 2013 14:21:09 +0000 (16:21 +0200)]
cpg: Set umask in memory_map function

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agoipc_glue: Check service name len
Jan Friesse [Thu, 13 Jun 2013 14:11:45 +0000 (16:11 +0200)]
ipc_glue: Check service name len

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agoipc_glue: Introduce constant for service name len
Jan Friesse [Thu, 13 Jun 2013 14:10:57 +0000 (16:10 +0200)]
ipc_glue: Introduce constant for service name len

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agocfg: Check interface status and name length
Jan Friesse [Thu, 13 Jun 2013 13:47:38 +0000 (15:47 +0200)]
cfg: Check interface status and name length

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agocfg: Check number of interfaces
Jan Friesse [Thu, 13 Jun 2013 13:43:11 +0000 (15:43 +0200)]
cfg: Check number of interfaces

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agocfg: Introduce CFG_MAX constants
Jan Friesse [Thu, 13 Jun 2013 13:40:30 +0000 (15:40 +0200)]
cfg: Introduce CFG_MAX constants

Instead of magic numbers, use constant.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agototemrrp: Make status string shorter
Jan Friesse [Thu, 13 Jun 2013 13:27:57 +0000 (15:27 +0200)]
totemrrp: Make status string shorter

Status string should be same lenght as needed for cfg
ringstatusget function.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
11 years agototem: Don't leak instance variable on crypto fail
Jan Friesse [Mon, 17 Jun 2013 14:27:55 +0000 (16:27 +0200)]
totem: Don't leak instance variable on crypto fail

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agototemudpu: Handle fd leak in totemudpu
Jan Friesse [Mon, 17 Jun 2013 14:18:55 +0000 (16:18 +0200)]
totemudpu: Handle fd leak in totemudpu

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agototemconfig: Check length of rrp_mode string
Jan Friesse [Mon, 17 Jun 2013 14:11:29 +0000 (16:11 +0200)]
totemconfig: Check length of rrp_mode string

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocoroparse: Ensure that config items fits into cmap
Jan Friesse [Fri, 14 Jun 2013 09:35:44 +0000 (11:35 +0200)]
coroparse: Ensure that config items fits into cmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocpg: Check cpg zc buffer path name length
Jan Friesse [Fri, 14 Jun 2013 08:26:18 +0000 (10:26 +0200)]
cpg: Check cpg zc buffer path name length

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agovotequorum: Prevent leak in qdevice_is_configured
Jan Friesse [Thu, 13 Jun 2013 13:19:18 +0000 (15:19 +0200)]
votequorum: Prevent leak in qdevice_is_configured

Also LEAVE from function is now properly logged.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoipc_cfg: Make coverity happy
Jan Friesse [Wed, 12 Jun 2013 14:59:49 +0000 (16:59 +0200)]
ipc_cfg: Make coverity happy

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoInitialize error variable in ykd_init
Jan Friesse [Wed, 12 Jun 2013 14:37:54 +0000 (16:37 +0200)]
Initialize error variable in ykd_init

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoInitialize node_found in nodelist_to_interface fun
Jan Friesse [Wed, 12 Jun 2013 14:35:47 +0000 (16:35 +0200)]
Initialize node_found in nodelist_to_interface fun

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoInitialize item in cmap_mcast_send
Jan Friesse [Wed, 12 Jun 2013 14:34:36 +0000 (16:34 +0200)]
Initialize item in cmap_mcast_send

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocmapctl: Remove unnecessary access check
Jan Friesse [Wed, 12 Jun 2013 14:31:18 +0000 (16:31 +0200)]
cmapctl: Remove unnecessary access check

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agovotequrorum: Assert sender nodeid is known
Jan Friesse [Wed, 12 Jun 2013 14:25:49 +0000 (16:25 +0200)]
votequrorum: Assert sender nodeid is known

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoquorumtool: Properly check nodeid cli param
Jan Friesse [Wed, 12 Jun 2013 14:09:26 +0000 (16:09 +0200)]
quorumtool: Properly check nodeid cli param

Return value of strtol can be negative, but result was assigned to
unsigned integer. To make check correct, result is first assigned to
signed variable, checked, and then assigned to unsigned variable.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoHandle errors when getting SC_PAGESIZE
Jan Friesse [Wed, 12 Jun 2013 14:06:08 +0000 (16:06 +0200)]
Handle errors when getting SC_PAGESIZE

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoCheck result of logsys_subsys_create
Jan Friesse [Wed, 12 Jun 2013 13:50:40 +0000 (15:50 +0200)]
Check result of logsys_subsys_create

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoCheck logsys_format_set result in logsys setup
Jan Friesse [Wed, 12 Jun 2013 09:39:11 +0000 (11:39 +0200)]
Check logsys_format_set result in logsys setup

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoUse proper totem_ip_address size in memset
Jan Friesse [Tue, 11 Jun 2013 15:47:41 +0000 (17:47 +0200)]
Use proper totem_ip_address size in memset

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoFree icmap strings in logconfig
Jan Friesse [Tue, 11 Jun 2013 15:44:53 +0000 (17:44 +0200)]
Free icmap strings in logconfig

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoProperly break MAIN_CP_CB_DATA_STATE_QDEVICE state
Jan Friesse [Tue, 11 Jun 2013 14:57:39 +0000 (16:57 +0200)]
Properly break MAIN_CP_CB_DATA_STATE_QDEVICE state

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoDo not dereference format_buffer when it's NULL
Jan Friesse [Tue, 11 Jun 2013 14:56:13 +0000 (16:56 +0200)]
Do not dereference format_buffer when it's NULL

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoCheck icmap str get for clustername
Jan Friesse [Tue, 11 Jun 2013 14:48:44 +0000 (16:48 +0200)]
Check icmap str get for clustername

Even this check is really not needed, it's nice to have it and on fault
ensure that cluster_name is really NULL.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoHandle dispatch functions results
Jan Friesse [Tue, 11 Jun 2013 14:16:52 +0000 (16:16 +0200)]
Handle dispatch functions results

On error, exit corosync-notifyd properly.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoProperly check result of stat func in coroparse
Jan Friesse [Tue, 11 Jun 2013 13:54:12 +0000 (15:54 +0200)]
Properly check result of stat func in coroparse

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agotestcpg: Check length of input group name
Jan Friesse [Thu, 6 Jun 2013 15:31:50 +0000 (17:31 +0200)]
testcpg: Check length of input group name

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocommon ta: Close client sockets
Jan Friesse [Thu, 6 Jun 2013 15:22:01 +0000 (17:22 +0200)]
common ta: Close client sockets

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocommon ta: Close listener socket
Jan Friesse [Thu, 6 Jun 2013 15:21:44 +0000 (17:21 +0200)]
common ta: Close listener socket

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agotest sam: Free temp str allocated by cmap
Jan Friesse [Thu, 6 Jun 2013 15:06:20 +0000 (17:06 +0200)]
test sam: Free temp str allocated by cmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agosam test agent: Assert results of send func
Jan Friesse [Thu, 6 Jun 2013 14:21:42 +0000 (16:21 +0200)]
sam test agent: Assert results of send func

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agovotequorum test agent: Assert results of send func
Jan Friesse [Thu, 6 Jun 2013 14:17:13 +0000 (16:17 +0200)]
votequorum test agent: Assert results of send func

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocpg test agent: Test len of name for cpg_join
Jan Friesse [Thu, 6 Jun 2013 14:04:46 +0000 (16:04 +0200)]
cpg test agent: Test len of name for cpg_join

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocpg test agent: Cfg shutdown flag is not bitfield
Jan Friesse [Thu, 6 Jun 2013 14:00:10 +0000 (16:00 +0200)]
cpg test agent: Cfg shutdown flag is not bitfield

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocpg test agent: Assert results of send function
Jan Friesse [Thu, 6 Jun 2013 13:54:53 +0000 (15:54 +0200)]
cpg test agent: Assert results of send function

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocpg test agent: Fix typo in assert
Jan Friesse [Thu, 6 Jun 2013 13:39:46 +0000 (15:39 +0200)]
cpg test agent: Fix typo in assert

Assert should compare rc, instead of setting it.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoRename make target coverity
Jan Friesse [Thu, 6 Jun 2013 13:34:40 +0000 (15:34 +0200)]
Rename make target coverity

Makefile target "coverity" is renamed to coverity-aggressive, and target
coverity is defined as a little less aggressive.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoAllow corotypes.h to be included from C++ code.
Michael van der Westhuizen [Mon, 20 May 2013 21:56:02 +0000 (22:56 +0100)]
Allow corotypes.h to be included from C++ code.

11 years agoRemove unnecessary mmap in cpg
Jan Friesse [Mon, 20 May 2013 13:54:02 +0000 (15:54 +0200)]
Remove unnecessary mmap in cpg

Code for zero-copy in cpg does following mmaps:
- Mmap anonymous, private memory to some address (-> malloc)
- Mmap shared memory of fd to address returned by first mmap
  (effectively shadows first mapping)

This is not necessary and only one mapping is needed.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoInstall sysconfig/corosync-notifyd in specfile
Jan Friesse [Tue, 16 Apr 2013 14:59:25 +0000 (16:59 +0200)]
Install sysconfig/corosync-notifyd in specfile

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoImprove corosync-notifyd example
Jan Friesse [Tue, 16 Apr 2013 14:08:24 +0000 (16:08 +0200)]
Improve corosync-notifyd example

Example now contains default option -d, so corosync-notifyd init script
don't fall. Also description is improved a little bit.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoFix a typo in README.recovery
Masatake YAMATO [Fri, 12 Apr 2013 05:16:12 +0000 (14:16 +0900)]
Fix a typo in README.recovery

Fix a typo.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoAdd Upstart job configuration file
Kazunori INOUE [Wed, 10 Apr 2013 14:48:18 +0000 (16:48 +0200)]
Add Upstart job configuration file

Signed-off-by: Kazunori INOUE <inouekazu@intellilink.co.jp>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoDetect big scheduling pauses
Jan Friesse [Mon, 8 Apr 2013 07:57:25 +0000 (09:57 +0200)]
Detect big scheduling pauses

Add poll timer scheduler to be called 3 times per token timeout.
If poll timer was not called for more then 0.8 * token timeout, it means
corosync process was not scheduled and ether token_timeout should be
increased or load should be reduced (useful for VM, where host is
overcommitted so VM is not scheduled as expected).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoAdded checks for "--as-needed" and "--version-script" linker flags.
Andrei Belov [Wed, 3 Apr 2013 09:36:53 +0000 (13:36 +0400)]
Added checks for "--as-needed" and "--version-script" linker flags.

This makes possible to build Corosync from sources on SunOS 5.11,
Mac OS X 10.8.3 and probably other systems with non-GNU linker.

Signed-off-by: Andrei Belov <defanator@gmail.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoSupport for numerical uid/gid
Jan Friesse [Fri, 29 Mar 2013 07:00:25 +0000 (08:00 +0100)]
Support for numerical uid/gid

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agobuild: pass enable options to "make rpm" from configure
Yuichi SEINO [Mon, 25 Mar 2013 08:06:28 +0000 (17:06 +0900)]
build: pass enable options to "make rpm" from configure

Signed-off-by: Yuichi SEINO <seino.cluster2@gmail.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoImproved POSIX-compliant handling of getpwnam_r() and getgrnam_r().
Andrei Belov [Thu, 28 Mar 2013 14:24:41 +0000 (14:24 +0000)]
Improved POSIX-compliant handling of getpwnam_r() and getgrnam_r().

Signed-off-by: Andrei Belov <defanator@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoMake cts work with pacemaker 1.1.9
Jan Friesse [Wed, 27 Mar 2013 16:30:02 +0000 (17:30 +0100)]
Make cts work with pacemaker 1.1.9

This is counterpart of adcc21a30c70a40861736bc9d902c2ef2d4b42c4 in
pacemaker.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
11 years agototempg: Make iov_delv local variable
Jan Friesse [Wed, 6 Mar 2013 12:50:49 +0000 (13:50 +0100)]
totempg: Make iov_delv local variable

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocfgtool: Retry shutdown on CS_ERR_TRY_AGAIN
Jan Friesse [Wed, 6 Mar 2013 12:42:09 +0000 (13:42 +0100)]
cfgtool: Retry shutdown on CS_ERR_TRY_AGAIN

It may be nice to deliver macro cs_repeat as default in some include
file.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocts: Output nodeid consistently as unsigned int
Jan Friesse [Wed, 20 Mar 2013 10:45:43 +0000 (11:45 +0100)]
cts: Output nodeid consistently as unsigned int

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoConvert the nodeid byte order to be aligned with network order
Xia Li [Tue, 19 Mar 2013 07:08:13 +0000 (07:08 +0000)]
Convert the nodeid byte order to be aligned with network order

When using corosync with clear_node_high_bit setting to yes,
the highest bit is cleared.  When all the cluster nodes are in
one subnet, we probably configure the IP addresses as follows:

node1: 147.2.207.64
node2: 147.2.207.192

If the byte order of the nodeid is little endian, wiping off the
highest bit will make the two nodes have the same nodeid!

This patch fixes this by converting the nodeid to network order.

Signed-off-by: Xia Li <xli@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoHandle ERANGE from getpwnam_r / getgrnam_r
Jeremy Fitzhardinge [Fri, 8 Mar 2013 00:56:54 +0000 (16:56 -0800)]
Handle ERANGE from getpwnam_r / getgrnam_r

These functions return ERANGE if the supplied buffer is too small to
fit a line.  Try doubling the buffer a few times until it works.

11 years agobuild: make --disable-testagents work
Michael Chapman [Mon, 11 Feb 2013 03:47:27 +0000 (03:47 +0000)]
build: make --disable-testagents work

The --disable-testagents option sets enable_testagents to "no". This
variable should always be explicitly tested against "yes", not just
that it is non-empty.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoHandle unexpected closing brace in config file
Jan Friesse [Thu, 31 Jan 2013 13:56:18 +0000 (14:56 +0100)]
Handle unexpected closing brace in config file

If configuration file contains closing brace before opening brace
at top level, configuration parsing is stopped and file is not
completely parsed. Solution is to detect extra closing brace and display
error.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoHandle colon in configuration file
Jan Friesse [Wed, 30 Jan 2013 12:40:52 +0000 (13:40 +0100)]
Handle colon in configuration file

If colon was entered as part of value on end of value, it is deleted.
This makes impossible to enter (legal) IPv6 address ending with :: (like
fed0::).

Also when line contains both brace and colon, it is parsed twice (first
as key = value and second as start of section). This is handled by
continue in if section.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agovotequorum: port to sync API (take 2)
Fabio M. Di Nitto [Wed, 30 Jan 2013 12:34:37 +0000 (13:34 +0100)]
votequorum: port to sync API (take 2)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agocrypto config: update man pages and examples v2.3.0
Fabio M. Di Nitto [Mon, 14 Jan 2013 11:06:47 +0000 (12:06 +0100)]
crypto config: update man pages and examples

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agototemconfig: enforce hmac config when crypto is enabled
Fabio M. Di Nitto [Mon, 14 Jan 2013 11:02:21 +0000 (12:02 +0100)]
totemconfig: enforce hmac config when crypto is enabled

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agolog: move Corosync started log messages
Kazunori INOUE [Thu, 10 Jan 2013 08:21:25 +0000 (08:21 +0000)]
log: move Corosync started log messages

"Corosync Cluster Engine ... started" message is shown after
logsys is full configured.

Signed-off-by: Kazunori INOUE <inouekazu@intellilink.co.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agocrypto: drop < 2.3 protocols and onwire compat
Fabio M. Di Nitto [Mon, 14 Jan 2013 10:45:39 +0000 (11:45 +0100)]
crypto: drop < 2.3 protocols and onwire compat

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agototemcrypto: fix hmac key initialization
Fabio M. Di Nitto [Mon, 14 Jan 2013 10:12:48 +0000 (11:12 +0100)]
totemcrypto: fix hmac key initialization

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoMove qb_loop creation after daemonization v2.2.0
Jan Friesse [Wed, 12 Dec 2012 08:25:18 +0000 (09:25 +0100)]
Move qb_loop creation after daemonization

Creating qb_loop before daemonization is not problem for poll or epoll
type loops, but it's problem for kqueue, because kqueue is not shared
in child with parent after fork.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agocmap: Handle NULL params in few more functions
Jan Friesse [Thu, 6 Dec 2012 07:48:28 +0000 (08:48 +0100)]
cmap: Handle NULL params in few more functions

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoAdd option to specify ip version
Jan Friesse [Mon, 3 Dec 2012 10:42:05 +0000 (11:42 +0100)]
Add option to specify ip version

Default is ipv4.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoAdd waiting_trans_ack also to fragmentation layer
Jan Friesse [Wed, 7 Nov 2012 16:51:15 +0000 (17:51 +0100)]
Add waiting_trans_ack also to fragmentation layer

Patch for support waiting_trans_ack may fail if there is synchronization
happening between delivery of fragmented message. In such situation,
fragmentation layer is waiting for message with correct number, but it
will never arrive.

Solution is to handle (callback) change of waiting_trans_ack and use
different queue.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoHandle segfault in backlog_get
Jan Friesse [Wed, 7 Nov 2012 15:56:33 +0000 (16:56 +0100)]
Handle segfault in backlog_get

If instance->memb_state is not OPERATION or RECOVERY, we was passing NULL
to cs_queue_used call.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoFix problem with sync operations under very rare circumstances
Steven Dake [Wed, 7 Nov 2012 15:45:12 +0000 (16:45 +0100)]
Fix problem with sync operations under very rare circumstances

This patch creates a special message queue for synchronization messages.
This prevents a situation in which messages are queued in the
new_message_queue but have not yet been originated from corrupting the
synchronization process.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoFix handling of NULL parameters in cmap
Jan Friesse [Thu, 22 Nov 2012 09:26:12 +0000 (10:26 +0100)]
Fix handling of NULL parameters in cmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agototemcrypto: implement crypto packet format 2.2 and crypto_compat: config opt
Fabio M. Di Nitto [Thu, 22 Nov 2012 09:27:49 +0000 (10:27 +0100)]
totemcrypto: implement crypto packet format 2.2 and crypto_compat: config opt

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoUpdate .gitignore files
Fabio M. Di Nitto [Wed, 21 Nov 2012 09:20:46 +0000 (10:20 +0100)]
Update .gitignore files

 Untracked files:
   (use "git add <file>..." to include in what will be committed)

       compile
       init/corosync
       init/corosync-notifyd
       test/ploadstart

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agocorosync to start in infiniband + redundant ring active/passive mode
Evgeny Barskiy [Mon, 19 Nov 2012 11:24:49 +0000 (11:24 +0000)]
corosync to start in infiniband + redundant ring active/passive mode

Corosync now works with infiniband transport in any redundant ring mode

Signed-off-by: Evgeny Barskiy <barskiy@rts.ru>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agovotequorum: fix handling of expected_votes/votes changes from cmapctl
Fabio M. Di Nitto [Tue, 20 Nov 2012 14:38:09 +0000 (15:38 +0100)]
votequorum: fix handling of expected_votes/votes changes from cmapctl

and allow natural selection to take place....

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoquorum-tool: use option to generate machine parsable output
Fabio M. Di Nitto [Tue, 20 Nov 2012 08:19:46 +0000 (09:19 +0100)]
quorum-tool: use option to generate machine parsable output

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoAdd support for selecting IPC type
Jan Friesse [Thu, 8 Nov 2012 10:05:10 +0000 (11:05 +0100)]
Add support for selecting IPC type

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoCheck successful initialization of IPC
Jan Friesse [Thu, 8 Nov 2012 09:58:52 +0000 (10:58 +0100)]
Check successful initialization of IPC

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoEnahnce manpages a little bit
Jan Friesse [Wed, 7 Nov 2012 11:21:57 +0000 (12:21 +0100)]
Enahnce manpages a little bit

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoTry reduce the number of sprintf's
Angus Salkeld [Wed, 7 Nov 2012 08:56:47 +0000 (19:56 +1100)]
Try reduce the number of sprintf's

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoOverride the link_all_deplibs=no in ubuntu
Angus Salkeld [Wed, 7 Nov 2012 05:48:06 +0000 (16:48 +1100)]
Override the link_all_deplibs=no in ubuntu

but allow the user to disable this.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoMerge pull request #2 from dfcluster/master
Jan Friesse [Tue, 6 Nov 2012 08:52:44 +0000 (00:52 -0800)]
Merge pull request #2 from dfcluster/master

Update corosync man page

11 years agoIf failed_to_recv is set, consensus can be empty
Jan Friesse [Wed, 24 Oct 2012 10:08:40 +0000 (10:08 +0000)]
If failed_to_recv is set, consensus can be empty

If failed_to_recv is set (node detect itself not able to receive
message), we can end up with assert, because my_failed_list and
my_member_list are same list. This is happening because we are not
following specification and we allow to mark node itself as failed.
Because if failed_to_recv is set and we reached consensus across nodes,
single node membership is created (ignoring both fail list and
member_list), we can skip assert.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoquorumtool: add local nodeid to global quorum info section
Fabio M. Di Nitto [Mon, 5 Nov 2012 09:46:47 +0000 (10:46 +0100)]
quorumtool: add local nodeid to global quorum info section

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoquorumtool: add (local) next to the nodename when displaying node data
Fabio M. Di Nitto [Mon, 5 Nov 2012 09:44:46 +0000 (10:44 +0100)]
quorumtool: add (local) next to the nodename when displaying node data

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoquorumtool: change default command from -h to -s
Fabio M. Di Nitto [Mon, 5 Nov 2012 09:39:13 +0000 (10:39 +0100)]
quorumtool: change default command from -h to -s

default run will show status instead of help text

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoUpdate man/corosync.conf.5
dfcluster [Tue, 30 Oct 2012 14:15:19 +0000 (16:15 +0200)]
Update man/corosync.conf.5

11 years agolink libtotem_pg to libqb
Jacek Konieczny [Thu, 25 Oct 2012 07:44:57 +0000 (07:44 +0000)]
link libtotem_pg to libqb

The libtotem_pg library uses symbols from libqb, so it should be
explicitely linked with it. This doesn't cause problems for corosync
binary itself, as it is linked to both libraries, but can cause
problems if anything else links to libtotem_pg.so and automated
checkers can show this as a library problem.

Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoFix dbus configuration install
Jacek Konieczny [Thu, 25 Oct 2012 07:41:08 +0000 (07:41 +0000)]
Fix dbus configuration install

The corosync-signals.conf DBus configuration file was not
installed even if DBus support was enabled because of a configure
test error.

Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoCorrectly check if service was unloaded
Jan Friesse [Wed, 17 Oct 2012 12:50:09 +0000 (14:50 +0200)]
Correctly check if service was unloaded

my_processing_idx is pointer to received service list, instead of global
service number. If we check state of service we should use service_id
instead of my_processing_idx.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoDefine AES_*_KEY_LENGTH if not defined
Jan Friesse [Wed, 17 Oct 2012 12:48:28 +0000 (14:48 +0200)]
Define AES_*_KEY_LENGTH if not defined

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>