]> git.proxmox.com Git - mirror_corosync.git/log
mirror_corosync.git
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>
11 years agoMissing space in man/Makefile.am
Andreas Gruninger [Tue, 16 Oct 2012 15:28:23 +0000 (17:28 +0200)]
Missing space in man/Makefile.am

Signed-off-by: Andreas Gruninger <Andreas.Grueninger@lgl.bwl.de>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agototemcrypto: add support for different encryption methods
Fabio M. Di Nitto [Sat, 13 Oct 2012 10:19:12 +0000 (12:19 +0200)]
totemcrypto: add support for different encryption methods

(backport from nsscrypto kronosnet code)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
11 years agoChange specfile URL and Source v2.1.0
Jan Friesse [Thu, 11 Oct 2012 08:53:25 +0000 (10:53 +0200)]
Change specfile URL and Source

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoDocument config_version option
Jan Friesse [Wed, 10 Oct 2012 15:55:39 +0000 (17:55 +0200)]
Document config_version option

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoUse systemd-rpm macros in specfile
Jan Friesse [Tue, 9 Oct 2012 14:52:35 +0000 (16:52 +0200)]
Use systemd-rpm macros in specfile

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoEnhance spec file
Jan Friesse [Tue, 9 Oct 2012 09:52:14 +0000 (11:52 +0200)]
Enhance spec file

Weird construct buildtrunk is gone. Instead of that, we use bcond
feature. Also buildtrunk is renamed to runautogen, because SVN era is
gone.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoMake totemiba compile again
Jan Friesse [Mon, 8 Oct 2012 15:44:09 +0000 (17:44 +0200)]
Make totemiba compile again

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
11 years agoReturn back "Totem is unable to form..." message
Jan Friesse [Mon, 8 Oct 2012 13:59:49 +0000 (15:59 +0200)]
Return back "Totem is unable to form..." message

This patch returns back SUBJ functionality. It rely on fact, that
sendmsg will return error, and if such error is returned for long time,
it's probably because of firewall.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoMove "Totem is unable to form..." message to main
Jan Friesse [Mon, 8 Oct 2012 13:29:47 +0000 (15:29 +0200)]
Move "Totem is unable to form..." message to main

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoUse unix socket for local multicast loop
Jan Friesse [Thu, 4 Oct 2012 08:47:43 +0000 (10:47 +0200)]
Use unix socket for local multicast loop

Instead of rely on multicast loop functionality of kernel, we now use
unix socket created by socketpair to deliver multicast messages to
local node. This handles problems with improperly configured local
firewall. So if output/input to/from ethernet interface is blocked, node
is still able to create single node membership.

Dark side of the patch is fact, that membership is always created, so
"Totem is unable to form a cluster..." will never appear (same applies
to continuous_gather key).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoman page: fix quorum references
Fabio M. Di Nitto [Thu, 4 Oct 2012 14:46:18 +0000 (16:46 +0200)]
man page: fix quorum references

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Signed-off-by: Lon Hohberger <lhh@redhat.com>
11 years agoStore config_version of other nodes
Jan Friesse [Tue, 2 Oct 2012 15:23:46 +0000 (17:23 +0200)]
Store config_version of other nodes

Config version of other nodes is stored in
runtime.totem.pg.mrp.srp.members.NODEID.config_version key. Also when
local config_version is changed, all nodes are informed.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoSupport for check of config version on start
Jan Friesse [Mon, 1 Oct 2012 13:59:11 +0000 (15:59 +0200)]
Support for check of config version on start

Config version is requested from other nodes. If our config version is
not 0 and differes from highest config version of other nodes, corosync
quits.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoMake cmap_mcast_send return correct error code
Jan Friesse [Mon, 1 Oct 2012 12:48:24 +0000 (14:48 +0200)]
Make cmap_mcast_send return correct error code

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoMake service_build contain correct number of msgs
Jan Friesse [Mon, 1 Oct 2012 12:46:54 +0000 (14:46 +0200)]
Make service_build contain correct number of msgs

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoAlign items in cmap_mcast_send
Jan Friesse [Mon, 1 Oct 2012 09:34:04 +0000 (11:34 +0200)]
Align items in cmap_mcast_send

Aligning function (kernel style magic) MAR_ALIGN_UP is used for
aligning of items in req_exec_cmap_mcast message.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoSupport for flt and dbl in mcast_endian_convert
Jan Friesse [Thu, 27 Sep 2012 08:20:53 +0000 (10:20 +0200)]
Support for flt and dbl in mcast_endian_convert

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoAdd support for swab float and double
Jan Friesse [Thu, 27 Sep 2012 08:17:00 +0000 (10:17 +0200)]
Add support for swab float and double

This uses general swabbin function which is able to swab every byte in
array.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoAdd support for sending cmap values to wire
Jan Friesse [Wed, 26 Sep 2012 15:47:02 +0000 (17:47 +0200)]
Add support for sending cmap values to wire

Function is little more complex, but it is designed to be used in future
without big changes.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
11 years agoParse config_version as 64-bit uint
Jan Friesse [Wed, 26 Sep 2012 11:53:50 +0000 (13:53 +0200)]
Parse config_version as 64-bit uint

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoDon't access invalid mem in totemconfig interfaces
Jan Friesse [Thu, 27 Sep 2012 10:45:54 +0000 (12:45 +0200)]
Don't access invalid mem in totemconfig interfaces

When ringnumber in config file was set to value bigger or equal to
INTERFACE_MAX, we are using this big value as index to totemconfig
interfaces array, resulting to access to invalid memory and segfault.

Instead of that, ringnumber is now checked and proper error message is
printed if value is too big.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoMove some totem and cpg messages to trace level
Jan Friesse [Mon, 17 Sep 2012 13:26:45 +0000 (15:26 +0200)]
Move some totem and cpg messages to trace level

Messages which are flow messages, rather then lifecycle are now logged
in trace level.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoAdd support for debug level trace in config file
Jan Friesse [Mon, 17 Sep 2012 08:36:24 +0000 (10:36 +0200)]
Add support for debug level trace in config file

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoicmap: fix mapping return codes
Fabio M. Di Nitto [Tue, 11 Sep 2012 11:00:38 +0000 (13:00 +0200)]
icmap: fix mapping return codes

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
12 years agobuild: fix indirect linking vs rpath by linking --as-needed
Fabio M. Di Nitto [Mon, 10 Sep 2012 13:11:21 +0000 (15:11 +0200)]
build: fix indirect linking vs rpath by linking --as-needed

libtotem_pg links against libnss/nspr and correctly sets RPATH
corosync links against libtotem_pg, but libtool (via .la) enforces
an extra layer of linking against libnss/nspr without setting RPATH.

corosync final binary can't resolve the second linking and fails
to load.

This issue is visible only on NetBSD that enforces a much stricter
use of rpath (vs other OS/distros). Using --as-needed avoids that
and it's generally safe to use on other OS'es.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agobuild: make secure build optional
Fabio M. Di Nitto [Mon, 10 Sep 2012 11:56:51 +0000 (13:56 +0200)]
build: make secure build optional

apparently some versions of gcc accepts the pie/relro bits
but fails to produce a working binary (freebsd9)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
12 years agobuild: fix regression with handling fPIC and DPIC
Fabio M. Di Nitto [Mon, 10 Sep 2012 11:10:00 +0000 (13:10 +0200)]
build: fix regression with handling fPIC and DPIC

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
12 years agobuild: add support for relro and bindnow
Fabio M. Di Nitto [Thu, 6 Sep 2012 12:35:34 +0000 (14:35 +0200)]
build: add support for relro and bindnow

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: autodetect if compiler support -fPIE and -pie for linking
Fabio M. Di Nitto [Thu, 6 Sep 2012 12:26:31 +0000 (14:26 +0200)]
build: autodetect if compiler support -fPIE and -pie for linking

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: clean AM_CFLAGS and AM_CPPFLAGS usage around
Fabio M. Di Nitto [Thu, 6 Sep 2012 12:15:46 +0000 (14:15 +0200)]
build: clean AM_CFLAGS and AM_CPPFLAGS usage around

also set commont include dirs.

fPIC and DPIC are automatically detected and added
as required by libtool. We don't need to carry it around.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agototemconfig: drop unnecessary includes
Fabio M. Di Nitto [Thu, 6 Sep 2012 12:06:56 +0000 (14:06 +0200)]
totemconfig: drop unnecessary includes

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoRemove newline in logsys_config_file_set_unlocked
Jan Friesse [Wed, 5 Sep 2012 15:32:49 +0000 (17:32 +0200)]
Remove newline in logsys_config_file_set_unlocked

Also remove commented leftover.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoMake threaded log work
Jan Friesse [Wed, 5 Sep 2012 15:24:37 +0000 (17:24 +0200)]
Make threaded log work

Previous two log releated patches tried to solve few problems with
threaded libqb, but introduced regressions when running in daemon mode.

This patch takes bigger hammer and hopefully solves all problems.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoEnsure qb_log thread is started
Jan Friesse [Tue, 4 Sep 2012 15:02:38 +0000 (15:02 +0000)]
Ensure qb_log thread is started

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoEnsure no garbage left in msghdr for sendmsg call
Jan Friesse [Fri, 31 Aug 2012 08:38:16 +0000 (04:38 -0400)]
Ensure no garbage left in msghdr for sendmsg call

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoUse uint8_t in setsockopt when needed
Jan Friesse [Fri, 31 Aug 2012 08:37:21 +0000 (04:37 -0400)]
Use uint8_t in setsockopt when needed

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoOpenBSD getifaddrs returns netmask without sa_family
Jan Friesse [Fri, 31 Aug 2012 08:29:57 +0000 (04:29 -0400)]
OpenBSD getifaddrs returns netmask without sa_family

So we relax netmask check and set to same family as ipaddr
if needed

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd header files when needed
Jan Friesse [Fri, 31 Aug 2012 07:01:41 +0000 (03:01 -0400)]
Add header files when needed

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMake use of EBADMSG conditional
Jan Friesse [Fri, 31 Aug 2012 06:33:08 +0000 (02:33 -0400)]
Make use of EBADMSG conditional

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoFix cpg_membership_get()
Angus Salkeld [Fri, 31 Aug 2012 04:48:35 +0000 (14:48 +1000)]
Fix cpg_membership_get()

The wrong size was getting set in exec/cpg.c

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agobuild: drop OS detection
Fabio M. Di Nitto [Thu, 30 Aug 2012 11:56:25 +0000 (13:56 +0200)]
build: drop OS detection

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: bring SOLARIS up to the same standard as other OSes
Fabio M. Di Nitto [Thu, 30 Aug 2012 12:59:10 +0000 (14:59 +0200)]
build: bring SOLARIS up to the same standard as other OSes

drop all SOLARIS specific ifdefs and replace them with feature checks

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop TS_CLASS definition, used nowhere
Fabio M. Di Nitto [Thu, 30 Aug 2012 11:12:48 +0000 (13:12 +0200)]
build: drop TS_CLASS definition, used nowhere

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop COROSYNC_BSD out of configure
Fabio M. Di Nitto [Thu, 30 Aug 2012 11:06:09 +0000 (13:06 +0200)]
build: drop COROSYNC_BSD out of configure

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agototemip: clean up headers a lot more
Fabio M. Di Nitto [Thu, 30 Aug 2012 10:54:48 +0000 (12:54 +0200)]
totemip: clean up headers a lot more

getifaddrs is always available if there is freeifaddr.

all BSD and openindiana have it defined in ifaddr.h.

drop a bunch of obsoleted headers.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop MAP_ANONYMOUS check from configure
Fabio M. Di Nitto [Thu, 30 Aug 2012 10:12:56 +0000 (12:12 +0200)]
build: drop MAP_ANONYMOUS check from configure

define it only in case it's not there

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop COROSYNC_DARWIN definition
Fabio M. Di Nitto [Thu, 30 Aug 2012 10:03:10 +0000 (12:03 +0200)]
build: drop COROSYNC_DARWIN definition

not referenced anywhere in the code

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop completely linux detection
Fabio M. Di Nitto [Thu, 30 Aug 2012 09:59:18 +0000 (11:59 +0200)]
build: drop completely linux detection

from now on there are no unsupported OS'es...

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: make libstatgrab the facto default for monitoring service
Fabio M. Di Nitto [Thu, 30 Aug 2012 09:51:03 +0000 (11:51 +0200)]
build: make libstatgrab the facto default for monitoring service

drop duplicate code and remove the last COROSYNC_LINUX ifdefs
around

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agototemip: add missing include
Fabio M. Di Nitto [Thu, 30 Aug 2012 09:04:53 +0000 (11:04 +0200)]
totemip: add missing include

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