summaryrefslogtreecommitdiffstats
path: root/puppet/manifests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-04-21 10:57:51 +0000
committerGerrit Code Review <review@openstack.org>2015-04-21 10:57:51 +0000
commit5513b5e61c3c26b883d1ab7a9b356bb01d881101 (patch)
treea022adc88a6686709a8af9647bc8c4c2866fa916 /puppet/manifests
parentb096c3225eec3f87ca795a377af917b0dead9ba3 (diff)
parentf7826b8a3a083a1776c5f1f02526232a3bf32d4d (diff)
Merge "Perform basic setup of Pacemaker cluster using puppet-pacemaker"
Diffstat (limited to 'puppet/manifests')
-rw-r--r--puppet/manifests/overcloud_controller.pp38
1 files changed, 23 insertions, 15 deletions
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 8b5571cf..8a8c0eb8 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -27,25 +27,33 @@ if !str2bool(hiera('enable_package_install', 'false')) {
if hiera('step') >= 1 {
$controller_node_ips = split(hiera('controller_node_ips'), ',')
+ $enable_pacemaker = str2bool(hiera('enable_pacemaker'))
+ $enable_keepalived = !$enable_pacemaker
+
class { '::tripleo::loadbalancer' :
controller_hosts => $controller_node_ips,
}
- class { '::corosync':
- quorum_members => $controller_node_ips,
- }
- corosync::service { 'pacemaker':
- version => '0',
- }
- service { 'pacemaker':
- ensure => running,
- require => Service['corosync'],
- }
- cs_property { 'stonith-enabled':
- value => 'false',
- }
- cs_property { 'no-quorum-policy':
- value => 'ignore',
+ if $enable_pacemaker {
+ $pacemaker_cluster_members = regsubst(hiera('controller_node_ips'), ',', ' ', 'G')
+ if $::hostname == downcase(hiera('bootstrap_nodeid')) {
+ $pacemaker_master = true
+ } else {
+ $pacemaker_master = false
+ }
+ user { 'hacluster':
+ ensure => present,
+ } ->
+ class { '::pacemaker':
+ hacluster_pwd => hiera('hacluster_pwd'),
+ } ->
+ class { '::pacemaker::corosync':
+ cluster_members => $pacemaker_cluster_members,
+ setup_cluster => $pacemaker_master,
+ }
+ class { '::pacemaker::stonith':
+ disable => true,
+ }
}
}