summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2016-11-01 17:44:44 +0300
committerMichael Polenchuk <mpolenchuk@mirantis.com>2016-11-01 17:46:23 +0300
commit60f0e3feb54726f0ba520f6e1e666b6bbf743c45 (patch)
treee4ab19b9e7da95a2812511acdcaa2f4cf0fd437e
parentc3562a68a3dc15927c66b76778430fdef70bdc24 (diff)
Shift public ping checker into deployment stage
Avoid public vip failover at the end of post-deployment by moving ping_checker resource into deployment stage. Also pingd constraint has been changed to be based on score. If all the nodes failed to ping the default gw, the resource ain't stopped and remains on the last node where it was. In addition public_vip_ping task has been splitted out to avoid race condition when ping_checker resource might be started up on controllers before a primary one. JIRA: FUEL-212 JIRA: FUEL-217 Change-Id: Id60ece479fce1ceabc47034f39997ddbaacd62d9 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
-rw-r--r--build/patch-repos/build/repos/fuel-library/0004-Shift-public-ping-checker-into-deployment-stage.patch126
1 files changed, 126 insertions, 0 deletions
diff --git a/build/patch-repos/build/repos/fuel-library/0004-Shift-public-ping-checker-into-deployment-stage.patch b/build/patch-repos/build/repos/fuel-library/0004-Shift-public-ping-checker-into-deployment-stage.patch
new file mode 100644
index 000000000..fd929323f
--- /dev/null
+++ b/build/patch-repos/build/repos/fuel-library/0004-Shift-public-ping-checker-into-deployment-stage.patch
@@ -0,0 +1,126 @@
+From 60dbecc548b4a81b99d50feac96864ed42d9af4b Mon Sep 17 00:00:00 2001
+From: Michael Polenchuk <mpolenchuk@mirantis.com>
+Date: Wed, 26 Oct 2016 15:26:11 +0300
+Subject: [PATCH] Shift public ping checker into deployment stage
+
+Avoid public vip failover at the end of post-deployment
+by moving ping_checker resource into deployment stage.
+Also pingd constraint has been changed to be based on score.
+If all the nodes failed to ping the default gw, the resource
+ain't stopped and remains on the last node where it was.
+
+Change-Id: I666fbbbe98d000c66f97cf4751f304a2da9aad67
+---
+ .../puppet/cluster/manifests/virtual_ip_ping.pp | 10 +++----
+ .../puppet/osnailyfacter/modular/astute/tasks.yaml | 15 ----------
+ .../osnailyfacter/modular/virtual_ips/tasks.yaml | 30 ++++++++++++++++++++
+ 3 files changed, 35 insertions(+), 20 deletions(-)
+
+diff --git a/deployment/puppet/cluster/manifests/virtual_ip_ping.pp b/deployment/puppet/cluster/manifests/virtual_ip_ping.pp
+index 3e49c09..7642422 100644
+--- a/deployment/puppet/cluster/manifests/virtual_ip_ping.pp
++++ b/deployment/puppet/cluster/manifests/virtual_ip_ping.pp
+@@ -11,7 +11,7 @@ define cluster::virtual_ip_ping (
+ $parameters = {
+ 'host_list' => $host_list,
+ 'multiplier' => '1000',
+- 'dampen' => '30s',
++ 'dampen' => '45s',
+ 'timeout' => '3s',
+ }
+ $operations = {
+@@ -41,16 +41,16 @@ define cluster::virtual_ip_ping (
+ primitive => $vip_name,
+ rules => [
+ {
+- 'score' => '-inf',
++ 'score' => '50',
+ 'expressions' => [
+ {
+ 'attribute' => "pingd",
+- 'operation' => 'not_defined',
++ 'operation' => 'defined',
+ },
+ {
+ 'attribute' => "pingd",
+- 'operation'=>'lte',
+- 'value' => '0',
++ 'operation'=>'gte',
++ 'value' => '1',
+ },
+ ],
+ },
+diff --git a/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml b/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml
+index 5e3e6ee..83242c4 100644
+--- a/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml
++++ b/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml
+@@ -10,7 +10,6 @@
+ cross-depends:
+ - name: dns-client
+ - name: ntp-server
+- - name: public_vip_ping
+ parameters:
+ cmd: ruby /etc/puppet/modules/osnailyfacter/modular/astute/enable_quorum.rb
+ timeout: 180
+@@ -110,20 +109,6 @@
+ timeout: 180
+ cwd: /
+
+-- id: public_vip_ping
+- type: puppet
+- version: 2.1.0
+- role: [primary-controller, controller]
+- requires: [post_deployment_start]
+- required_for: [post_deployment_end]
+- condition:
+- yaql_exp: "changed($.network_scheme) or changed($.get('run_ping_checker'))"
+- parameters:
+- puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/virtual_ips/public_vip_ping.pp
+- puppet_modules: /etc/puppet/modules
+- timeout: 3600
+- cwd: /
+-
+ - id: configure_default_route
+ type: puppet
+ version: 2.1.0
+diff --git a/deployment/puppet/osnailyfacter/modular/virtual_ips/tasks.yaml b/deployment/puppet/osnailyfacter/modular/virtual_ips/tasks.yaml
+index 00d4306..7420099 100644
+--- a/deployment/puppet/osnailyfacter/modular/virtual_ips/tasks.yaml
++++ b/deployment/puppet/osnailyfacter/modular/virtual_ips/tasks.yaml
+@@ -34,3 +34,33 @@
+ cmd: ruby /etc/puppet/modules/osnailyfacter/modular/virtual_ips/conntrackd_pre.rb
+ test_post:
+ cmd: ruby /etc/puppet/modules/osnailyfacter/modular/virtual_ips/conntrackd_post.rb
++
++- id: primary_public_vip_ping
++ type: puppet
++ version: 2.1.0
++ groups: [primary-controller]
++ requires: [virtual_ips]
++ required_for: [primary-cluster-haproxy]
++ condition:
++ yaql_exp: &pub_viping "changed($.network_scheme) or changed($.get('run_ping_checker'))"
++ parameters:
++ puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/virtual_ips/public_vip_ping.pp
++ puppet_modules: /etc/puppet/modules
++ timeout: 300
++ cwd: /
++
++- id: public_vip_ping
++ type: puppet
++ version: 2.1.0
++ groups: [controller]
++ requires: [virtual_ips]
++ required_for: [deploy_end]
++ condition:
++ yaql_exp: *pub_viping
++ cross-depends:
++ - name: primary_public_vip_ping
++ parameters:
++ puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/virtual_ips/public_vip_ping.pp
++ puppet_modules: /etc/puppet/modules
++ timeout: 300
++ cwd: /
+--
+1.7.9.5
+