Re: Avoiding fencing loops with startup quorum (patch)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 20, 2008 at 1:27 PM, Federico Simoncelli
<federico.simoncelli@xxxxxxxxx> wrote:
> I confirm that the patch works fine. I just need to say that the
> two_node flag is required anyway:
>
> <cman two_node="1">

After some testing I discovered that we need a couple of patches to
achieve the behaviour we wanted.
Basically if you set two_node=1 the quorum is locked to 1 (no matter
what expected_votes you configure). I unlocked the quorum value with
the patch "cman-2.0.84-2node2expected.patch" (in attachment). Now we
can change the quorum using the expected_votes:

# cman_tool expected -e 2 && cman_tool status | grep Quorum
Quorum: 2
# cman_tool expected -e 1 && cman_tool status | grep Quorum
Quorum: 1

In the same patch I fixed what I believe is a bug. Basically in the
file /cman/daemon/cmanccs.c the values node_count and vote_sum are
computed only if expected_votes == 0 but those values are used
afterwards:

                if (two_node) {
                        if (node_count != 2 || vote_sum != 2) {

To quickly verify the bug:

# cman_tool join -w -e 1

It should generate the error "two_node set but there are more than 2
nodes" on any cman version.

The second patch "cman-2.0.84-startupquorum.patch" is the init patch
to take advantage of the expected_votes and the quorum.
Using the following configuration:

# cat /etc/sysconfig/cman
CMAN_QUORUM_TIMEOUT=10
CMAN_PREJOIN_EXPECTED=2
CMAN_POSTJOIN_EXPECTED=1

Your cluster needs the quorum to be 2 (CMAN_PREJOIN_EXPECTED) within
10 seconds to start. No fencing (and no fencing loops) will be
performed if the quorum is less than CMAN_PREJOIN_EXPECTED. After the
join session the expected_votes are set back to 1
(CMAN_POSTJOIN_EXPECTED) and the quorum goes back to 1 too.

Comments are welcome,
-- 
Federico.

Attachment: cman-2.0.84-2node2expected.patch
Description: Binary data

Attachment: cman-2.0.84-startupquorum.patch
Description: Binary data

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux