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
class { '::pcs_fencing::fencing_primitives':
fence_primitives => $fence_primitives,
fence_topology => $fence_topology,
nodes => $controllers,
fence_primitives => $fence_primitives,
fence_topology => $fence_topology,
nodes => $controllers,
primary_controller => $primary_controller,
}
}
}

View File

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