]> git.proxmox.com Git - mirror_corosync.git/log
mirror_corosync.git
12 years agovotequorum: update man pages
Fabio M. Di Nitto [Thu, 12 Jan 2012 14:39:29 +0000 (15:39 +0100)]
votequorum: update man pages

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agovotequorum: lower quorum change logging
Fabio M. Di Nitto [Thu, 12 Jan 2012 14:08:33 +0000 (15:08 +0100)]
votequorum: lower quorum change logging

vfs_quorum already does logging at INFO level

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoupdate TODO list
Fabio M. Di Nitto [Thu, 12 Jan 2012 11:48:18 +0000 (12:48 +0100)]
update TODO list

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agovotequorum: drop votequorum_leave
Fabio M. Di Nitto [Thu, 12 Jan 2012 11:46:33 +0000 (12:46 +0100)]
votequorum: drop votequorum_leave

this was a compatibility function for cman_tool only.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agovotequorum: add missing new line
Fabio M. Di Nitto [Thu, 12 Jan 2012 09:55:48 +0000 (10:55 +0100)]
votequorum: add missing new line

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agovotequorum: display flags for all features
Fabio M. Di Nitto [Thu, 12 Jan 2012 09:46:05 +0000 (10:46 +0100)]
votequorum: display flags for all features

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoquorumtool: improve monitoring output some more
Fabio M. Di Nitto [Thu, 12 Jan 2012 09:35:47 +0000 (10:35 +0100)]
quorumtool: improve monitoring output some more

this avoid printing some static data more than once

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agovotequorum: drop HASSTATE/SETSTATE
Fabio M. Di Nitto [Thu, 12 Jan 2012 09:21:31 +0000 (10:21 +0100)]
votequorum: drop HASSTATE/SETSTATE

this is a leftover from killing DISALLOWED

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoquorumtool: make data display more generic
Fabio M. Di Nitto [Thu, 12 Jan 2012 09:16:03 +0000 (10:16 +0100)]
quorumtool: make data display more generic

this improves the monitoring option a ton

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoquorumtool: drop redundant init calls to votequorum
Fabio M. Di Nitto [Thu, 12 Jan 2012 08:55:46 +0000 (09:55 +0100)]
quorumtool: drop redundant init calls to votequorum

this is taken care of in initall

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoquorumtools: update copyright header
Fabio M. Di Nitto [Thu, 12 Jan 2012 08:51:57 +0000 (09:51 +0100)]
quorumtools: update copyright header

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agocmapctl: initialize more variables
Fabio M. Di Nitto [Thu, 12 Jan 2012 08:22:07 +0000 (09:22 +0100)]
cmapctl: initialize more variables

and kill the last gcc warnings

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agocmapctl: initialize bit_value and check if it's set
Fabio M. Di Nitto [Thu, 12 Jan 2012 08:20:06 +0000 (09:20 +0100)]
cmapctl: initialize bit_value and check if it's set

more gcc warnings...

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agomainconfig: check error return codes from logsys_format_set
Fabio M. Di Nitto [Thu, 12 Jan 2012 08:14:13 +0000 (09:14 +0100)]
mainconfig: check error return codes from logsys_format_set

and avoid yet another gcc warning

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agomain: drop unrequired call to totem_get_stats
Fabio M. Di Nitto [Thu, 12 Jan 2012 08:06:57 +0000 (09:06 +0100)]
main: drop unrequired call to totem_get_stats

and shut up another gcc warning

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoicmap: make sure variable is initialized
Fabio M. Di Nitto [Thu, 12 Jan 2012 08:01:44 +0000 (09:01 +0100)]
icmap: make sure variable is initialized

shut up gcc warning

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agounshare exec/icmap.so
Steven Dake [Wed, 11 Jan 2012 15:04:09 +0000 (08:04 -0700)]
unshare exec/icmap.so

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
12 years agoChange all ais references to corosync
Steven Dake [Wed, 11 Jan 2012 14:50:31 +0000 (07:50 -0700)]
Change all ais references to corosync

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
12 years agocmapctl: Print all keys by default
Jan Friesse [Mon, 9 Jan 2012 10:12:43 +0000 (11:12 +0100)]
cmapctl: Print all keys by default

Also remove option -a, because there is no need to hide
internal_configuration.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoUpdate TODO with notifid changes
Jan Friesse [Wed, 11 Jan 2012 13:13:06 +0000 (14:13 +0100)]
Update TODO with notifid changes

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoStore rrp faulty status of ring in cmap
Jan Friesse [Wed, 11 Jan 2012 10:50:22 +0000 (11:50 +0100)]
Store rrp faulty status of ring in cmap

New key with faulty status of ring is created in cmap as name
runtime.totem.pg.mrp.rrp.$ring_number.faulty

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoquorum: more TODO items
Fabio M. Di Nitto [Tue, 10 Jan 2012 07:57:51 +0000 (08:57 +0100)]
quorum: more TODO items

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoquorum: update TODO
Fabio M. Di Nitto [Tue, 10 Jan 2012 07:56:50 +0000 (08:56 +0100)]
quorum: update TODO

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: fix votes/quorum recalculation in auto_tie_breaker
Fabio M. Di Nitto [Tue, 10 Jan 2012 07:49:56 +0000 (08:49 +0100)]
votequorum: fix votes/quorum recalculation in auto_tie_breaker

this is necessary when switching from 2 nodes to 1 one in auto_tie_breaker

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: improve wait_for_all reset handling when merging parititions
Fabio M. Di Nitto [Mon, 9 Jan 2012 13:03:18 +0000 (14:03 +0100)]
votequorum: improve wait_for_all reset handling when merging parititions

this change allow a node to rejoin a cluster that has already seen
wait_for_all and reset the flag if the partition that the node is joining
is quorate.

Also propagate current wait_for_all_status and quorate info via nodeinfo.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: fix another regressions introduced by 05b4e99a6e (dispatch notifications...
Fabio M. Di Nitto [Mon, 9 Jan 2012 10:26:04 +0000 (11:26 +0100)]
votequorum: fix another regressions introduced by 05b4e99a6e (dispatch notifications only once)

left_member_entries is never set when totem config change is regular.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: fix regression introduced by 05b4e99a6e (dispatch notifications only...
Fabio M. Di Nitto [Fri, 6 Jan 2012 11:29:03 +0000 (12:29 +0100)]
votequorum: fix regression introduced by 05b4e99a6e (dispatch notifications only once)

Effectively there are 2 kind of quorum notifications that cannot be merged into 1.

config_change: when the quorum membership changes, triggered by totem/membership changes
               (node join/leave)

quorum_status_changes: same membership node becomes quorate or not.

A quorum status change does not necessarely match a membership change, hence it needs
to be dispatched separately.

An example is a cluster that is not quorate, user changes the amount of votes in a node to
regain quorum. No membership changes happen at this point, but votequorum will
effectively broadcast the votes: XX change and recalculate quorum.
In turn we need to notify quorum users.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: switch two_node from flag to int
Fabio M. Di Nitto [Thu, 5 Jan 2012 12:36:23 +0000 (13:36 +0100)]
votequorum: switch two_node from flag to int

TWO_NODE was the last flag using quorum_flags.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: drop kill_reason leftovers (part of disallowed)
Fabio M. Di Nitto [Thu, 5 Jan 2012 12:31:39 +0000 (13:31 +0100)]
votequorum: drop kill_reason leftovers (part of disallowed)

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: missed one comment to cleanup ;)
Fabio M. Di Nitto [Thu, 5 Jan 2012 12:25:28 +0000 (13:25 +0100)]
votequorum: missed one comment to cleanup ;)

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: clean up coding style
Fabio M. Di Nitto [Thu, 5 Jan 2012 12:19:49 +0000 (13:19 +0100)]
votequorum: clean up coding style

first pass to bring votequorum at corosync codying style.

fix whitespaces, add missing {}, fix comments, be consistent with
ENTER/LEAVE usage, be consistent with some functions variable names
and some more cosmetic changes

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: update copyright/authors
Fabio M. Di Nitto [Thu, 5 Jan 2012 11:27:46 +0000 (12:27 +0100)]
votequorum: update copyright/authors

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: dispatch notifications only once
Fabio M. Di Nitto [Thu, 5 Jan 2012 09:36:18 +0000 (10:36 +0100)]
votequorum: dispatch notifications only once

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: add last_man_standing support (default: off)
Fabio M. Di Nitto [Wed, 4 Jan 2012 14:31:10 +0000 (15:31 +0100)]
votequorum: add last_man_standing support (default: off)

this flag (0|1) can be configured via quorum.last_man_standing and when
enabled, it allows expected_votes to be dynamically recalculated.

Assuming an 8 nodes cluster, every node votes 1 (mandatory requirement for
this feature).

In the first event, 3 nodes are lost.

The remaining partition of 5 is barely quorate.

After a configurable timeout (quorum.last_man_standing_window, default 10sec)
the quorate partition is allow to recalculate expected_votes based on
the remaining nodes.

This operation will bring expected_votes to 5 and quorum to 3.

Repeating the above loop, in the next event, 2 more nodes are allowed to
die. etc. etc.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: drop concept of DISALLOWED
Fabio M. Di Nitto [Wed, 4 Jan 2012 08:31:27 +0000 (09:31 +0100)]
votequorum: drop concept of DISALLOWED

this is a very old leftover from the RHEL5 timeframe, not used in RHEL6.

Also change votequorum soname since this change implies an ABI change.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoquorum: bump soname for libquorum to reflect API change
Fabio M. Di Nitto [Wed, 4 Jan 2012 08:13:36 +0000 (09:13 +0100)]
quorum: bump soname for libquorum to reflect API change

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: fix quorum_flags values
Fabio M. Di Nitto [Tue, 3 Jan 2012 14:48:54 +0000 (15:48 +0100)]
votequorum: fix quorum_flags values

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: transmit wait_for_all info in node info message
Fabio M. Di Nitto [Tue, 3 Jan 2012 13:58:15 +0000 (14:58 +0100)]
votequorum: transmit wait_for_all info in node info message

this is necessary to reset the wait_for_all data when a node is joining a cluster
that has already seen all nodes once.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: add auto_tie_breaker support (default: off)
Fabio M. Di Nitto [Tue, 3 Jan 2012 13:39:50 +0000 (14:39 +0100)]
votequorum: add auto_tie_breaker support (default: off)

this flag (0|1) can be configured via quorum.auto_tie_breaker and when
enabled, support for perfect even split is on.

In case of a 50% of votes loss in one single transition, the partition
with the node that has the lowest node id will remain quorate.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: add wait_for_all support (default: off)
Fabio M. Di Nitto [Tue, 3 Jan 2012 10:06:39 +0000 (11:06 +0100)]
votequorum: add wait_for_all support (default: off)

this flag (0|1) can be configured via quorum.wait_for_all and changes
behavior when granting quorum for the first time.

Normal behavior (default / 0) grants quorum as soon as enough nodes
are available in a cluster.

Setting this value to 1 will grant quorum only after all cluster
memembers are part of the cluster at the same time.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agovotequorum: always dispatch quorum notifications
Fabio M. Di Nitto [Tue, 3 Jan 2012 08:46:15 +0000 (09:46 +0100)]
votequorum: always dispatch quorum notifications

Resolves: rhbz#768144

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoquorum: change API to return quorum type at initialization time
Fabio M. Di Nitto [Tue, 13 Dec 2011 14:06:18 +0000 (15:06 +0100)]
quorum: change API to return quorum type at initialization time

corosync internal theory of operation is that without a quorum provider
the cluster is always quorate. This is fine for membership free clusters
but it does pose a problem for applications that need membership and
"real" quorum.

this change add quorum_type to quorum_initialize call to return QUORUM_FREE
or QUORUM_SET. Applications can then make their own decisions to error out
or continue operating.

The only other way to know if a quorum provider is enabled/configured is
to poke at confdb/objdb, but adds an unnecessary burden to applications
that really don't need to use an entire library for a boolean value.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoIPC: don't block forever on a recv msg as corosync might be gone.
Angus Salkeld [Mon, 9 Jan 2012 21:32:16 +0000 (08:32 +1100)]
IPC: don't block forever on a recv msg as corosync might be gone.

This at least will not make the client hang forever.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd rrp faulty event to notifyd
Jan Friesse [Fri, 6 Jan 2012 09:13:18 +0000 (10:13 +0100)]
Add rrp faulty event to notifyd

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd usage text to cmapctl
Jan Friesse [Fri, 6 Jan 2012 11:38:22 +0000 (12:38 +0100)]
Add usage text to cmapctl

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAbility to display binary data type in cmapctl
Jan Friesse [Fri, 6 Jan 2012 11:21:05 +0000 (12:21 +0100)]
Ability to display binary data type in cmapctl

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAbility to store binary key
Jan Friesse [Fri, 6 Jan 2012 10:53:14 +0000 (11:53 +0100)]
Ability to store binary key

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoFix last corosync/engine/coroapi.h
Angus Salkeld [Mon, 9 Jan 2012 02:04:09 +0000 (13:04 +1100)]
Fix last corosync/engine/coroapi.h

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd Requires: libxslt if BUILD_XMLCONF is defined
Steven Dake [Sat, 7 Jan 2012 01:15:17 +0000 (18:15 -0700)]
Add Requires: libxslt if BUILD_XMLCONF is defined

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkled <asalkeld@redhat.com>
12 years agoImprove make rpm to work properly
Steven Dake [Fri, 6 Jan 2012 15:27:34 +0000 (08:27 -0700)]
Improve make rpm to work properly

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
12 years agoMove coroapi out of external headers
Steven Dake [Fri, 6 Jan 2012 15:14:41 +0000 (08:14 -0700)]
Move coroapi out of external headers

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkled <asalkeld@redhat.com>
12 years agoMove logsys.c into corosync binary instead of a shared object
Steven Dake [Fri, 6 Jan 2012 06:32:15 +0000 (23:32 -0700)]
Move logsys.c into corosync binary instead of a shared object

Our preferred shared logging system is exported via the libqb library.  As
a result, the corosync project no longer needs to export logsys.so and the
code can be directly included in the binary.  The header file can also be
removed.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoAllow make rpm to complete with recent changes in cmap and xmlproc
Steven Dake [Fri, 6 Jan 2012 05:41:17 +0000 (22:41 -0700)]
Allow make rpm to complete with recent changes in cmap and xmlproc

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoFix make dist relating to xmlconf conditional
Steven Dake [Fri, 6 Jan 2012 05:40:22 +0000 (22:40 -0700)]
Fix make dist relating to xmlconf conditional

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
12 years agoFix some iterator based mem leaks
Angus Salkeld [Fri, 6 Jan 2012 01:24:53 +0000 (12:24 +1100)]
Fix some iterator based mem leaks

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoRemove libqb issues reference 1 since that isn't really a problem
Steven Dake [Thu, 22 Dec 2011 01:51:40 +0000 (18:51 -0700)]
Remove libqb issues reference 1 since that isn't really a problem

Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoipc: make less noise
Fabio M. Di Nitto [Tue, 3 Jan 2012 10:12:52 +0000 (11:12 +0100)]
ipc: make less noise

switch from LOG_INFO to LOG_DEBUG for some basic operations

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoAdd topic-xmlschema to TODO
Jan Friesse [Fri, 16 Dec 2011 10:58:09 +0000 (11:58 +0100)]
Add topic-xmlschema to TODO

Also topic-xmlconfig is removed.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMan pages for corosync-xml
Jan Friesse [Fri, 16 Dec 2011 10:54:16 +0000 (11:54 +0100)]
Man pages for corosync-xml

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoConvert xml config file
Jan Friesse [Fri, 16 Dec 2011 09:52:48 +0000 (10:52 +0100)]
Convert xml config file

Included are following parts:
 - XSLT template with actual conversion
 - simple wrapper on top of xsltproc called corosync-xmlproc
 - example XML file

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoRemove deprecated options from corosync.conf page
Jan Friesse [Fri, 16 Dec 2011 09:45:11 +0000 (10:45 +0100)]
Remove deprecated options from corosync.conf page

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoRemove deprecated options from conf examples
Jan Friesse [Fri, 16 Dec 2011 09:38:13 +0000 (10:38 +0100)]
Remove deprecated options from conf examples

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAlign --with-snmp in help output
Jan Friesse [Fri, 16 Dec 2011 09:35:26 +0000 (10:35 +0100)]
Align --with-snmp in help output

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoUpdated TODO to reflect cmap inclusion
Jan Friesse [Thu, 15 Dec 2011 15:43:13 +0000 (16:43 +0100)]
Updated TODO to reflect cmap inclusion

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
12 years agoRemove objdb and confdb
Jan Friesse [Wed, 14 Dec 2011 15:37:02 +0000 (16:37 +0100)]
Remove objdb and confdb

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMove wd service to use icmap
Jan Friesse [Wed, 14 Dec 2011 15:22:01 +0000 (16:22 +0100)]
Move wd service to use icmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMove mon service to use icmap
Jan Friesse [Wed, 14 Dec 2011 15:21:33 +0000 (16:21 +0100)]
Move mon service to use icmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMove SAM to use CMAP service
Jan Friesse [Tue, 13 Dec 2011 17:09:39 +0000 (18:09 +0100)]
Move SAM to use CMAP service

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMove quorumtool to use cmap service
Jan Friesse [Tue, 13 Dec 2011 17:08:43 +0000 (18:08 +0100)]
Move quorumtool to use cmap service

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMove notifyd to use cmap service
Jan Friesse [Tue, 13 Dec 2011 17:08:17 +0000 (18:08 +0100)]
Move notifyd to use cmap service

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd cmapctl tool
Jan Friesse [Tue, 13 Dec 2011 17:07:26 +0000 (18:07 +0100)]
Add cmapctl tool

corosync-cmapctl is direct replacement for corosync-objctl

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMove cfg service to use icmap
Jan Friesse [Tue, 13 Dec 2011 17:03:45 +0000 (18:03 +0100)]
Move cfg service to use icmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMove votequorum to use icmap
Jan Friesse [Tue, 13 Dec 2011 17:03:20 +0000 (18:03 +0100)]
Move votequorum to use icmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMove testquorum to icmap
Jan Friesse [Tue, 13 Dec 2011 17:01:56 +0000 (18:01 +0100)]
Move testquorum to icmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoMove corosync core to use icmap
Jan Friesse [Tue, 13 Dec 2011 17:00:42 +0000 (18:00 +0100)]
Move corosync core to use icmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd user library to use cmap service
Jan Friesse [Tue, 13 Dec 2011 16:49:44 +0000 (17:49 +0100)]
Add user library to use cmap service

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd cmap service
Jan Friesse [Tue, 13 Dec 2011 16:47:07 +0000 (17:47 +0100)]
Add cmap service

Cmap service is application developer interface to icmap and it is
direct replacement for confdb.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoAdd icmap
Jan Friesse [Tue, 13 Dec 2011 16:41:05 +0000 (17:41 +0100)]
Add icmap

Icmap is replacement for objdb, based on libqb map (trie).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoTODO: remove "message/queue size" todo's
Angus Salkeld [Wed, 14 Dec 2011 23:53:46 +0000 (10:53 +1100)]
TODO: remove "message/queue size" todo's

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoCheck for the correct message size in totempg_groups_joined_reserve()
Angus Salkeld [Wed, 14 Dec 2011 01:06:41 +0000 (12:06 +1100)]
Check for the correct message size in totempg_groups_joined_reserve()

Currently:
- send_reserve() adds to the reserve
- msg_count_send_ok() tests ((avail - totempg_reserved) > msg_count)

So essentially we are checking to see if 2 * msg_count can fit in
the q.

So instead I am using byte_count_send_ok (size) to see if the
message will fit then calling send_reserve()

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoFix cpgbench (large message sizes)
Angus Salkeld [Wed, 14 Dec 2011 23:43:00 +0000 (10:43 +1100)]
Fix cpgbench (large message sizes)

To allow async cpg messages of 1M we need to:
1) increase the totem queue size 4 times
2) align the critical level to one large message free

There are a number of reasons for doing this:

We can't let cpg_mcast_joined() fail because the user will not see it
and will assume is has succeded.

The reason we are getting good performance is by providing a negative
feedback loop from the totem q to the IPC/poll system. This relies
on 4 q states low/med/high/crit. With messages of size 1M you
now have a q of size one and now go from level low to crit instantly
then back to low as messages are put on and taken off. I don't think
this is the best behaviour. By having a q size of 4 allows the system
to utilize the q better and give us time to respond to changes in
the q level.

To effectively achieve flow control with a q of size 1 would require
all the clients to request the space on the q like is done in
totempg_groups_joined_reserve() but probably in shared memory
This would take quite a bit of re-work.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoLOG: get the logging to work from loaded quorum modules
Angus Salkeld [Wed, 14 Dec 2011 05:42:25 +0000 (16:42 +1100)]
LOG: get the logging to work from loaded quorum modules

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoTweek the increment in cpgbench so the message size gets to 1M
Angus Salkeld [Wed, 14 Dec 2011 00:51:35 +0000 (11:51 +1100)]
Tweek the increment in cpgbench so the message size gets to 1M

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoBe more flexible (correct) with flowcontrol.
Angus Salkeld [Wed, 14 Dec 2011 01:03:18 +0000 (12:03 +1100)]
Be more flexible (correct) with flowcontrol.

Many functions do not require flowcontrol and are two-way
so they can get failures from corosync.
Only cpg_mcast_joined() _really_ needs the current level
of flowcontrol.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoquorum-tools: add quorum monitoring option
Fabio M. Di Nitto [Mon, 12 Dec 2011 11:16:11 +0000 (12:16 +0100)]
quorum-tools: add quorum monitoring option

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoquorum-tool: reduce amount of init/finalize
Fabio M. Di Nitto [Tue, 13 Dec 2011 09:35:43 +0000 (10:35 +0100)]
quorum-tool: reduce amount of init/finalize

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoquorum-tools: change internal get_quorum_type
Fabio M. Di Nitto [Tue, 13 Dec 2011 09:20:31 +0000 (10:20 +0100)]
quorum-tools: change internal get_quorum_type

don't leak memory, better error reporting and improve
status output when there is no quorum configured

also fix some coding style based on review input

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoquorum-tool: add return codes to show status
Fabio M. Di Nitto [Fri, 9 Dec 2011 10:07:43 +0000 (11:07 +0100)]
quorum-tool: add return codes to show status

-1 indicates an error communicating with corosync/quorum/votequorum service
 0 node is not quorate
 1 node is quorate

also add more error reporting and a couple of missing calls to finalize

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoquorum-tool: update copyright date
Fabio M. Di Nitto [Fri, 9 Dec 2011 09:25:20 +0000 (10:25 +0100)]
quorum-tool: update copyright date

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoquorum-tools: fix options/help text
Fabio M. Di Nitto [Fri, 9 Dec 2011 09:23:17 +0000 (10:23 +0100)]
quorum-tools: fix options/help text

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
12 years agoLOG: Fix a crash in the shutdown.
Angus Salkeld [Tue, 13 Dec 2011 04:00:42 +0000 (15:00 +1100)]
LOG: Fix a crash in the shutdown.

Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoChange mailing list in configure.ac to discuss@lists.corosync.org
Steven Dake [Tue, 6 Dec 2011 16:01:06 +0000 (09:01 -0700)]
Change mailing list in configure.ac to discuss@lists.corosync.org

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoAdd silent rules to corosync make to more easily find warnings
Steven Dake [Mon, 5 Dec 2011 16:17:36 +0000 (09:17 -0700)]
Add silent rules to corosync make to more easily find warnings

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agohdb* functions already returns -error value
Jan Friesse [Wed, 30 Nov 2011 14:15:53 +0000 (15:15 +0100)]
hdb* functions already returns -error value

So it's wrong to define hdb_error_to_cs and pass -error value, because
this creates --error = error = CS_OK.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoCorrect nodeid in memb_state_commit_token_send function
Yunkai Zhang [Wed, 30 Nov 2011 15:04:20 +0000 (23:04 +0800)]
Correct nodeid in memb_state_commit_token_send function

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoFrom: Yunkai Zhang:
Steven Dake [Tue, 29 Nov 2011 14:41:53 +0000 (07:41 -0700)]
From: Yunkai Zhang:
Today, I have observed one of the reason that corosync running into
FAILED TO RECEIVE state.

There was five nodes(A,B,C,D,E) in my testing, and I limited the UDP
transmission rate of C nodes by iptables command:
iptables -A INPUT -i eth0 -p udp -m limit --limit 10000/s
--limit-burst 1 -j ACCEPT
iptables -A INPUT -i eth0 -p udp -j DROP

After one hour later, C node had been missing some MCAST messages,
it's state described as following:
==state of C node==
my_aru:0x805
my_high_seq_received:0xC2C
my_aru_count:7

=>receved MCAST message with seq:806 from B nodes
=>enter *message_handler_mcast*
  =>add this message to regular_sort_queue
  ...
  =>enter *update_aru* function
    => range = (my_high_seq_received - my_aru)
             = (0xC2C - 0x805)
             = 1063
    => if range>1024, do nothing and and return directly.
==END==

According this logic, after (my_high_req_received-my_aru)>1024, my_aru
will not be updated though corosync can receive MCAST messages
retransmitted by other nodes.

But at that timte, my_aru_count was only 7. So the corosync at C node
would keep in this status until my_aru_count increased to
fail_to_recv_const(the default value is 2500). This was a long time
for corosync, but we wasted it.

To solve this issue, maybe we can enlarge the range condition in
update_aru function? Or we just ingnore the checking of range value,
it seems no harmfull, because we have been using fail_to_recv_const to
control the things.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
12 years agoCorrect nodeid of token when we retransmit it
Yunkai Zhang [Mon, 28 Nov 2011 10:32:36 +0000 (18:32 +0800)]
Correct nodeid of token when we retransmit it

Although incorrect nodeid will not affect program's logic, but it will
make us confused when we add some logs to record the transmission path of
token in debug mode.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoFixed bug when corosync receive JoinMSG in OPERATIONAL state
Yunkai Zhang [Sat, 26 Nov 2011 09:42:54 +0000 (17:42 +0800)]
Fixed bug when corosync receive JoinMSG in OPERATIONAL state

Accordig the totem protocal, nodes should enter GATHER state when it
receive JoinMSG in OPERATIONAL state. If we discard it in OPERATIONAL
state, the nodes sending this JoinMSG could not receive the response
untill other nodes reach token lost timeout.

This bug will cause nodes having entered GATHER state spend more time to
rejoin the ring, and then it will make nodes reach token expired timeout
more easily.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
12 years agoRemove unchecked return error in test code
Steven Dake [Mon, 31 Oct 2011 22:54:07 +0000 (15:54 -0700)]
Remove unchecked return error in test code

Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoRemove unused variable from latest cpg work that merged all config changes
Steven Dake [Mon, 31 Oct 2011 22:49:32 +0000 (15:49 -0700)]
Remove unused variable from latest cpg work that merged all config changes
Signed-off-by: Steven Dake <sdake@redhat.com>