fuel-library/deployment/puppet/cluster/manifests/init.pp
Bogdan Dobrelya 372b371230 Configure corosync cluster-recheck-interval
Add the cluster_recheck_interval param with
a 190 sec default, configurable via hiera.
Add rspec and noop tests.

Closes-bug: #1517388

Change-Id: I82b7220e24282d1fbda69ed7d3788e2bdc0afcfc
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2015-11-18 14:00:36 +01:00

46 lines
1.4 KiB
Puppet

# == Class: cluster
#
# Module for configuring cluster resources.
#
class cluster (
$internal_address = '127.0.0.1',
$corosync_nodes = undef,
$cluster_recheck_interval = '190s',
) {
#todo: move half of openstack::corosync
#to this module, another half -- to Neutron
if defined(Stage['corosync_setup']) {
class { 'openstack::corosync':
bind_address => $internal_address,
corosync_nodes => $corosync_nodes,
stage => 'corosync_setup',
corosync_version => '2',
packages => ['corosync', 'pacemaker', 'crmsh', 'pcs'],
cluster_recheck_interval => $cluster_recheck_interval,
}
} else {
class { 'openstack::corosync':
bind_address => $internal_address,
corosync_nodes => $corosync_nodes,
corosync_version => '2',
packages => ['corosync', 'pacemaker', 'crmsh', 'pcs'],
cluster_recheck_interval => $cluster_recheck_interval,
}
}
File<| title == '/etc/corosync/corosync.conf' |> -> Service['corosync']
file { 'ocf-fuel-path':
ensure => directory,
path =>'/usr/lib/ocf/resource.d/fuel',
recurse => true,
owner => 'root',
group => 'root',
}
Package['corosync'] -> File['ocf-fuel-path']
Package<| title == 'pacemaker' |> -> File['ocf-fuel-path']
}