From de4dcf305c48b857f7e41f0d259022a068ec082e Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Mon, 21 Nov 2016 14:24:04 +0300 Subject: [PATCH] Split public_vip_ping task out public_vip_ping task has been splitted out to avoid unwanted failover when ping_checker resource might be started up on controllers before a primary one. In addition 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: Ic02fc33f323f75c0b47e78e0935842dd9ae5a27d Closes-Bug: #1643510 (cherry picked from commit 8358ecc8875c57a58852fe86cea287ddcb5e4ec4) --- .../cluster/manifests/virtual_ip_ping.pp | 8 +++---- .../osnailyfacter/modular/astute/tasks.yaml | 22 ++++++++++++++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/deployment/puppet/cluster/manifests/virtual_ip_ping.pp b/deployment/puppet/cluster/manifests/virtual_ip_ping.pp index 3e49c091ce..d8fdb88ebf 100644 --- a/deployment/puppet/cluster/manifests/virtual_ip_ping.pp +++ b/deployment/puppet/cluster/manifests/virtual_ip_ping.pp @@ -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 3b46e52049..db670f0535 100644 --- a/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml +++ b/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml @@ -123,14 +123,30 @@ timeout: 180 cwd: / -- id: public_vip_ping +- id: primary_public_vip_ping type: puppet version: 2.1.0 - role: [primary-controller, controller] + role: [primary-controller] requires: [post_deployment_start] required_for: [post_deployment_end] condition: - yaql_exp: "changed($.network_scheme) or changed($.get('run_ping_checker'))" + 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: 120 + cwd: / + +- id: public_vip_ping + type: puppet + version: 2.1.0 + role: [controller] + requires: [post_deployment_start] + required_for: [post_deployment_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