diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-04-21 10:57:51 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-04-21 10:57:51 +0000 |
commit | 5513b5e61c3c26b883d1ab7a9b356bb01d881101 (patch) | |
tree | a022adc88a6686709a8af9647bc8c4c2866fa916 /puppet/manifests | |
parent | b096c3225eec3f87ca795a377af917b0dead9ba3 (diff) | |
parent | f7826b8a3a083a1776c5f1f02526232a3bf32d4d (diff) |
Merge "Perform basic setup of Pacemaker cluster using puppet-pacemaker"
Diffstat (limited to 'puppet/manifests')
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 38 |
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, + } } } |