Re-synced to upstream sources
This commit is contained in:
parent
67e9e843c5
commit
6044b69891
1
.gitignore
vendored
1
.gitignore
vendored
@ -21,3 +21,4 @@
|
||||
/pcs-0.9.44.tar.gz
|
||||
/pcs-0.9.48.tar.gz
|
||||
/pcs-withgems-0.9.102.tar.gz
|
||||
/pcs-withgems-0.9.115.tar.gz
|
||||
|
@ -0,0 +1,135 @@
|
||||
From b18b74ecde9a96761df2a8e8f8d76b8c1642d161 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Feist <cfeist@redhat.com>
|
||||
Date: Wed, 19 Mar 2014 16:30:29 -0500
|
||||
Subject: [PATCH] Add support for setting certain corosync totem options
|
||||
|
||||
---
|
||||
pcs/cluster.py | 13 +++++++++++++
|
||||
pcs/corosync.conf.fedora.template | 1 +
|
||||
pcs/pcs.8 | 15 ++++++++++++++-
|
||||
pcs/pcs.py | 2 +-
|
||||
pcs/test/test_cluster.py | 8 ++++++++
|
||||
pcs/usage.py | 17 ++++++++++++++++-
|
||||
6 files changed, 53 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/pcs/cluster.py b/pcs/cluster.py
|
||||
index ec0e6a1..bf7acda 100644
|
||||
--- a/pcs/cluster.py
|
||||
+++ b/pcs/cluster.py
|
||||
@@ -371,6 +371,18 @@ def corosync_setup(argv,returnConfig=False):
|
||||
ip_version = ""
|
||||
|
||||
|
||||
+ totem_options = ""
|
||||
+ if "--token" in utils.pcs_options:
|
||||
+ totem_options += "token: " + utils.pcs_options["--token"] + "\n"
|
||||
+ if "--join" in utils.pcs_options:
|
||||
+ totem_options += "join: " + utils.pcs_options["--join"] + "\n"
|
||||
+ if "--consensus" in utils.pcs_options:
|
||||
+ totem_options += "consensus: " + utils.pcs_options["--consensus"] + "\n"
|
||||
+ if "--miss_count_const" in utils.pcs_options:
|
||||
+ totem_options += "miss_count_const: " + utils.pcs_options["--miss_count_const"] + "\n"
|
||||
+ if "--fail_recv_const" in utils.pcs_options:
|
||||
+ totem_options += "fail_recv_const: " + utils.pcs_options["--fail_recv_const"] + "\n"
|
||||
+
|
||||
corosync_config = corosync_config.replace("@@nodes", new_nodes_section)
|
||||
corosync_config = corosync_config.replace("@@cluster_name",cluster_name)
|
||||
corosync_config = corosync_config.replace("@@quorum_options\n",quorum_options)
|
||||
@@ -378,6 +390,7 @@ def corosync_setup(argv,returnConfig=False):
|
||||
corosync_config = corosync_config.replace("@@transport",transport)
|
||||
corosync_config = corosync_config.replace("@@interfaceandrrpmode\n",ir)
|
||||
corosync_config = corosync_config.replace("@@ip_version\n",ip_version)
|
||||
+ corosync_config = corosync_config.replace("@@totem_options\n",totem_options)
|
||||
if returnConfig:
|
||||
return corosync_config
|
||||
|
||||
diff --git a/pcs/corosync.conf.fedora.template b/pcs/corosync.conf.fedora.template
|
||||
index 82413c1..4d1227c 100644
|
||||
--- a/pcs/corosync.conf.fedora.template
|
||||
+++ b/pcs/corosync.conf.fedora.template
|
||||
@@ -3,6 +3,7 @@ version: 2
|
||||
secauth: off
|
||||
cluster_name: @@cluster_name
|
||||
transport: @@transport
|
||||
+@@totem_options
|
||||
@@interfaceandrrpmode
|
||||
@@ip_version
|
||||
}
|
||||
diff --git a/pcs/pcs.8 b/pcs/pcs.8
|
||||
index 7f51f61..0eeadb8 100644
|
||||
--- a/pcs/pcs.8
|
||||
+++ b/pcs/pcs.8
|
||||
@@ -144,9 +144,22 @@ Reset failcount for specified resource on all nodes or only on specified node. T
|
||||
auth [node] [...] [\-u username] [\-p password] [\-\-local] [\-\-force]
|
||||
Authenticate pcs to pcsd on nodes specified, or on all nodes configured in corosync.conf if no nodes are specified (authorization tokens are stored in ~/.pcs/tokens or /var/lib/pcsd/tokens for root). By default all nodes are also authenticated to each other, using --local only authenticates the local node (and does not authenticate the remote nodes with each other). Using --force forces re-authentication to occur.
|
||||
.TP
|
||||
-setup [\-\-start] [\-\-local] [\-\-enable] \-\-name\fR <cluster name> <node1[,node1-altaddr]> [node2[,node2-altaddr]] [..] [--transport <udpu|udp>] [--rrpmode active|passive] [--addr0 <addr/net> [[[--mcast0 <address>] [--mcastport0 <port>] [--ttl0 <ttl>]] | [--broadcast0]] [--addr1 <addr/net> [[[--mcast1 <address>] [--mcastport1 <port>] [--ttl1 <ttl>]] | [--broadcast1]]]] [--wait_for_all=<0|1>] [--auto_tie_breaker=<0|1>] [--last_man_standing=<0|1> [--last_man_standing_window=<time in ms>]]
|
||||
+setup [\-\-start] [\-\-local] [\-\-enable] \-\-name\fR <cluster name> <node1[,node1-altaddr]> [node2[,node2-altaddr]] [..] [--transport <udpu|udp>] [--rrpmode active|passive] [--addr0 <addr/net> [[[--mcast0 <address>] [--mcastport0 <port>] [--ttl0 <ttl>]] | [--broadcast0]] [--addr1 <addr/net> [[[--mcast1 <address>] [--mcastport1 <port>] [--ttl1 <ttl>]] | [--broadcast1]]]] [--wait_for_all=<0|1>] [--auto_tie_breaker=<0|1>] [--last_man_standing=<0|1> [--last_man_standing_window=<time in ms>]] [--token <timeout>] [--join <timeout>] [--consensus <timeout>] [--miss_count_const <count>] [--fail_recv_const <failures>]
|
||||
Configure corosync and sync configuration out to listed nodes. \-\-local\fR will only perform changes on the local node, \-\-start\fR will also start the cluster on the specified nodes, \-\-enable\fR will enable corosync and pacemaker on node startup, --transport allows specification of corosync transport (default: udpu). The --wait_for_all, --auto_tie_breaker, --last_man_standing, --last_man_standing_window options are all documented in corosync's votequorum(5) man page. --ipv6 will configure corosync to use ipv6 (instead of ipv4)
|
||||
|
||||
+--ipv6 will configure corosync to use ipv6 (instead of ipv4)
|
||||
+
|
||||
+--token <timeout> sets time in milliseconds until a token loss is declared after not receiving a token (default 1000 ms)
|
||||
+
|
||||
+--join <timeout> sets time in milliseconds to wait for join mesages (default 50 ms)
|
||||
+
|
||||
+--consensus <timeout> sets time in milliseconds to wait for consensus to be achieved before starting a new round of membership configuration (default 1200 ms)
|
||||
+
|
||||
+--miss_count_const <count> sets the maximum number of times on receipt of a token a message is checked for retransmission before a retransmission occurs (default 5 messages)
|
||||
+
|
||||
+--fail_recv_const <failures> specifies how many rotations of the token without receiving any messages when messages should be received may occur before a new configuration is formed (default 2500 failures)
|
||||
+
|
||||
+
|
||||
Configuring Redundant Ring Protocol (RRP)
|
||||
|
||||
When using udpu (the default) specifying nodes, specify the ring 0
|
||||
diff --git a/pcs/pcs.py b/pcs/pcs.py
|
||||
index 0d3eecc..22504c3 100755
|
||||
--- a/pcs/pcs.py
|
||||
+++ b/pcs/pcs.py
|
||||
@@ -52,7 +52,7 @@ def main(argv):
|
||||
pcs_short_options_with_args.append(prev_char)
|
||||
prev_char = c
|
||||
|
||||
- pcs_long_options = ["local","start","all","clone","master","force","corosync_conf=", "defaults","debug","version","help","fullhelp","off","from=","to=", "name=", "wait", "group=","groups","full","enable","node=","nodesc","transport=", "addr0=","addr1=","bcast0=","bcast1=","mcast0=","mcast1=","mcastport0=","mcastport1=","ttl0=","ttl1=","rrpmode=", "broadcast0", "broadcast1","wait_for_all=","auto_tie_breaker=","last_man_standing=", "last_man_standing_window=","no-default-ops","ipv6"]
|
||||
+ pcs_long_options = ["local","start","all","clone","master","force","corosync_conf=", "defaults","debug","version","help","fullhelp","off","from=","to=", "name=", "wait", "group=","groups","full","enable","node=","nodesc","transport=", "addr0=","addr1=","bcast0=","bcast1=","mcast0=","mcast1=","mcastport0=","mcastport1=","ttl0=","ttl1=","rrpmode=", "broadcast0", "broadcast1","wait_for_all=","auto_tie_breaker=","last_man_standing=", "last_man_standing_window=","no-default-ops","ipv6","token=", "consensus=", "miss_count_const=", "fail_recv_const=","join="]
|
||||
# pull out negative number arguments and add them back after getopt
|
||||
prev_arg = ""
|
||||
for arg in argv:
|
||||
diff --git a/pcs/usage.py b/pcs/usage.py
|
||||
index 0053381..91d15da 100644
|
||||
--- a/pcs/usage.py
|
||||
+++ b/pcs/usage.py
|
||||
@@ -438,7 +438,9 @@ Commands:
|
||||
[--ttl1 <ttl>]] | [--broadcast1]]]]
|
||||
[--wait_for_all=<0|1>] [--auto_tie_breaker=<0|1>]
|
||||
[--last_man_standing=<0|1> [--last_man_standing_window=<time in ms>]]
|
||||
- [--ipv6]
|
||||
+ [--ipv6] [--token <timeout>] [--join <timeout>]
|
||||
+ [--consensus <timeout>] [--miss_count_const <count>]
|
||||
+ [--fail_recv_const <failures>]
|
||||
Configure corosync and sync configuration out to listed nodes
|
||||
--local will only perform changes on the local node
|
||||
--start will also start the cluster on the specified nodes
|
||||
@@ -448,6 +450,19 @@ Commands:
|
||||
--last_man_standing_window options are all documented in corosync's
|
||||
votequorum(5) man page.
|
||||
--ipv6 will configure corosync to use ipv6 (instead of ipv4)
|
||||
+ --token <timeout> sets time in milliseconds until a token loss is
|
||||
+ declared after not receiving a token (default 1000 ms)
|
||||
+ --join <timeout> sets time in milliseconds to wait for join mesages
|
||||
+ (default 50 ms)
|
||||
+ --consensus <timeout> sets time in milliseconds to wait for consensus
|
||||
+ to be achieved before starting a new round of membership configuration
|
||||
+ (default 1200 ms)
|
||||
+ --miss_count_const <count> sets the maximum number of times on
|
||||
+ receipt of a token a message is checked for retransmission before
|
||||
+ a retransmission occurs (default 5 messages)
|
||||
+ --fail_recv_const <failures> specifies how many rotations of the token
|
||||
+ without receiving any messages when messages should be received
|
||||
+ may occur before a new configuration is formed (default 2500 failures)
|
||||
|
||||
Configuring Redundant Ring Protocol (RRP)
|
||||
|
||||
--
|
||||
1.8.5.3
|
15
pcs.spec
15
pcs.spec
@ -1,6 +1,6 @@
|
||||
Name: pcs
|
||||
Version: 0.9.102
|
||||
Release: 3%{?dist}
|
||||
Version: 0.9.115
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2
|
||||
URL: http://github.com/feist/pcs
|
||||
Group: System Environment/Base
|
||||
@ -10,6 +10,8 @@ BuildRequires: rubygem-eventmachine rubygem-rack-test rubygem-multi_json rubygem
|
||||
Summary: Pacemaker Configuration System
|
||||
Source0: http://people.redhat.com/cfeist/pcs/pcs-withgems-%{version}.tar.gz
|
||||
Patch0: fedfix.patch
|
||||
Patch1: rebase.patch
|
||||
Patch2: bz1078343-Add-support-for-setting-certain-corosync-totem-optio.patch
|
||||
Requires: pacemaker ruby python
|
||||
Requires: rubygem-sinatra rubygem-highline rubygem-rack rubygem-rack-protection rubygem-tilt
|
||||
Requires: rubygem-eventmachine rubygem-rack-test rubygem-multi_json rubygem-json
|
||||
@ -20,9 +22,11 @@ easily view, modify and created pacemaker based clusters.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .fedfix
|
||||
cd pcsd ; bundle install --local ; cd ..
|
||||
|
||||
%patch0 -p1 -b .fedfix
|
||||
%patch1 -p1 -b .rebase
|
||||
%patch2 -p1 -b .bz1078343
|
||||
cd pcsd ; bundle install --local ; cd ..
|
||||
|
||||
%build
|
||||
|
||||
@ -65,6 +69,9 @@ chmod 755 $RPM_BUILD_ROOT/%{python_sitelib}/pcs/pcs.py
|
||||
%doc COPYING README
|
||||
|
||||
%changelog
|
||||
* Mon Apr 21 2014 Chris Feist <cfeist@redhat.com> - 0.9.115-1
|
||||
- Re-synced to upstream sources
|
||||
|
||||
* Fri Dec 13 2013 Chris Feist <cfeist@redhat.com> - 0.9.102-1
|
||||
- Re-synced to upstream sources
|
||||
|
||||
|
82966
rebase.patch
Normal file
82966
rebase.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user