]> git.proxmox.com Git - mirror_corosync.git/log
mirror_corosync.git
12 years agoLOG: be more explict about the qb file names
Angus Salkeld [Tue, 29 May 2012 00:27:30 +0000 (10:27 +1000)]
LOG: be more explict about the qb file names

else we can get messages been put in the wrong subsys.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoLOG: drop the number of logging subsystems from 64 to 32
Angus Salkeld [Tue, 29 May 2012 00:25:52 +0000 (10:25 +1000)]
LOG: drop the number of logging subsystems from 64 to 32

Currently 14 are used, 64 seems like a waste of memory.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoCorrect the description of bindnetaddr config parameter in manpage
Barney Desmond [Thu, 24 May 2012 05:31:02 +0000 (15:31 +1000)]
Correct the description of bindnetaddr config parameter in manpage

bindnetaddr has been wrongly described in the past, and did not
document that fact that it will also accept exact address matches.

Signed-off-by: Barney Desmond <barney.desmond@anchor.net.au>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agototemip: Support bind to exact address
Jan Friesse [Wed, 23 May 2012 13:21:13 +0000 (15:21 +0200)]
totemip: Support bind to exact address

Logic for binding now works in following way:
- Try to find exact match
- If not exact match is found, use first found network address

This allows set concrete IP even if network settings contains two IPs on
same network.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agototemip: insert items in correct order
Jan Friesse [Wed, 23 May 2012 10:48:42 +0000 (12:48 +0200)]
totemip: insert items in correct order

list_add_tail is used instead of list_add so ip addresses are inserted
in same order as returned by getifaddrs.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoinit: major cleanup v2.0.1
Fabio M. Di Nitto [Mon, 21 May 2012 12:43:37 +0000 (14:43 +0200)]
init: major cleanup

- rename generic.in and notifyd.in to corosync.in and corosync-notifyd.in
  (makes build simpler)
- fix sysvinit corosync.in sleep time to include a check for when IPC
  are ready and drop cman bits (there is no cman with corosync 2.0)
- corosync-notifyd.service should always start after corosync.service
- corosync.service should always start after network
- corosync.service uses init script wrapper
- install/ship sysvinit as wrappers for systemd in /usr/share/corosync
  when necessary
- change the build system to deal with all of the above

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoInclude ringid in processor joined log message
Jan Friesse [Thu, 10 May 2012 07:53:24 +0000 (09:53 +0200)]
Include ringid in processor joined log message

This should help correlate syslog entires with their blackbox
counterparts.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Andrew Beekhof <andrew@beekhof.net>
12 years agoUpdate TODO file
Jan Friesse [Tue, 15 May 2012 14:42:10 +0000 (16:42 +0200)]
Update TODO file

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoImprove testcpg to handle change of node identity
Dan Clark [Thu, 26 Apr 2012 06:56:57 +0000 (08:56 +0200)]
Improve testcpg to handle change of node identity

Signed-off-by: Dan Clark <2clarkd@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoicmap: don't leak memory when changing ro/rw status on a key
Fabio M. Di Nitto [Mon, 23 Apr 2012 11:52:59 +0000 (13:52 +0200)]
icmap: don't leak memory when changing ro/rw status on a key

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoicmap: fix a valgrind errors (pass 1)
Fabio M. Di Nitto [Mon, 23 Apr 2012 11:49:26 +0000 (13:49 +0200)]
icmap: fix a valgrind errors (pass 1)

clean up a lot of allocated blocks at exit.
those changes has no runtime effects, but it makes valgrind
output a bit more useful by dropping over 700 errors/warnings to skip
over every single run.

there are still a few icmap related valgrind errors but those need
some more complex and timeconsuming investigation.

pre patch:

==21844== HEAP SUMMARY:
==21844==     in use at exit: 1,229,321 bytes in 1,516 blocks
==21844==   total heap usage: 7,191 allocs, 5,675 frees, 3,819,853 bytes allocated

==21844== LEAK SUMMARY:
==21844==    definitely lost: 3,617 bytes in 11 blocks
==21844==    indirectly lost: 21,960 bytes in 11 blocks
==21844==      possibly lost: 1,080,101 bytes in 131 blocks
==21844==    still reachable: 123,643 bytes in 1,363 blocks
==21844==         suppressed: 0 bytes in 0 blocks

==21844== ERROR SUMMARY: 136 errors from 136 contexts (suppressed: 0 from 0)

post patch:

==25793== HEAP SUMMARY:
==25793==     in use at exit: 1,185,870 bytes in 808 blocks
==25793==   total heap usage: 9,427 allocs, 8,619 frees, 4,156,841 bytes allocated

==25793== LEAK SUMMARY:
==25793==    definitely lost: 3,697 bytes in 12 blocks
==25793==    indirectly lost: 22,248 bytes in 13 blocks
==25793==      possibly lost: 1,079,655 bytes in 113 blocks
==25793==    still reachable: 80,270 bytes in 670 blocks
==25793==         suppressed: 0 bytes in 0 blocks

==25793== ERROR SUMMARY: 119 errors from 119 contexts (suppressed: 0 from 0)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agocrypto init: release *_slot resource after init
Fabio M. Di Nitto [Thu, 19 Apr 2012 09:58:48 +0000 (11:58 +0200)]
crypto init: release *_slot resource after init

Those are only used at init phase and we can free some memory for the system.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoipcs: allow connections only after all services are ready
Fabio M. Di Nitto [Mon, 16 Apr 2012 11:39:03 +0000 (13:39 +0200)]
ipcs: allow connections only after all services are ready

this fixes a rather annoying race condition at startup where a client
connects to corosync "too fast" before the service is ready to operate
and client gets some random data during initialization phase.

With this fix, we allow connections to ipc only after the main engine
is operational and configured (and after the first totem transition).

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoAlways allocate totemrrp stats array v2.0.0
Jan Friesse [Fri, 6 Apr 2012 10:12:21 +0000 (12:12 +0200)]
Always allocate totemrrp stats array

This prevents segfault when rrp mode is set with only one ring.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoProperly parse uidgid files
Jan Friesse [Thu, 5 Apr 2012 15:37:48 +0000 (17:37 +0200)]
Properly parse uidgid files

Full path to key is now tested rather then key name only.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agobuild: improve systemd service file handling
Fabio M. Di Nitto [Wed, 4 Apr 2012 11:08:19 +0000 (13:08 +0200)]
build: improve systemd service file handling

this solves the issue of having to special case before and after usrmove

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoRemove info pages see also from cmapctl man
Jan Friesse [Thu, 5 Apr 2012 11:55:43 +0000 (13:55 +0200)]
Remove info pages see also from cmapctl man

Corosync doesn't have documentation in info format, so information is
corosync-cmapctl was not true.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd man page with CMAP keys created by corosync
Jan Friesse [Thu, 5 Apr 2012 09:24:42 +0000 (11:24 +0200)]
Add man page with CMAP keys created by corosync

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoCheck before making a reference to __start___verbose
Angus Salkeld [Thu, 5 Apr 2012 13:41:11 +0000 (23:41 +1000)]
Check before making a reference to __start___verbose

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoconf: add quorum section to example config
Fabio M. Di Nitto [Tue, 3 Apr 2012 07:40:20 +0000 (09:40 +0200)]
conf: add quorum section to example config

document only the provider option since all the others
(votes/expected_votes/etc) are provider specific.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoOnly call qb_ipcc_disconnect when the instance is fully dereferenced.
Angus Salkeld [Tue, 3 Apr 2012 06:03:07 +0000 (16:03 +1000)]
Only call qb_ipcc_disconnect when the instance is fully dereferenced.

Sometimes calling xyz_finilize() within a dispatch would
cause a crash because the qb_ipcc_disconnect actually
disconnects immediatly and frees it't memory. whereas
the corosync structure is reference counted. So this
makes use of the reference counting to only call
qb_ipcc_disconnect when it is fully dereferenced.

Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoConvert udpu example to use nodelist v1.99.9
Jan Friesse [Tue, 27 Mar 2012 10:02:45 +0000 (12:02 +0200)]
Convert udpu example to use nodelist

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agototemcrypt: fix build warning (unused variable)
Fabio M. Di Nitto [Tue, 27 Mar 2012 10:06:46 +0000 (12:06 +0200)]
totemcrypt: fix build warning (unused variable)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agototemcrypto: major code cleanup (no functional or onwire changes)
Fabio M. Di Nitto [Tue, 27 Mar 2012 09:22:33 +0000 (11:22 +0200)]
totemcrypto: major code cleanup (no functional or onwire changes)

- cleanup include list
- reorder code and functions (crypto then hash)
- split crypt/decrypt/hash functions
- some micro optimizations by dropping a few memcpy
- make the code more readable (better var names and buffers mapping)
- improve exit paths on error (return codes and free)
- store crypto header size instead of recalculating it per packet

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoMake ifaces_get work with dynamic no_rings
Jan Friesse [Mon, 26 Mar 2012 08:30:20 +0000 (10:30 +0200)]
Make ifaces_get work with dynamic no_rings

Commit which added number of addresses to srp_address structure didn't
count with totemsrp_ifaces_get where whole structure was copied instead
of addresses only. This is now fixed.

Also to make API totempg forward compatible, size of interfaces array
must be passed to ifaces_get like functions to prevent memory overwrite.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoAdd no_addrs field in srp_addr structure
Jan Friesse [Tue, 20 Mar 2012 12:52:43 +0000 (13:52 +0100)]
Add no_addrs field in srp_addr structure

This should allow us future change to dynamic number of rings without
breaking wire compatibility.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoReflect config changes for crypto in examples v1.99.8
Jan Friesse [Fri, 16 Mar 2012 09:23:18 +0000 (10:23 +0100)]
Reflect config changes for crypto in examples

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoMark few more icmap keys as read only
Jan Friesse [Fri, 16 Mar 2012 08:26:21 +0000 (09:26 +0100)]
Mark few more icmap keys as read only

Also most of the key settings are now centralized in one function, so
it's easier to audit.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoMake common_lib version independand on totem_pg
Jan Friesse [Thu, 15 Mar 2012 15:22:50 +0000 (16:22 +0100)]
Make common_lib version independand on totem_pg

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agocrypto: Remove sha224 and add md5 hash
Jan Friesse [Thu, 15 Mar 2012 15:09:01 +0000 (16:09 +0100)]
crypto: Remove sha224 and add md5 hash

SHA224 is not supported on RHEL6 and also it's kind of weird. Instead of
that, md5 can now be configured.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoUpdate crypto_set API
Jan Friesse [Thu, 15 Mar 2012 15:01:47 +0000 (16:01 +0100)]
Update crypto_set API

Also few leftovers from cfg is removed and version of totempg is
increased to 5 to reflect all changes we made

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agocrypto: allocate padding in crypto_header
Fabio M. Di Nitto [Thu, 15 Mar 2012 10:56:10 +0000 (11:56 +0100)]
crypto: allocate padding in crypto_header

while it might seem a waste of space by using 2 extra bytes in
the crypto_config_header, it actually gives us the option
to grow "unknown at this time" features without hopefully
breaking onwire compat

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agocrypto: add new hashing methods and fix config defaults
Fabio M. Di Nitto [Thu, 15 Mar 2012 09:42:57 +0000 (10:42 +0100)]
crypto: add new hashing methods and fix config defaults

add support for sha224/256/384/512

change config defaults to match coroparse and totemconfig

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoDocument crypto_hash and crypto_cipher options
Jan Friesse [Thu, 15 Mar 2012 09:28:44 +0000 (10:28 +0100)]
Document crypto_hash and crypto_cipher options

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agocrypto: change network packets and add dynamic crypto header/data
Fabio M. Di Nitto [Wed, 14 Mar 2012 14:32:01 +0000 (15:32 +0100)]
crypto: change network packets and add dynamic crypto header/data

The new network packet will look:

struct crypto_config_header * that provides info on crypto/hashing
hash_block[size based on hashing function] (if hash is selected)
salt[SALT_SIZE] (if crypto is selected)
...data...

and we kill the concept of crypto_security_header completely since
values are now dynamic for hash_block_size.

the reason why hash_block needs to be there, is because we do
hash salt in case both hashing and crypto are selected.

the crypto_config_header is totally transparent to totem
and to any underlaying crypto functions.

as we go cleaning, also use HASH_BLOCK_SIZE to generate hash_block.
the input buffer and output buffer size are dependent on the algo
used to hash.

we can now determine the real header size and adjust net_mtu properly
at startup. This will allow in future to use any algorithm since
size is dynamic.

some part of the code still needs some polishing to make it more
readable (specially the mapping of pointers into the packet
is still a bit obscure).

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agototem: don't send garbage onwire if we fail to crypt
Fabio M. Di Nitto [Wed, 14 Mar 2012 12:08:03 +0000 (13:08 +0100)]
totem: don't send garbage onwire if we fail to crypt

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agocrypto: add crypto config to network data
Fabio M. Di Nitto [Wed, 14 Mar 2012 11:08:21 +0000 (12:08 +0100)]
crypto: add crypto config to network data

this add 2 bytes at the end of the each packet to propagate
config info.

in case there is a config mismatch packet must be rejected.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agocrypto: drop secauth and make crypto none work again
Fabio M. Di Nitto [Wed, 14 Mar 2012 09:50:17 +0000 (10:50 +0100)]
crypto: drop secauth and make crypto none work again

keep totem.secauth config key for compatibility

if the key is NOT set, crypto will default to aes256/sha1
if the key is set to "off", crypto is disabled.
this reflects pretty much old behavior

keywords totem.crypto_cipher and totem.crypto_hash can
override secauth individually.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoParse and use hash and crypto from config file
Jan Friesse [Tue, 13 Mar 2012 16:22:39 +0000 (17:22 +0100)]
Parse and use hash and crypto from config file

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoRename totemcrypto
Jan Friesse [Tue, 13 Mar 2012 15:12:21 +0000 (16:12 +0100)]
Rename totemcrypto

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agocrypto: mask the crypto operations from totem packet size management
Fabio M. Di Nitto [Tue, 13 Mar 2012 14:30:38 +0000 (15:30 +0100)]
crypto: mask the crypto operations from totem packet size management

totem doesn't need to understand what crypto does.

totem needs to be able to tell crypto: "those are data, play with them"
and crypto needs to return: "here are your scrambled data and the new size"

similar to decrypt/verify.

this way we add enough dynamic within crypto to change header size and all
at any given time (for different hash algorithm for example) without
affecting on wire compat.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoonecrypt: move encryption code to crypto.c
Jan Friesse [Tue, 13 Mar 2012 10:34:33 +0000 (11:34 +0100)]
onecrypt: move encryption code to crypto.c

This will remove duplicity of code.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agocfg: remove crypto_set
Jan Friesse [Tue, 13 Mar 2012 08:36:55 +0000 (09:36 +0100)]
cfg: remove crypto_set

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agocorosync-cfgtool: Remove set of cryptography
Jan Friesse [Tue, 13 Mar 2012 08:30:51 +0000 (09:30 +0100)]
corosync-cfgtool: Remove set of cryptography

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoRemove libtomcrypt
Jan Friesse [Mon, 12 Mar 2012 15:46:51 +0000 (16:46 +0100)]
Remove libtomcrypt

Tomcrypt in corosync is for long time not updated. Because we have
support for libnss, libtomcrypt can be removed.

Also few leftovers (AES is 256 bits, not 128, ...) are removed.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agodrop evs service
Fabio M. Di Nitto [Sun, 11 Mar 2012 06:50:58 +0000 (07:50 +0100)]
drop evs service

there are several reasons for this:

1) evs is only partially implemented with no plans to complete it

typedef enum {
       EVS_TYPE_UNORDERED, /* not implemented */
       EVS_TYPE_FIFO,          /* same as agreed */
       EVS_TYPE_AGREED,
       EVS_TYPE_SAFE           /* not implemented */
} evs_guarantee_t;

2) evs has no users in any upstream distribution and no search
   engine can find any other upstream using it.

3) the only reason (I was told) to carry around evs was that evs
   receives the full ring_id struct from totem. This is only
   partially correct because while the structures are prepared
   to carry around those data, they are never transmitted from
   corosync engine down the IPC line to the user.
   CPG ring_id contains the exact same information and it's
   actually less buggy (due to prototying of the info).

worst case scenario where a user really absolutely need libevs,
it can be easily reimplemented as libcpg wrapper and avoid
lots of code duplication.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agobuild: drop another leftover from the past
Fabio M. Di Nitto [Sun, 11 Mar 2012 08:21:18 +0000 (09:21 +0100)]
build: drop another leftover from the past

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agobuild: drop obsoleted SOCKETDIR option
Fabio M. Di Nitto [Sun, 11 Mar 2012 08:02:44 +0000 (09:02 +0100)]
build: drop obsoleted SOCKETDIR option

yet another leftover from the past that can go away

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agobuild: drop last LCRSO references
Fabio M. Di Nitto [Sun, 11 Mar 2012 07:55:15 +0000 (08:55 +0100)]
build: drop last LCRSO references

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agopload: make it a test service and not a public one
Fabio M. Di Nitto [Sat, 10 Mar 2012 15:59:14 +0000 (16:59 +0100)]
pload: make it a test service and not a public one

pload is a performance benchmark that measures the onwire
speed of corosync.

problem is that once pload has been executed, the cluster
is basically dead.

turn pload into a test tool, by removing corosync-pload tool
and user library.

cleanup pload code to make it more readable and drop lots
of unnecessary stuff.

add test/ploadstart tool that can configure and start pload
via cmap calls.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agototem: drop crypt_accept: concept/option
Fabio M. Di Nitto [Fri, 9 Mar 2012 12:54:12 +0000 (13:54 +0100)]
totem: drop crypt_accept: concept/option

this was another old onwire compat mode that is not useful anylonger.

we can safely move the new model by default.

According to Honza (real hardware 1 node testing) there are no
performance impact.

My tests (8 nodes VM cluster), there is up to 10/12% performance
improvements up to 1M packet size where old and new models are equal.

As a side note, nss still shows to be a performance loss on both
real and virtual hw (without any kind of nss hw acceleration).

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoFix typo in stats key name.
Angus Salkeld [Fri, 9 Mar 2012 02:59:35 +0000 (13:59 +1100)]
Fix typo in stats key name.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoRemove unused function logsys_priority_name_get()
Angus Salkeld [Wed, 7 Mar 2012 23:40:28 +0000 (10:40 +1100)]
Remove unused function logsys_priority_name_get()

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoAdd pid, hostname and process name to the logfile
Angus Salkeld [Wed, 7 Mar 2012 23:37:05 +0000 (10:37 +1100)]
Add pid, hostname and process name to the logfile

Note this is only for file targets not stderr or syslog.

https://bugzilla.redhat.com/show_bug.cgi?id=789925

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agodrop last references to compatibility: whitetank
Fabio M. Di Nitto [Fri, 9 Mar 2012 10:38:54 +0000 (11:38 +0100)]
drop last references to compatibility: whitetank

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoutils: cleanup main daemon exit codes
Fabio M. Di Nitto [Fri, 9 Mar 2012 09:46:50 +0000 (10:46 +0100)]
utils: cleanup main daemon exit codes

some of them are not in use anymore and can be dropped.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agosync: kill evil and syncv1 in one shot
Fabio M. Di Nitto [Fri, 9 Mar 2012 09:36:27 +0000 (10:36 +0100)]
sync: kill evil and syncv1 in one shot

this change breaks onwire compatibility.

cpg is the only user of sync_* interface and it's the only
service that will require extra testing.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoman: Add cmap pages to index.html v1.99.7
Jan Friesse [Mon, 5 Mar 2012 15:50:59 +0000 (16:50 +0100)]
man: Add cmap pages to index.html

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoman: Add description of cpg_iteration_* functions
Jan Friesse [Mon, 5 Mar 2012 15:42:05 +0000 (16:42 +0100)]
man: Add description of cpg_iteration_* functions

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoman: Fix cmap_iter_finalize typo
Jan Friesse [Mon, 5 Mar 2012 14:06:14 +0000 (15:06 +0100)]
man: Fix cmap_iter_finalize typo

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoTreat ENOMSG as TRY_AGAIN.
Angus Salkeld [Mon, 5 Mar 2012 11:10:02 +0000 (22:10 +1100)]
Treat ENOMSG as TRY_AGAIN.

ENOMSG is returned by the ringbuffer when you attempt to read
a message and there is nothing there to read.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd common IPC errors.
Angus Salkeld [Mon, 5 Mar 2012 11:05:08 +0000 (22:05 +1100)]
Add common IPC errors.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoquorumtool: improve display of status data
Fabio M. Di Nitto [Mon, 5 Mar 2012 12:12:55 +0000 (13:12 +0100)]
quorumtool: improve display of status data

always display membership data from the local node

display when a node is unknown to the local node instead of an error
from IPC.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: move last malloc/alloca buf to static
Fabio M. Di Nitto [Mon, 5 Mar 2012 11:47:02 +0000 (12:47 +0100)]
votequorum: move last malloc/alloca buf to static

this should guarantee that votequorum won't fail under high memory
pressure. Price is 3500 bytes extra preallocated at startup.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: fix node allocation memory leak
Fabio M. Di Nitto [Mon, 5 Mar 2012 11:39:54 +0000 (12:39 +0100)]
votequorum: fix node allocation memory leak

stop using malloc for each new node, because we cannot free the memory
easily. Move to a static allocated buffer that can contain
PROCESSOR_MAX + qdevice cluster_node instead.

We can never have more than PROCESSOR_MAX nodes anyway and the memory
footprint is small enough compared to memory leaks (those can
effectively happen only in very dynamic clusters with tons of different
nodes joining/leaveing with different nodeids).

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: rename leave_remove to allow_downscale
Fabio M. Di Nitto [Fri, 2 Mar 2012 09:56:07 +0000 (10:56 +0100)]
votequorum: rename leave_remove to allow_downscale

pointed out that leave_remove can be easily confused with the old
cman leave_remove behavior. The two are substantially different
and we need to avoid confusion both for users and our support team.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: fix handling of config updates
Fabio M. Di Nitto [Fri, 2 Mar 2012 10:10:22 +0000 (11:10 +0100)]
votequorum: fix handling of config updates

cmap changes are local to the node only and should not be broadcasted
as configuration changes.

if any change has happened to us, we will inform other nodes via
send_nodeinfo.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: free our data and lists on exit
Fabio M. Di Nitto [Fri, 2 Mar 2012 09:07:10 +0000 (10:07 +0100)]
votequorum: free our data and lists on exit

this is mostly to avoid valgrind errors on exit and make the output
more readable.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: disallow special features vs qdevice
Fabio M. Di Nitto [Thu, 1 Mar 2012 13:42:01 +0000 (14:42 +0100)]
votequorum: disallow special features vs qdevice

simply taking the safest path here since integration of qdevice is not
fully complete

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: fix node check based on reconfig parameter
Fabio M. Di Nitto [Thu, 1 Mar 2012 12:46:49 +0000 (13:46 +0100)]
votequorum: fix node check based on reconfig parameter

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: make a common function to calculate votes and cluster members
Fabio M. Di Nitto [Thu, 1 Mar 2012 11:01:56 +0000 (12:01 +0100)]
votequorum: make a common function to calculate votes and cluster members

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: incorporate static config into dynamic
Fabio M. Di Nitto [Thu, 1 Mar 2012 10:36:42 +0000 (11:36 +0100)]
votequorum: incorporate static config into dynamic

no functional changes or extra features yet

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: move all configuration in votequorum_readconfig
Fabio M. Di Nitto [Thu, 1 Mar 2012 10:14:23 +0000 (11:14 +0100)]
votequorum: move all configuration in votequorum_readconfig

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: start moving from static to fully dynamic config
Fabio M. Di Nitto [Thu, 1 Mar 2012 09:59:41 +0000 (10:59 +0100)]
votequorum: start moving from static to fully dynamic config

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: disallow wait_for_all and qdevice operations
Fabio M. Di Nitto [Thu, 1 Mar 2012 09:37:27 +0000 (10:37 +0100)]
votequorum: disallow wait_for_all and qdevice operations

The problem here is that user expectations, when using both modes
at the same time, have not been set yet. There are 2/3 options
that need investigation.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agovotequorum: improve debugging output
Fabio M. Di Nitto [Wed, 29 Feb 2012 09:40:23 +0000 (10:40 +0100)]
votequorum: improve debugging output

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agoAlways set interface_up in totemip_iface_check
Jan Friesse [Thu, 1 Mar 2012 15:39:06 +0000 (16:39 +0100)]
Always set interface_up in totemip_iface_check

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agovotequorum: fix node->flags type when receiving nodeinfo messages
Fabio M. Di Nitto [Wed, 29 Feb 2012 08:37:35 +0000 (09:37 +0100)]
votequorum: fix node->flags type when receiving nodeinfo messages

old_flags was set to uint16_t but it needs to be uint32_t.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agovotequorum: fix segfault in wfa status update
Fabio M. Di Nitto [Wed, 29 Feb 2012 07:53:28 +0000 (08:53 +0100)]
votequorum: fix segfault in wfa status update

this is a regression introduced by cb5fd775

when reading static config us->flags does not exists yet and therefor
setting it will cause a segfault.

Move the settings after cluster_node *us is created, with the long
term plan to simply kill the whole _static readconfig bits
in favour of dynamic (runtime changeable) bits.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoquorumtool: improve Membership information output v1.99.6
Fabio M. Di Nitto [Tue, 28 Feb 2012 10:26:54 +0000 (11:26 +0100)]
quorumtool: improve Membership information output

align nodeid, votes and name to make it all more readable

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agoquorumtool: make output more human friendly and retain machine parsable bits
Fabio M. Di Nitto [Tue, 28 Feb 2012 09:42:48 +0000 (10:42 +0100)]
quorumtool: make output more human friendly and retain machine parsable bits

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agoquorumtools: fix typo in man page
Fabio M. Di Nitto [Tue, 28 Feb 2012 09:03:18 +0000 (10:03 +0100)]
quorumtools: fix typo in man page

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agoquorumtools: drop unused option parsing
Fabio M. Di Nitto [Tue, 28 Feb 2012 09:03:01 +0000 (10:03 +0100)]
quorumtools: drop unused option parsing

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agoquorumtool: fix version display info
Fabio M. Di Nitto [Tue, 28 Feb 2012 09:01:13 +0000 (10:01 +0100)]
quorumtool: fix version display info

we don't need that on every run

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
12 years agoquorumtool: swap node state and node votes output
Fabio M. Di Nitto [Mon, 27 Feb 2012 09:41:41 +0000 (10:41 +0100)]
quorumtool: swap node state and node votes output

there is no point to show the votes if the node is dead

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agovotequorum: fix votequorum_getinfo man page and align struct name
Fabio M. Di Nitto [Mon, 27 Feb 2012 09:40:41 +0000 (10:40 +0100)]
votequorum: fix votequorum_getinfo man page and align struct name

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoquorumtool: update man page and help text
Fabio M. Di Nitto [Mon, 27 Feb 2012 09:10:15 +0000 (10:10 +0100)]
quorumtool: update man page and help text

improve error output since this is more than a debugging tool now

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agovotequorum: major rework to fix qdevice API and integration with core
Fabio M. Di Nitto [Thu, 23 Feb 2012 10:01:53 +0000 (11:01 +0100)]
votequorum: major rework to fix qdevice API and integration with core

qdevice is a very special node in the cluster and it adds a certain
amount of complexity and special cases across the code.

most of the qdevice data are shared across the cluster (name/votes)
but effectively each node has a different view of the qdevice
(registered/unregistered/voting/etc.)

with this change, we align the qdevice view across the node,
exchanging more data between nodes and we fix how qdevice behaves
and it is configured.

The only side effect is that the amount of data transmitted on wire
is slightly higher.

The qdevice API is still disabled by default. This means that
the amount of real changes in current code are a lot smaller
than it appears by this patch.

TODO: documentation/man pages needs to be updated once
      this change is in (and behavior finalized).

User visible changes:

- configuration (coroparse, exec/votequorum):
  the quorum device section is now standalone within the quorum.

  quorum {
    provider: corosync_votequorum
    device {
      model: (name)
      timeout: (millisec)
      votes:
    }
  }

  the keyword "model:" is mandatory to enable qdevice in configuration
  and should express the name of the script/daemon that will provide
  the qdevice. Looking into the future, an init script or systemd
  service will look for that name in /path/to/be/decided/name
  and start/stop qdevice.

  timeout: defines the maximum interval the qdevice implementation
  has available between poll (see votequorum_qdevice_poll.3) before
  the device is considered dead and votes discarded

  votes: is now a configuration parameter and not an API call.
  quorum devices don't care what they need to vote.
  votes is autocalculated when a nodelist is available and all
  nodes in the list vote 1. Otherwise this parameter is mandatory.

- configuration (exec/votequorum):
  startup and runtime configuration changes have been improved.
  errors at startup are considered fatal. errors at runtime
  have different exit paths.

  startup:

  * quorum.two_node and qdevice are incompatible.
  * quorum.expected_votes requires quorum.device.votes.
  * quorum.expected_votes - quorum.device.votes cannot be lower
    than 2.
  * qdevice and last_man_standing are mutually exclusive.
  * qdevice and auto_tie_breaker are mutually exclusive.

  runtime config changes:

  * quorum.two_node and qdevice are incompatible:
    if quorum device is alive, two_node is disabled.
    if quorum device is not alive and node count is 2, two_node is
       enabled, and quorum device cannot be registered

  * if either last_man_standing or auto_tie_breaker were enabled
    at startup, and at runtime quorum device is configured,
    quorum device registration will be blocked.

  * if quorum.expected_votes is configured but not quorum.device.votes,
    quorum device registration will be blocked.

  * if quorum.device.votes is not configured and we cannot
    automatically calculate it, quorum device registration will be blocked.

  * An error in configuring quorum.expected_votes and quorum.device.votes
    will block quorum device registration.

blocking quorum device registation, also means dropping the votes.

quorum.device.votes (either set or automatically calculated) is now
used to determine current expected_votes in the cluster.

- logging (exec/votequorum):

  all errors from configuration are treated as WARNING/CRITICAL.

  lots of extra DEBUG output is added (see internal changes too).

- corosync-quorumtool (tools/corosync-quorumtool):

  * added option to forcefully kick out a quorum device from the local
    node. This is for emergency recovery only and it is only
    available when qdevice API is built-in.

  * Improved status output, specifically add node state and qdevice
    information

[root@fedora-master-node2 coro]# corosync-quorumtool -s
Version:          1.99.4.12-9c7d-dirty
Quorum type:      corosync_votequorum
Nodes:            2
Ring ID:          132
Quorate:          Yes
Node votes:       1
Node state:       Member
Expected votes:   3
Highest expected: 3
Total votes:      3
Quorum:           2
Flags:            Quorate Qdevice
Nodeid     Votes  Name
   1     1  fedora-master-node1.int.fabbione.net
   2     1  fedora-master-node2.int.fabbione.net
   0     1  QDEVICE (Voting)

  * allow to print status for any node in the cluster known to
    local node.

[root@fedora-master-node1 coro]# corosync-quorumtool -s
Version:          1.99.4.12-9c7d-dirty
Quorum type:      corosync_votequorum
Nodes:            2
Ring ID:          144
Quorate:          Yes
Node votes:       1
Node state:       Member
Expected votes:   3
Highest expected: 3
Total votes:      2
Quorum:           2
Flags:            Quorate
Nodeid     Votes  Name
   1     1  fedora-master-node1.int.fabbione.net
   2     1  fedora-master-node2.int.fabbione.net

[root@fedora-master-node1 coro]# corosync-quorumtool -s -n 2
Version:          1.99.4.12-9c7d-dirty
Quorum type:      corosync_votequorum
Nodes:            2
Ring ID:          144
Quorate:          Yes
Node votes:       1
Node state:       Member
Expected votes:   3
Highest expected: 3
Total votes:      3
Quorum:           2
Flags:            Quorate Qdevice
Nodeid     Votes  Name
   1     1  fedora-master-node1.int.fabbione.net
   2     1  fedora-master-node2.int.fabbione.net
         0     1  QDEVICE (Voting)

Internal changes:

- change qdevice timer to not run all time, but only when necessary.
- change votequorum_nodeinfo on wire data to use flags instead of uint8_t
  and add QDEVICE status.
- allocate nodeid 0 to qdevice since it's the only real
  nodeid that be reserved.
- change send_nodeinfo to allow to send nodeinfo for any node
  so that we can share qdevice info across the cluster
  (and this might be useful in future if we need to sync
   internal cluster view).
- add votequorum api call to update qdevice name
- add runtime data if quorum device has been forcefully disabled
  by config error
- add qdevice votes to expected_votes calculation (this
  is probably the biggest difference vs cman)
- change votequorum_read_nodelist_configuration so that
  we can autocalculate votes for qdevice (we need the nodecount
  vs votes).
- add all checks for startup/runtime config (see above).
- do not make qdevice part of the membership_list received from
  totem. None of our users care about it and it is not a real node.
- change onwire message handlers to deal with "data for this node from any node"
  case and undersand nodeid 0 for qdevice info
- always allocate qdevice at startup. this simplifies code a lot.
- dispatch qdevice nodeinfo on membership changes.
- inform libvotequorum users when a qdevice is registered
- improve substantially qdevice api and add a simple
  barrier based on qdevice name.
- add qdevice API barrier at cluster level. This feature allow
  only one qdevice name to be active in the cluster at any time.
- qdevice getinfo can now report status for qdevice on any node.
- change slightly the way the qdevice API is built-in/out:
  only the libvotequorum calls are #ifdef'out now. Doing so in
  the core is too complex and would make the code unreadable
  with the risk of missing a bit or two effectively introducing
  an on-wire incompatibility if we will ever turn the API on.
- probably added some bugs on the way...

TODO: update qdevice_* API once the above is settled and test
      qdevice integration with other features.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com> (only second part)
12 years agobuild: fix fallout from swithing to common shared lib v1.99.5
Fabio M. Di Nitto [Wed, 22 Feb 2012 08:05:14 +0000 (09:05 +0100)]
build: fix fallout from swithing to common shared lib

when building corosync on a clean system or for the very first
time, corosync_common needs to be visible both via -L for link
and for the LD_PATH, otherwise the linker cannot resolve
normal library dependencies.

This issue does NOT affect corosync users, but it's confined
to internal corosync only.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoDocument SAM_RECOVERY_POLICY_CMAP
Jan Friesse [Fri, 17 Feb 2012 11:05:49 +0000 (12:05 +0100)]
Document SAM_RECOVERY_POLICY_CMAP

Also all irelevant references for SAM_RECOVERY_POLICY_CONFDB are
corrected.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoTweak nodeid warning
Jan Friesse [Fri, 17 Feb 2012 10:59:59 +0000 (11:59 +0100)]
Tweak nodeid warning

Nodeid warning now appears only when both totem.nodeid and nodelist
nodeid exists. When nodelist nodeid is not defined, totem.nodeid is
used.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agospec: Add optional xmlconf
Jan Friesse [Tue, 21 Feb 2012 11:40:36 +0000 (12:40 +0100)]
spec: Add optional xmlconf

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoiba: Use configured node id
Jan Friesse [Tue, 21 Feb 2012 13:30:35 +0000 (14:30 +0100)]
iba: Use configured node id

Corosync was ignoring nodeid for iba transport and always used
autogenerated one.

Original patch by: Jason Dillaman <jdillama@redhat.com>
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoConvert the common lib into a shared lib.
Angus Salkeld [Tue, 21 Feb 2012 09:26:08 +0000 (20:26 +1100)]
Convert the common lib into a shared lib.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoAllow autoconfiguration of interface section
Jan Friesse [Wed, 15 Feb 2012 16:04:25 +0000 (17:04 +0100)]
Allow autoconfiguration of interface section

Thanks to totemip_getifaddrs infrastructure it's now possible to use
nodelist informations to autoconfigure interface bindnetaddr. Together
with cluster_name, interface section can be completely omitted.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agototemconfig: ensure suffix for ringX_addr
Jan Friesse [Wed, 15 Feb 2012 16:00:25 +0000 (17:00 +0100)]
totemconfig: ensure suffix for ringX_addr

Patch makes sure, that ringX_addr key has really _addr suffix.
Previously, it was possible to enter ringXanything and it was
interpreted as ringX_addr.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agocmap: Handle NULL in [i]cmap_set_string value
Jan Friesse [Wed, 15 Feb 2012 15:59:19 +0000 (16:59 +0100)]
cmap: Handle NULL in [i]cmap_set_string value

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoCreate solaris specific getifaddrs
Jan Friesse [Wed, 15 Feb 2012 12:45:53 +0000 (13:45 +0100)]
Create solaris specific getifaddrs

This not only makes possible to use generic totemip_iface_check, but
also fixes some problems with previous implementation (fixed mask, not
very well supported ipv6, ...)

Tested on OpenIndiana 151a

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd totemip_iface_check based on totemip_getifaddrs
Jan Friesse [Wed, 15 Feb 2012 10:48:23 +0000 (11:48 +0100)]
Add totemip_iface_check based on totemip_getifaddrs

Also Linux and BSD/Darwin specific bits are no longer needed, so they
are gone.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd generic implementation of getifaddrs
Jan Friesse [Wed, 15 Feb 2012 09:47:22 +0000 (10:47 +0100)]
Add generic implementation of getifaddrs

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>