From 6044b6989132281079a4a9063501f88b01f9150e Mon Sep 17 00:00:00 2001 From: Chris Feist Date: Apr 21 2014 19:16:15 +0000 Subject: Re-synced to upstream sources --- diff --git a/.gitignore b/.gitignore index 540b902..e290852 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/bz1078343-Add-support-for-setting-certain-corosync-totem-optio.patch b/bz1078343-Add-support-for-setting-certain-corosync-totem-optio.patch new file mode 100644 index 0000000..0618bd8 --- /dev/null +++ b/bz1078343-Add-support-for-setting-certain-corosync-totem-optio.patch @@ -0,0 +1,135 @@ +From b18b74ecde9a96761df2a8e8f8d76b8c1642d161 Mon Sep 17 00:00:00 2001 +From: Chris Feist +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 [node2[,node2-altaddr]] [..] [--transport ] [--rrpmode active|passive] [--addr0 [[[--mcast0
] [--mcastport0 ] [--ttl0 ]] | [--broadcast0]] [--addr1 [[[--mcast1
] [--mcastport1 ] [--ttl1 ]] | [--broadcast1]]]] [--wait_for_all=<0|1>] [--auto_tie_breaker=<0|1>] [--last_man_standing=<0|1> [--last_man_standing_window=