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>
This commit is contained in:
Bogdan Dobrelya 2015-11-04 17:49:24 +01:00
parent 8c22c0e862
commit 7ce61a71bb
2 changed files with 15 additions and 10 deletions

View File

@ -18,9 +18,10 @@ if ($is_controller or $primary_controller) {
include stdlib include stdlib
class { '::pcs_fencing::fencing_primitives': class { '::pcs_fencing::fencing_primitives':
fence_primitives => $fence_primitives, fence_primitives => $fence_primitives,
fence_topology => $fence_topology, fence_topology => $fence_topology,
nodes => $controllers, nodes => $controllers,
primary_controller => $primary_controller,
} }
} }
} }

View File

@ -35,6 +35,7 @@ class pcs_fencing::fencing_primitives (
$fence_primitives, $fence_primitives,
$fence_topology, $fence_topology,
$nodes, $nodes,
$primary_controller = true,
) { ) {
case $::osfamily { case $::osfamily {
'RedHat': { 'RedHat': {
@ -53,19 +54,22 @@ class pcs_fencing::fencing_primitives (
create_resources('::pcs_fencing::fencing', $fence_primitives) create_resources('::pcs_fencing::fencing', $fence_primitives)
cs_fencetopo { 'fencing_topology': if $primary_controller {
ensure => present, cs_fencetopo { 'fencing_topology':
fence_topology => $fence_topology, ensure => present,
nodes => $names, fence_topology => $fence_topology,
nodes => $names,
}
cs_property { 'stonith-enabled': value => 'true' }
cs_property { 'cluster-recheck-interval': value => '3min' }
} }
cs_property { 'stonith-enabled': value => 'true' }
cs_property { 'cluster-recheck-interval': value => '3min' }
package {'fence-agents':} package {'fence-agents':}
Anchor['Fencing primitives start'] -> Anchor['Fencing primitives start'] ->
Package['fence-agents'] -> Package['fence-agents'] ->
Pcs_fencing::Fencing<||> -> Pcs_fencing::Fencing<||> ->
Cs_fencetopo['fencing_topology'] -> Cs_fencetopo<||> ->
Cs_property<||> -> Cs_property<||> ->
Anchor['Fencing primitives end'] Anchor['Fencing primitives end']
} }