aboutsummaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorJiri Stransky <jistr@redhat.com>2015-05-14 18:08:58 +0200
committerJiri Stransky <jistr@redhat.com>2015-05-18 16:20:21 +0200
commita6aa0d70e8e13b63c3e26695915afbf14f31ba7d (patch)
tree3076bd95d6ed76314ccfa621b9116b328d0d3375 /puppet
parent0a6c852795bf59b938a6354493b3b02f385bf1e2 (diff)
Update to reflect puppet-pacemaker changes
Recently puppet-pacemaker has changed in a backward incompatible way, we need to reflect the changes in TripleO. This patch also addresses non-deterministic order between corosync service and VIP creation. Depends-On: Ia68fee38f99dba18badc07eb0adbc473cfcffdf3 Change-Id: Ia7fe14cfb1401be98b62afeed589bb9f1b8af761 Co-Authored-By: Yanis Guenane <yanis.guenane@enovance.com>
Diffstat (limited to 'puppet')
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp42
1 files changed, 28 insertions, 14 deletions
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index e312f853..8d976f07 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -13,6 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
+Pcmk_resource <| |> {
+ tries => 10,
+ try_sleep => 3,
+}
+
if !str2bool(hiera('enable_package_install', 'false')) {
case $::osfamily {
'RedHat': {
@@ -69,6 +74,8 @@ if hiera('step') >= 1 {
}
}
+ Class['::pacemaker::corosync'] -> Pacemaker::Resource::Ip <| |>
+ Class['::pacemaker::corosync'] -> Pacemaker::Resource::Ocf <| |>
Class['::pacemaker::corosync'] -> Pacemaker::Resource::Service <| |>
# Only configure RabbitMQ in this step, don't start it yet to
@@ -102,9 +109,13 @@ if hiera('step') >= 2 {
if downcase(hiera('ceilometer_backend')) == 'mongodb' {
include ::mongodb::globals
- class {'::mongodb::server' :
- service_ensure => undef
+ # FIXME: replace with service_manage => false on ::mongodb::server
+ # when this is merged: https://github.com/puppetlabs/pupp etlabs-mongodb/pull/198
+ class { '::mongodb::server' :
+ service_ensure => undef,
+ service_enable => false,
}
+
$mongo_node_ips = split(hiera('mongo_node_ips'), ',')
$mongo_node_ips_with_port = suffix($mongo_node_ips, ':27017')
$mongo_node_string = join($mongo_node_ips_with_port, ',')
@@ -113,10 +124,11 @@ if hiera('step') >= 2 {
$ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
if downcase(hiera('bootstrap_nodeid')) == $::hostname {
- pacemaker::resource::service { 'mongod' :
- options => "op start timeout=120s",
- clone => true,
- before => Exec['mongodb-ready'],
+ pacemaker::resource::service { $::mongodb::params::service_name :
+ op_params => 'start timeout=120s',
+ clone_params => true,
+ require => Class['::mongodb::server'],
+ before => Exec['mongodb-ready'],
}
# NOTE (spredzy) : The replset can only be run
# once all the nodes have joined the cluster.
@@ -208,10 +220,12 @@ if hiera('step') >= 2 {
$sync_db = true
pacemaker::resource::ocf { 'galera' :
- resource_name => 'heartbeat:galera',
- options => "enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}' meta master-max=${galera_nodes_count} ordered=true op promote timeout=300s on-fail=block --master",
- require => Class['::mysql::server'],
- before => Exec['galera-ready'],
+ ocf_agent_name => 'heartbeat:galera',
+ op_params => 'promote timeout=300s on-fail=block --master',
+ meta_params => "master-max=${galera_nodes_count} ordered=true",
+ resource_params => "additional_parameters='--open-files-limit=16384' enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}'",
+ require => Class['::mysql::server'],
+ before => Exec['galera-ready'],
}
mysql_user { 'clustercheckuser@localhost' :
@@ -327,10 +341,10 @@ MYSQL_HOST=localhost\n",
# RabbitMQ
if $pacemaker_master {
pacemaker::resource::ocf { 'rabbitmq':
- resource_name => 'heartbeat:rabbitmq-cluster',
- options => 'set_policy=\'ha-all ^(?!amq\.).* {"ha-mode":"all"}\'',
- clone => true,
- require => Class['::rabbitmq'],
+ ocf_agent_name => 'heartbeat:rabbitmq-cluster',
+ resource_params => 'set_policy=\'ha-all ^(?!amq\.).* {"ha-mode":"all"}\'',
+ clone_params => true,
+ require => Class['::rabbitmq'],
}
}