diff options
Diffstat (limited to 'manifests/profile/base')
-rw-r--r-- | manifests/profile/base/ceilometer.pp | 10 | ||||
-rw-r--r-- | manifests/profile/base/ceilometer/collector.pp | 38 | ||||
-rw-r--r-- | manifests/profile/base/database/mysql.pp | 85 | ||||
-rw-r--r-- | manifests/profile/base/horizon.pp | 50 | ||||
-rw-r--r-- | manifests/profile/base/mistral.pp | 39 | ||||
-rw-r--r-- | manifests/profile/base/mistral/api.pp | 36 | ||||
-rw-r--r-- | manifests/profile/base/mistral/engine.pp | 46 | ||||
-rw-r--r-- | manifests/profile/base/mistral/executor.pp | 36 | ||||
-rw-r--r-- | manifests/profile/base/neutron.pp | 7 | ||||
-rw-r--r-- | manifests/profile/base/neutron/agents/midonet.pp | 56 | ||||
-rw-r--r-- | manifests/profile/base/neutron/agents/nuage.pp | 62 | ||||
-rw-r--r-- | manifests/profile/base/neutron/dhcp.pp | 13 | ||||
-rw-r--r-- | manifests/profile/base/neutron/midonet.pp | 9 | ||||
-rw-r--r-- | manifests/profile/base/nova/compute.pp | 11 | ||||
-rw-r--r-- | manifests/profile/base/pacemaker.pp | 93 | ||||
-rw-r--r-- | manifests/profile/base/sahara/api.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/sahara/engine.pp | 2 |
17 files changed, 553 insertions, 42 deletions
diff --git a/manifests/profile/base/ceilometer.pp b/manifests/profile/base/ceilometer.pp index 97e1bb8..88818de 100644 --- a/manifests/profile/base/ceilometer.pp +++ b/manifests/profile/base/ceilometer.pp @@ -23,18 +23,12 @@ # for more details. # Defaults to hiera('step') # -# [*sync_db*] -# (Optional) Whether to run db sync -# Defaults to true -# class tripleo::profile::base::ceilometer ( - $step = hiera('step'), - $sync_db = true, + $step = hiera('step'), ) { - if $step >= 4 or ($step >= 3 and $sync_db) { + if $step >= 3 { include ::ceilometer - include ::ceilometer::db include ::ceilometer::config } diff --git a/manifests/profile/base/ceilometer/collector.pp b/manifests/profile/base/ceilometer/collector.pp index 34ee90b..c294e56 100644 --- a/manifests/profile/base/ceilometer/collector.pp +++ b/manifests/profile/base/ceilometer/collector.pp @@ -33,16 +33,44 @@ class tripleo::profile::base::ceilometer::collector ( $sync_db = true, ) { + $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb')) + # MongoDB + if $ceilometer_backend == 'mongodb' { + # NOTE(gfidente): We need to pass the list of IPv6 addresses *with* port and + # without the brackets as 'members' argument for the 'mongodb_replset' + # resource. + if str2bool(hiera('mongodb::server::ipv6', false)) { + $mongo_node_ips_with_port_prefixed = prefix(hiera('mongo_node_ips'), '[') + $mongo_node_ips_with_port = suffix($mongo_node_ips_with_port_prefixed, ']:27017') + $mongo_node_ips_with_port_nobr = suffix(hiera('mongo_node_ips'), ':27017') + } else { + $mongo_node_ips_with_port = suffix(hiera('mongo_node_ips'), ':27017') + $mongo_node_ips_with_port_nobr = suffix(hiera('mongo_node_ips'), ':27017') + } + $mongo_node_string = join($mongo_node_ips_with_port, ',') + + $mongodb_replset = hiera('mongodb::server::replset') + $ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}" + } + include ::tripleo::profile::base::ceilometer + if $step >= 2 and $sync_db and $ceilometer_backend == 'mysql' { + include ::ceilometer::db::mysql + } + if $step >= 3 and $sync_db { - $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb')) - if $ceilometer_backend == 'mysql' { - include ::ceilometer::db::mysql - } + include ::ceilometer::db::sync } - if $step >= 4 { + if $step >= 4 or ($step >= 3 and $sync_db) { + if $ceilometer_backend == 'mongodb' { + class { '::ceilometer::db' : + database_connection => $ceilometer_mongodb_conn_string, + } + } else { + include ::ceilometer::db + } include ::ceilometer::collector include ::ceilometer::dispatcher::gnocchi } diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp new file mode 100644 index 0000000..9552e10 --- /dev/null +++ b/manifests/profile/base/database/mysql.pp @@ -0,0 +1,85 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::database::mysql +# +# MySQL profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +# [*mysql_server_options*] +# (Optional) Extras options to deploy MySQL. Useful when deploying Galera cluster. +# Should be an hash. +# Defaults to {} +# +# [*manage_resources*] +# (Optional) Whether or not manage root user, root my.cnf, and service. +# Defaults to true +# +# [*remove_default_accounts*] +# (Optional) Whether or not remove default MySQL accounts. +# Defaults to true +# +class tripleo::profile::base::database::mysql ( + $step = hiera('step'), + $mysql_server_options = {}, + $manage_resources = true, + $remove_default_accounts = true, +) { + + validate_hash($mysql_server_options) + + # non-ha scenario + if $manage_resources { + $mysql_step = 2 + } else { + # ha scenario + $mysql_step = 1 + } + if hiera('step') >= $mysql_step { + if str2bool(hiera('enable_galera', true)) { + $mysql_config_file = '/etc/my.cnf.d/galera.cnf' + } else { + $mysql_config_file = '/etc/my.cnf.d/server.cnf' + } + # TODO Galara + # FIXME: due to https://bugzilla.redhat.com/show_bug.cgi?id=1298671 we + # set bind-address to a hostname instead of an ip address; to move Mysql + # from internal_api on another network we'll have to customize both + # MysqlNetwork and ControllerHostnameResolveNetwork in ServiceNetMap + $mysql_server_default = { + 'mysqld' => { + 'bind-address' => $::hostname, + 'max_connections' => hiera('mysql_max_connections'), + 'open_files_limit' => '-1', + } + } + $mysql_server_options_real = deep_merge($mysql_server_default, $mysql_server_options) + class { '::mysql::server': + config_file => $mysql_config_file, + override_options => $mysql_server_options_real, + create_root_user => $manage_resources, + create_root_my_cnf => $manage_resources, + service_manage => $manage_resources, + service_enabled => $manage_resources, + remove_default_accounts => $remove_default_accounts, + } + } + +} diff --git a/manifests/profile/base/horizon.pp b/manifests/profile/base/horizon.pp new file mode 100644 index 0000000..1b7df19 --- /dev/null +++ b/manifests/profile/base/horizon.pp @@ -0,0 +1,50 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::horizon +# +# Horizon profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::horizon ( + $step = hiera('step'), +) { + if $step >= 4 { + # Horizon + include ::apache::mod::remoteip + include ::apache::mod::status + if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') { + $_profile_support = 'cisco' + } else { + $_profile_support = 'None' + } + $neutron_options = {'profile_support' => $_profile_support } + $memcached_ipv6 = hiera('memcached_ipv6', false) + if $memcached_ipv6 { + $horizon_memcached_servers = hiera('memcache_node_ips_v6', '[::1]') + } else { + $horizon_memcached_servers = hiera('memcache_node_ips', '127.0.0.1') + } + class { '::horizon': + cache_server_ip => $horizon_memcached_servers, + neutron_options => $neutron_options, + } + } +} diff --git a/manifests/profile/base/mistral.pp b/manifests/profile/base/mistral.pp new file mode 100644 index 0000000..42507b9 --- /dev/null +++ b/manifests/profile/base/mistral.pp @@ -0,0 +1,39 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::mistral +# +# Mistral profile for tripleo +# +# === Parameters +# +# [*sync_db*] +# (Optional) Whether to run db sync +# Defaults to true +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::mistral ( + $sync_db = true, + $step = hiera('step'), +) { + + if $step >= 3 { + include ::mistral + include ::mistral::config + } +} diff --git a/manifests/profile/base/mistral/api.pp b/manifests/profile/base/mistral/api.pp new file mode 100644 index 0000000..b955c8d --- /dev/null +++ b/manifests/profile/base/mistral/api.pp @@ -0,0 +1,36 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::mistral::api +# +# Mistral API profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::mistral::api ( + $step = hiera('step'), +) { + + include ::tripleo::profile::base::mistral + + if $step >= 4 { + include ::mistral::api + } +} + diff --git a/manifests/profile/base/mistral/engine.pp b/manifests/profile/base/mistral/engine.pp new file mode 100644 index 0000000..141cbad --- /dev/null +++ b/manifests/profile/base/mistral/engine.pp @@ -0,0 +1,46 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::mistral::engine +# +# Mistral Engine profile for tripleo +# +# === Parameters +# +# [*sync_db*] +# (Optional) Whether to run db sync +# Defaults to undef +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::mistral::engine ( + $sync_db = true, + $step = hiera('step'), +) { + + include ::tripleo::profile::base::mistral + + if $step >= 3 and $sync_db { + include ::mistral::db::mysql + include ::mistral::db::sync + } + + if $step >= 4 { + include ::mistral::engine + } + +} diff --git a/manifests/profile/base/mistral/executor.pp b/manifests/profile/base/mistral/executor.pp new file mode 100644 index 0000000..d7b5776 --- /dev/null +++ b/manifests/profile/base/mistral/executor.pp @@ -0,0 +1,36 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::mistral::executor +# +# Mistral Executor profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::mistral::executor ( + $step = hiera('step'), +) { + + include ::tripleo::profile::base::mistral + + if $step >= 4 { + include ::mistral::executor + } + +} diff --git a/manifests/profile/base/neutron.pp b/manifests/profile/base/neutron.pp index d5efa81..1ee2d90 100644 --- a/manifests/profile/base/neutron.pp +++ b/manifests/profile/base/neutron.pp @@ -18,19 +18,14 @@ # # === Parameters # -# [*sync_db*] -# (Optional) Whether to run db sync -# Defaults to true -# # [*step*] # (Optional) The current step of the deployment # Defaults to hiera('step') # class tripleo::profile::base::neutron ( - $sync_db = true, $step = hiera('step'), ) { - if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) { + if hiera('step') >= 3 { include ::neutron include ::neutron::config } diff --git a/manifests/profile/base/neutron/agents/midonet.pp b/manifests/profile/base/neutron/agents/midonet.pp new file mode 100644 index 0000000..52cafa9 --- /dev/null +++ b/manifests/profile/base/neutron/agents/midonet.pp @@ -0,0 +1,56 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::agents::midonet +# +# Midonet Neutron agent profile +# +# === Parameters +# +# [*neutron_api_node_ips*] +# (Optional) The IPs of the Neutron API hosts +# Defaults to hiera('neutron_api_node_ips') +# +# [*midonet_libvirt_qemu_data*] +# (Optional) qemu.conf data for midonet. +# Defaults to hiera('midonet_libvirt_qemu_data') +# +# [*step*] +# (Optional) The current step of the deployment +# Defaults to hiera('step') +# +class tripleo::profile::base::neutron::agents::midonet ( + $neutron_api_node_ips = hiera('neutron_api_node_ips', ''), + $midonet_libvirt_qemu_data = hiera('midonet_libvirt_qemu_data', ''), + $step = hiera('step'), +) { + + if $step >= 4 { + + # TODO(devvesa) provide non-controller ips for these services + class { '::tripleo::network::midonet::agent': + zookeeper_servers => $neutron_api_node_ips, + cassandra_seeds => $neutron_api_node_ips + } + + if defined(Service['libvirt']) { + file { '/etc/libvirt/qemu.conf': + ensure => present, + content => hiera('midonet_libvirt_qemu_data') + } + } + + } + +} diff --git a/manifests/profile/base/neutron/agents/nuage.pp b/manifests/profile/base/neutron/agents/nuage.pp new file mode 100644 index 0000000..c50feb2 --- /dev/null +++ b/manifests/profile/base/neutron/agents/nuage.pp @@ -0,0 +1,62 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::agents::nuage +# +# Nuage Neutron agent profile +# +# === Parameters +# +# [*nova_os_tenant_name*] +# (Optional) Nova tenant name +# Defaults to hiera('nova_os_tenant_name') +# +# [*nova_os_password*] +# (Optional) Nova password +# Defaults to hiera('nova_password') +# +# [*nova_metadata_ip*] +# (Optional) Nova metadata node IPs +# Defaults to hiera('nova_metadata_node_ips') +# +# [*nova_auth_ip*] +# (Optional) Nova auth IP +# Defaults to hiera('keystone_public_api_virtual_ip') +# +# [*step*] +# (Optional) The current step of the deployment +# Defaults to hiera('step') +# +class tripleo::profile::base::neutron::agents::nuage ( + $nova_os_tenant_name = hiera('nova::api::admin_tenant_name', ''), + $nova_os_password = hiera('nova_password', ''), + $nova_metadata_ip = hiera('nova_metadata_node_ips', ''), + $nova_auth_ip = hiera('keystone_public_api_virtual_ip', ''), + $step = hiera('step'), +) { + + if $step >= 4 { + + include ::nuage::vrs + + class { '::nuage::metadataagent': + nova_os_tenant_name => $nova_os_tenant_name, + nova_os_password => $nova_os_password, + nova_metadata_ip => $nova_metadata_ip, + nova_auth_ip => $nova_auth_ip, + } + + } + +} diff --git a/manifests/profile/base/neutron/dhcp.pp b/manifests/profile/base/neutron/dhcp.pp index 180fd37..a313478 100644 --- a/manifests/profile/base/neutron/dhcp.pp +++ b/manifests/profile/base/neutron/dhcp.pp @@ -18,31 +18,18 @@ # # === Parameters # -# [*neutron_dnsmasq_options*] -# (Optional) -# Defaults to hiera('neutron_dnsmasq_options') -# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. # Defaults to hiera('step') # class tripleo::profile::base::neutron::dhcp ( - $neutron_dnsmasq_options = hiera('neutron_dnsmasq_options', ''), $step = hiera('step'), ) { if $step >= 4 { include ::tripleo::profile::base::neutron include ::neutron::agents::dhcp - file { '/etc/neutron/dnsmasq-neutron.conf': - content => $neutron_dnsmasq_options, - owner => 'neutron', - group => 'neutron', - notify => Service['neutron-dhcp-service'], - require => Package['neutron'], - } - Service<| title == 'neutron-server' |> -> Service <| title == 'neutron-dhcp' |> } } diff --git a/manifests/profile/base/neutron/midonet.pp b/manifests/profile/base/neutron/midonet.pp index 972856f..3276b82 100644 --- a/manifests/profile/base/neutron/midonet.pp +++ b/manifests/profile/base/neutron/midonet.pp @@ -82,11 +82,9 @@ class tripleo::profile::base::neutron::midonet ( ) { include ::tripleo::profile::base::neutron + include ::tripleo::profile::base::neutron::agents::midonet if $step >= 4 { - class { '::neutron': - service_plugins => [] - } # Run zookeeper in the controller if configured if zk_on_controller { @@ -106,11 +104,6 @@ class tripleo::profile::base::neutron::midonet ( } } - class {'::tripleo::network::midonet::agent': - zookeeper_servers => $neutron_api_node_ips, - cassandra_seeds => $neutron_api_node_ips - } - class {'::tripleo::network::midonet::api': zookeeper_servers => $neutron_api_node_ips, vip => $vip, diff --git a/manifests/profile/base/nova/compute.pp b/manifests/profile/base/nova/compute.pp index c73d2b1..076996a 100644 --- a/manifests/profile/base/nova/compute.pp +++ b/manifests/profile/base/nova/compute.pp @@ -44,6 +44,17 @@ class tripleo::profile::base::nova::compute ( # deploy bits to connect nova compute to neutron include ::nova::network::neutron + + # When utilising images for deployment, we need to reset the iSCSI initiator name to make it unique + # https://bugzilla.redhat.com/show_bug.cgi?id=1244328 + exec { 'reset-iscsi-initiator-name': + command => '/bin/echo InitiatorName=$(/usr/sbin/iscsi-iname) > /etc/iscsi/initiatorname.iscsi', + onlyif => '/usr/bin/test ! -f /etc/iscsi/.initiator_reset', + before => File['/etc/iscsi/.initiator_reset'], + } + file { '/etc/iscsi/.initiator_reset': + ensure => present, + } } # If NFS is used as a Cinder backend diff --git a/manifests/profile/base/pacemaker.pp b/manifests/profile/base/pacemaker.pp new file mode 100644 index 0000000..de107a9 --- /dev/null +++ b/manifests/profile/base/pacemaker.pp @@ -0,0 +1,93 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::pacemaker +# +# Pacemaker profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::pacemaker ( + $step = hiera('step'), +) { + + Pcmk_resource <| |> { + tries => 10, + try_sleep => 3, + } + + if $::hostname == downcase(hiera('bootstrap_nodeid')) { + $pacemaker_master = true + } else { + $pacemaker_master = false + } + + $enable_fencing = str2bool(hiera('enable_fencing', false)) and hiera('step') >= 5 + + if hiera('step') >= 1 { + $pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G')) + $corosync_ipv6 = str2bool(hiera('corosync_ipv6', false)) + if $corosync_ipv6 { + $cluster_setup_extras = { '--token' => hiera('corosync_token_timeout', 1000), '--ipv6' => '' } + } else { + $cluster_setup_extras = { '--token' => hiera('corosync_token_timeout', 1000) } + } + class { '::pacemaker': + hacluster_pwd => hiera('hacluster_pwd'), + } -> + class { '::pacemaker::corosync': + cluster_members => $pacemaker_cluster_members, + setup_cluster => $pacemaker_master, + cluster_setup_extras => $cluster_setup_extras, + } + class { '::pacemaker::stonith': + disable => !$enable_fencing, + } + if $enable_fencing { + include ::tripleo::fencing + + # enable stonith after all Pacemaker resources have been created + Pcmk_resource<||> -> Class['tripleo::fencing'] + Pcmk_constraint<||> -> Class['tripleo::fencing'] + Exec <| tag == 'pacemaker_constraint' |> -> Class['tripleo::fencing'] + # enable stonith after all fencing devices have been created + Class['tripleo::fencing'] -> Class['pacemaker::stonith'] + } + + # FIXME(gfidente): sets 200secs as default start timeout op + # param; until we can use pcmk global defaults we'll still + # need to add it to every resource which redefines op params + Pacemaker::Resource::Service { + op_params => 'start timeout=200s stop timeout=200s', + } + } + + if hiera('step') >= 2 { + if $pacemaker_master { + include ::pacemaker::resource_defaults + + # Create an openstack-core dummy resource. See RHBZ 1290121 + pacemaker::resource::ocf { 'openstack-core': + ocf_agent_name => 'heartbeat:Dummy', + clone_params => 'interleave=true', + } + } + } + +} diff --git a/manifests/profile/base/sahara/api.pp b/manifests/profile/base/sahara/api.pp index e9149b1..dc23d64 100644 --- a/manifests/profile/base/sahara/api.pp +++ b/manifests/profile/base/sahara/api.pp @@ -28,6 +28,6 @@ class tripleo::profile::base::sahara::api ( ) { if $step >= 4 { include ::tripleo::profile::base::sahara - include ::sahara::api + include ::sahara::service::api } } diff --git a/manifests/profile/base/sahara/engine.pp b/manifests/profile/base/sahara/engine.pp index 28aff7b..8fa1f5f 100644 --- a/manifests/profile/base/sahara/engine.pp +++ b/manifests/profile/base/sahara/engine.pp @@ -37,6 +37,6 @@ class tripleo::profile::base::sahara::engine ( if $step >= 4 or ($step >= 3 and $sync_db) { include ::tripleo::profile::base::sahara - include ::sahara::engine + include ::sahara::service::engine } } |