Commit Graph

2796 Commits

Author SHA1 Message Date
Jan Friesse
aeff976675 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>
2012-01-11 14:15:22 +01:00
Jan Friesse
f7dba030ea Update TODO with notifid changes
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-11 14:13:27 +01:00
Jan Friesse
bb6bbd01e6 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>
2012-01-11 14:12:06 +01:00
Fabio M. Di Nitto
7550cf3e57 quorum: more TODO items
Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-01-10 15:49:05 +01:00
Fabio M. Di Nitto
0bf2e5d195 quorum: update TODO
Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-01-10 15:49:02 +01:00
Fabio M. Di Nitto
e88015421d 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>
2012-01-10 15:48:59 +01:00
Fabio M. Di Nitto
fbe954ed5b 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>
2012-01-10 15:48:54 +01:00
Fabio M. Di Nitto
620fcd147b 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>
2012-01-10 15:48:50 +01:00
Fabio M. Di Nitto
0b758b01ff 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>
2012-01-10 15:48:44 +01:00
Fabio M. Di Nitto
839093fcea 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>
2012-01-10 15:48:40 +01:00
Fabio M. Di Nitto
0a2ae35584 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>
2012-01-10 15:48:37 +01:00
Fabio M. Di Nitto
832b0e5153 votequorum: missed one comment to cleanup ;)
Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-01-10 15:48:34 +01:00
Fabio M. Di Nitto
b3949957f3 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>
2012-01-10 15:48:29 +01:00
Fabio M. Di Nitto
c34ae1e846 votequorum: update copyright/authors
Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-01-10 15:48:27 +01:00
Fabio M. Di Nitto
fd1037da29 votequorum: dispatch notifications only once
Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-01-10 15:48:22 +01:00
Fabio M. Di Nitto
10098dba27 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>
2012-01-10 15:48:17 +01:00
Fabio M. Di Nitto
9589611dc4 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>
2012-01-10 15:48:10 +01:00
Fabio M. Di Nitto
4306101510 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>
2012-01-10 15:48:07 +01:00
Fabio M. Di Nitto
e867e974c0 votequorum: fix quorum_flags values
Reviewed-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-01-10 15:48:04 +01:00
Fabio M. Di Nitto
249dd966c2 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>
2012-01-10 15:48:00 +01:00
Fabio M. Di Nitto
b41372c6b2 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>
2012-01-10 15:47:57 +01:00
Fabio M. Di Nitto
e8d0af0bc8 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>
2012-01-10 15:47:52 +01:00
Fabio M. Di Nitto
b64d1b8694 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>
2012-01-10 15:47:45 +01:00
Fabio M. Di Nitto
e34d509df7 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>
2012-01-10 15:47:24 +01:00
Angus Salkeld
9e36255b8e 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>
2012-01-10 08:32:31 +11:00
Jan Friesse
47a5f96700 Add rrp faulty event to notifyd
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-09 10:18:54 +01:00
Jan Friesse
739cf05bf1 Add usage text to cmapctl
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-09 10:14:31 +01:00
Jan Friesse
d378f02700 Ability to display binary data type in cmapctl
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-09 10:14:24 +01:00
Jan Friesse
b11aa1a1c4 Ability to store binary key
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-09 10:14:03 +01:00
Angus Salkeld
0bd2c97f1d Fix last corosync/engine/coroapi.h
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-09 13:06:22 +11:00
Steven Dake
23b93ccb0f Add Requires: libxslt if BUILD_XMLCONF is defined
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkled <asalkeld@redhat.com>
2012-01-07 17:48:11 -07:00
Steven Dake
fc3de6c828 Improve make rpm to work properly
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-07 17:48:11 -07:00
Steven Dake
e5aba30a49 Move coroapi out of external headers
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkled <asalkeld@redhat.com>
2012-01-07 17:47:45 -07:00
Steven Dake
8ad583a54c 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>
2012-01-06 18:19:59 -07:00
Steven Dake
4f04735f86 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>
2012-01-06 18:19:59 -07:00
Steven Dake
71c35e8a3d Fix make dist relating to xmlconf conditional
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-06 18:17:46 -07:00
Angus Salkeld
7ef81f1235 Fix some iterator based mem leaks
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-06 12:25:08 +11:00
Steven Dake
3068055d85 Remove libqb issues reference 1 since that isn't really a problem
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-01-05 18:17:17 -07:00
Fabio M. Di Nitto
de194160e1 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>
2012-01-03 11:12:52 +01:00
Jan Friesse
39ff78c803 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>
2011-12-20 10:49:21 +01:00
Jan Friesse
821f6e3c5c Man pages for corosync-xml
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-20 10:49:21 +01:00
Jan Friesse
b1421fe1d2 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>
2011-12-20 10:49:20 +01:00
Jan Friesse
e7e91e64f9 Remove deprecated options from corosync.conf page
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-20 10:49:20 +01:00
Jan Friesse
f01794f268 Remove deprecated options from conf examples
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-20 10:49:20 +01:00
Jan Friesse
9d1a52d42b Align --with-snmp in help output
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-20 10:49:20 +01:00
Jan Friesse
3d080bda1f Updated TODO to reflect cmap inclusion
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2011-12-15 16:45:12 +01:00
Jan Friesse
7c250a5147 Remove objdb and confdb
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-15 09:19:18 +01:00
Jan Friesse
2b90d24b13 Move wd service to use icmap
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-15 09:19:18 +01:00
Jan Friesse
d5b532f674 Move mon service to use icmap
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-15 09:19:18 +01:00
Jan Friesse
120531cddb Move SAM to use CMAP service
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-12-15 09:19:18 +01:00