]> git.proxmox.com Git - mirror_corosync.git/log
mirror_corosync.git
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>
12 years agobuild: use MADV_NOSYNC only when it's defined
Fabio M. Di Nitto [Thu, 30 Aug 2012 09:00:54 +0000 (11:00 +0200)]
build: use MADV_NOSYNC only when it's defined

so far only FreeBSD defines it.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: make exec/totemip os detection free
Fabio M. Di Nitto [Thu, 30 Aug 2012 08:31:43 +0000 (10:31 +0200)]
build: make exec/totemip os detection free

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

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 agoLog: Use threaded mode for syslog and file log
Jan Friesse [Thu, 9 Aug 2012 15:25:17 +0000 (17:25 +0200)]
Log: Use threaded mode for syslog and file log

Syslog and file log can block, so it's good idea to use libqb threaded
mode to prevent it.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoUse native IPC mechanism
Jan Friesse [Thu, 30 Aug 2012 07:24:47 +0000 (09:24 +0200)]
Use native IPC mechanism

Instead of hardcoded SHM, we should use NATIVE, so libqb is able to find
out what is best/availiable mechanism.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoAdd la, lo and .libs files/directory to gitignore
Jan Friesse [Thu, 30 Aug 2012 07:22:57 +0000 (09:22 +0200)]
Add la, lo and .libs files/directory to gitignore

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agobuild: fix library version export in ELF header
Fabio M. Di Nitto [Thu, 30 Aug 2012 07:38:51 +0000 (09:38 +0200)]
build: fix library version export in ELF header

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: fix spec file creation
Fabio M. Di Nitto [Wed, 29 Aug 2012 11:36:15 +0000 (13:36 +0200)]
build: fix spec file creation

hopefully once and for all...

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agospec: cleanup spec file to be slightly smarter
Fabio M. Di Nitto [Wed, 29 Aug 2012 08:38:32 +0000 (10:38 +0200)]
spec: cleanup spec file to be slightly smarter

move all the conditionals in 2 variables to make it easier to read
and maintain and fix install of dbus-signal file

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: fix do_snmp conditionals
Fabio M. Di Nitto [Wed, 29 Aug 2012 08:02:31 +0000 (10:02 +0200)]
build: fix do_snmp conditionals

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: fix make rpm
Fabio M. Di Nitto [Tue, 28 Aug 2012 13:21:48 +0000 (15:21 +0200)]
build: fix make rpm

remove .la files from binary rpm

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: cleanup configure.ac for non-linux OS'es
Fabio M. Di Nitto [Mon, 27 Aug 2012 14:53:41 +0000 (16:53 +0200)]
build: cleanup configure.ac for non-linux OS'es

libstatgrab ships with pkg-config file. Use it.

watchdog is implemented only on linux. Error out if necessary.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop PATH_MAX definition from dark ages
Fabio M. Di Nitto [Tue, 28 Aug 2012 10:57:08 +0000 (12:57 +0200)]
build: drop PATH_MAX definition from dark ages

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop redefine of NAME_MAX since nothing references it anylonger
Fabio M. Di Nitto [Tue, 28 Aug 2012 10:56:27 +0000 (12:56 +0200)]
build: drop redefine of NAME_MAX since nothing references it anylonger

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop last reference to OS_CPPFLAGS and use AC EXTENSIONS instead
Fabio M. Di Nitto [Tue, 28 Aug 2012 10:37:39 +0000 (12:37 +0200)]
build: drop last reference to OS_CPPFLAGS and use AC EXTENSIONS instead

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: fix build on openindiana 151a
Fabio M. Di Nitto [Tue, 28 Aug 2012 10:25:13 +0000 (12:25 +0200)]
build: fix build on openindiana 151a

openindiana toolchain is rather messy. This is the first cut only

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: remove bashism in cc support check
Fabio M. Di Nitto [Tue, 28 Aug 2012 09:52:43 +0000 (11:52 +0200)]
build: remove bashism in cc support check

this is required for all systems that don't use bash for /bin/sh

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop SOLARIS_OPTS and DARWIN_OPTS
Fabio M. Di Nitto [Tue, 28 Aug 2012 09:15:27 +0000 (11:15 +0200)]
build: drop SOLARIS_OPTS and DARWIN_OPTS

SOLARIS was unused

DARWIN needs verification

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: minor cleanup and final removal of OS_LDFLAGS
Fabio M. Di Nitto [Tue, 28 Aug 2012 09:11:07 +0000 (11:11 +0200)]
build: minor cleanup and final removal of OS_LDFLAGS

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: rework snmp library detection and setting of CFLAGS
Fabio M. Di Nitto [Tue, 28 Aug 2012 08:57:16 +0000 (10:57 +0200)]
build: rework snmp library detection and setting of CFLAGS

this allows to drop more OS_* specific bits

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: drop more dlopen leftovers from dinosaur era...
Fabio M. Di Nitto [Tue, 28 Aug 2012 07:50:12 +0000 (09:50 +0200)]
build: drop more dlopen leftovers from dinosaur era...

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: make monitoring optional in corosync exec
Fabio M. Di Nitto [Tue, 28 Aug 2012 07:20:03 +0000 (09:20 +0200)]
build: make monitoring optional in corosync exec

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: update .gitignore files
Fabio M. Di Nitto [Tue, 28 Aug 2012 07:12:35 +0000 (09:12 +0200)]
build: update .gitignore files

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: fix make distcheck
Fabio M. Di Nitto [Tue, 28 Aug 2012 07:10:34 +0000 (09:10 +0200)]
build: fix make distcheck

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: make path to bash configurable at build time
Fabio M. Di Nitto [Tue, 28 Aug 2012 07:04:21 +0000 (09:04 +0200)]
build: make path to bash configurable at build time

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: order library install to make sure libsam can relink against libcmap
Fabio M. Di Nitto [Mon, 27 Aug 2012 15:05:18 +0000 (17:05 +0200)]
build: order library install to make sure libsam can relink against libcmap

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: fix usage of sed and drop build-aux/genman
Fabio M. Di Nitto [Mon, 27 Aug 2012 14:56:57 +0000 (16:56 +0200)]
build: fix usage of sed and drop build-aux/genman

"sed -i" is a GNU specific extention.

Replace with more portable version and drop completely genman
in favour of a make rule.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agotest: fix testcpg build on FreeBSD9
Fabio M. Di Nitto [Mon, 27 Aug 2012 14:55:42 +0000 (16:55 +0200)]
test: fix testcpg build on FreeBSD9

HOST_NAME_MAX is intentionally NOT defined on BSD.

Users of HOST_NAME_MAX should be using sysconf or use very
conservative values.

limits.h still defines _POSIX_HOST_NAME_MAX. use that instead.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: respect watchdog conditional when building corosync exec
Fabio M. Di Nitto [Mon, 27 Aug 2012 14:54:50 +0000 (16:54 +0200)]
build: respect watchdog conditional when building corosync exec

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agocommon_lib: make it build on FreeBSD 9 and Mac OS X
Fabio M. Di Nitto [Tue, 28 Aug 2012 13:04:42 +0000 (15:04 +0200)]
common_lib: make it build on FreeBSD 9 and Mac OS X

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: use libtool for linking
Fabio M. Di Nitto [Thu, 23 Aug 2012 08:12:23 +0000 (10:12 +0200)]
build: use libtool for linking

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agobuild: cleanup configure.ac
Fabio M. Di Nitto [Wed, 22 Aug 2012 07:05:34 +0000 (09:05 +0200)]
build: cleanup configure.ac

sort different sections in more logical way and add check for sed
plus a few missing headers/functions

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