summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBogdan Dobrelya <bdobrelia@mirantis.com>2015-11-04 17:49:24 +0100
committerBogdan Dobrelya <bdobrelia@mirantis.com>2015-11-12 15:42:11 +0000
commit7ce61a71bb998e66df7c514dfdae396ec0410a59 (patch)
tree17d2c58b23c5f3f67da8aab56699cd0a71abdc08
parent8c22c0e862c02585ca8f278d422335d80287a11c (diff)
Make cs_property and cs_fencetopo only for primary
W/a concurrency issue by configuring corosync properties and fence topology only one time, for the primary controller Closes-bug: #1411603 Change-Id: Id69d7664e6fee994b1b6b46f4c31903c77960499 Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Bogdan Dobrelya <bdobrelia@mirantis.com> Workflow+1: Bogdan Dobrelya <bdobrelia@mirantis.com> Submitted-by: Jenkins Submitted-at: Thu, 12 Nov 2015 15:49:22 +0000 Reviewed-on: https://review.openstack.org/241686 Project: openstack/fuel-plugin-ha-fencing Branch: refs/heads/master
-rw-r--r--deployment_scripts/puppet/manifests/site.pp7
-rw-r--r--deployment_scripts/puppet/modules/pcs_fencing/manifests/fencing_primitives.pp18
2 files changed, 15 insertions, 10 deletions
diff --git a/deployment_scripts/puppet/manifests/site.pp b/deployment_scripts/puppet/manifests/site.pp
index e102013..0b9b5d0 100644
--- a/deployment_scripts/puppet/manifests/site.pp
+++ b/deployment_scripts/puppet/manifests/site.pp
@@ -18,9 +18,10 @@ if ($is_controller or $primary_controller) {
18 18
19 include stdlib 19 include stdlib
20 class { '::pcs_fencing::fencing_primitives': 20 class { '::pcs_fencing::fencing_primitives':
21 fence_primitives => $fence_primitives, 21 fence_primitives => $fence_primitives,
22 fence_topology => $fence_topology, 22 fence_topology => $fence_topology,
23 nodes => $controllers, 23 nodes => $controllers,
24 primary_controller => $primary_controller,
24 } 25 }
25 } 26 }
26} 27}
diff --git a/deployment_scripts/puppet/modules/pcs_fencing/manifests/fencing_primitives.pp b/deployment_scripts/puppet/modules/pcs_fencing/manifests/fencing_primitives.pp
index abd9de3..e138330 100644
--- a/deployment_scripts/puppet/modules/pcs_fencing/manifests/fencing_primitives.pp
+++ b/deployment_scripts/puppet/modules/pcs_fencing/manifests/fencing_primitives.pp
@@ -35,6 +35,7 @@ class pcs_fencing::fencing_primitives (
35 $fence_primitives, 35 $fence_primitives,
36 $fence_topology, 36 $fence_topology,
37 $nodes, 37 $nodes,
38 $primary_controller = true,
38) { 39) {
39 case $::osfamily { 40 case $::osfamily {
40 'RedHat': { 41 'RedHat': {
@@ -53,19 +54,22 @@ class pcs_fencing::fencing_primitives (
53 54
54 create_resources('::pcs_fencing::fencing', $fence_primitives) 55 create_resources('::pcs_fencing::fencing', $fence_primitives)
55 56
56 cs_fencetopo { 'fencing_topology': 57 if $primary_controller {
57 ensure => present, 58 cs_fencetopo { 'fencing_topology':
58 fence_topology => $fence_topology, 59 ensure => present,
59 nodes => $names, 60 fence_topology => $fence_topology,
61 nodes => $names,
62 }
63 cs_property { 'stonith-enabled': value => 'true' }
64 cs_property { 'cluster-recheck-interval': value => '3min' }
60 } 65 }
61 cs_property { 'stonith-enabled': value => 'true' } 66
62 cs_property { 'cluster-recheck-interval': value => '3min' }
63 package {'fence-agents':} 67 package {'fence-agents':}
64 68
65 Anchor['Fencing primitives start'] -> 69 Anchor['Fencing primitives start'] ->
66 Package['fence-agents'] -> 70 Package['fence-agents'] ->
67 Pcs_fencing::Fencing<||> -> 71 Pcs_fencing::Fencing<||> ->
68 Cs_fencetopo['fencing_topology'] -> 72 Cs_fencetopo<||> ->
69 Cs_property<||> -> 73 Cs_property<||> ->
70 Anchor['Fencing primitives end'] 74 Anchor['Fencing primitives end']
71} 75}