Browse Source

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>
Bogdan Dobrelya 3 years ago
parent
commit
7ce61a71bb

+ 4
- 3
deployment_scripts/puppet/manifests/site.pp View File

@@ -18,9 +18,10 @@ if ($is_controller or $primary_controller) {
18 18
 
19 19
     include stdlib
20 20
     class { '::pcs_fencing::fencing_primitives':
21
-      fence_primitives => $fence_primitives,
22
-      fence_topology   => $fence_topology,
23
-      nodes            => $controllers,
21
+      fence_primitives   => $fence_primitives,
22
+      fence_topology     => $fence_topology,
23
+      nodes              => $controllers,
24
+      primary_controller => $primary_controller,
24 25
     }
25 26
   }
26 27
 }

+ 11
- 7
deployment_scripts/puppet/modules/pcs_fencing/manifests/fencing_primitives.pp View File

@@ -35,6 +35,7 @@ class pcs_fencing::fencing_primitives (
35 35
   $fence_primitives,
36 36
   $fence_topology,
37 37
   $nodes,
38
+  $primary_controller = true,
38 39
 ) {
39 40
   case $::osfamily {
40 41
     'RedHat': {
@@ -53,19 +54,22 @@ class pcs_fencing::fencing_primitives (
53 54
 
54 55
   create_resources('::pcs_fencing::fencing', $fence_primitives)
55 56
 
56
-  cs_fencetopo { 'fencing_topology':
57
-    ensure         => present,
58
-    fence_topology => $fence_topology,
59
-    nodes          => $names,
57
+  if $primary_controller {
58
+    cs_fencetopo { 'fencing_topology':
59
+      ensure         => present,
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' }
62
-  cs_property { 'cluster-recheck-interval':  value  => '3min' }
66
+
63 67
   package {'fence-agents':}
64 68
 
65 69
   Anchor['Fencing primitives start'] ->
66 70
   Package['fence-agents'] ->
67 71
   Pcs_fencing::Fencing<||> ->
68
-  Cs_fencetopo['fencing_topology'] ->
72
+  Cs_fencetopo<||> ->
69 73
   Cs_property<||> ->
70 74
   Anchor['Fencing primitives end']
71 75
 }

Loading…
Cancel
Save