Skip to content

Commit

Permalink
Add flag to enable two node quorum behaviour.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdb committed Mar 14, 2015
1 parent 299dff9 commit f3b3be1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
# Array of quorum member hostname.
# Defaults to undef.
#
# [*two_node*]
# Set to 1 to enable special quorum behaviour when only using two nodes.
#
# [*token*]
# Time (in ms) to wait for a token
#
Expand Down Expand Up @@ -117,6 +120,7 @@
$set_votequorum = $::corosync::params::set_votequorum,
$expected_votes = $::corosync::params::expected_votes,
$quorum_members = $::corosync::params::quorum_members,
$two_node = $::corosync::params::two_node,
$token = $::corosync::params::token,
$token_retransmits_before_loss_const = $::corosync::params::token_retransmits_before_lost_const,
) inherits ::corosync::params {
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
$packages = ['corosync', 'pacemaker']
$expected_votes = undef
$quorum_members = undef
$two_node = undef
$token = 3000
$token_retransmits_before_lost_const = 10

Expand Down
3 changes: 3 additions & 0 deletions templates/corosync.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ quorum {
<% if @expected_votes -%>
expected_votes: <%= @expected_votes %>
<% end -%>
<% if @two_node -%>
two_node: <%= @two_node %>
<% end -%>
}
<% end -%>
Expand Down
5 changes: 5 additions & 0 deletions templates/corosync.conf.udpu.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ aisexec {
<% if @set_votequorum -%>
quorum {
provider: corosync_votequorum
<% if @expected_votes -%>
expected_votes: <%= @expected_votes %>
<% end -%>
<% if @two_node -%>
two_node: <%= @two_node %>
<% end -%>
}
<% end -%>
Expand Down

0 comments on commit f3b3be1

Please sign in to comment.