summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--environments/puppet-pacemaker.yaml1
-rw-r--r--overcloud-resource-registry-puppet.yaml1
-rw-r--r--overcloud.yaml1
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp59
-rw-r--r--puppet/services/pacemaker.yaml19
5 files changed, 22 insertions, 59 deletions
diff --git a/environments/puppet-pacemaker.yaml b/environments/puppet-pacemaker.yaml
index 0d365fa2..00698c1d 100644
--- a/environments/puppet-pacemaker.yaml
+++ b/environments/puppet-pacemaker.yaml
@@ -33,6 +33,7 @@ resource_registry:
OS::TripleO::Services::RabbitMQ: ../puppet/services/pacemaker/rabbitmq.yaml
OS::TripleO::Services::HAproxy: ../puppet/services/pacemaker/haproxy.yaml
OS::TripleO::Services::Memcached: ../puppet/services/pacemaker/memcached.yaml
+ OS::TripleO::Services::Pacemaker: ../puppet/services/pacemaker.yaml
OS::TripleO::Services::Redis: ../puppet/services/pacemaker/database/redis.yaml
OS::TripleO::Services::NovaConductor: ../puppet/services/pacemaker/nova-conductor.yaml
OS::TripleO::Services::MongoDb: ../puppet/services/pacemaker/database/mongodb.yaml
diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml
index 94263fc8..06589ac5 100644
--- a/overcloud-resource-registry-puppet.yaml
+++ b/overcloud-resource-registry-puppet.yaml
@@ -159,6 +159,7 @@ resource_registry:
OS::TripleO::Services::NeutronCorePluginMidonet: puppet/services/neutron-midonet.yaml
OS::TripleO::Services::NeutronOvsAgent: puppet/services/neutron-ovs-agent.yaml
OS::TripleO::Services::ComputeNeutronOvsAgent: puppet/services/neutron-ovs-agent.yaml
+ OS::TripleO::Services::Pacemaker: OS::Heat::None
OS::TripleO::Services::RabbitMQ: puppet/services/rabbitmq.yaml
OS::TripleO::Services::HAproxy: puppet/services/haproxy.yaml
OS::TripleO::Services::Keepalived: puppet/services/keepalived.yaml
diff --git a/overcloud.yaml b/overcloud.yaml
index 9c14121b..bac959c5 100644
--- a/overcloud.yaml
+++ b/overcloud.yaml
@@ -397,6 +397,7 @@ parameters:
- OS::TripleO::Services::HAproxy
- OS::TripleO::Services::Keepalived
- OS::TripleO::Services::Memcached
+ - OS::TripleO::Services::Pacemaker
- OS::TripleO::Services::Redis
- OS::TripleO::Services::NovaConductor
- OS::TripleO::Services::MongoDb
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index aae5a09f..313aec6d 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -13,11 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-Pcmk_resource <| |> {
- tries => 10,
- try_sleep => 3,
-}
-
# TODO(jistr): use pcs resource provider instead of just no-ops
Service <|
tag == 'aodh-service' or
@@ -40,52 +35,7 @@ if $::hostname == downcase(hiera('bootstrap_nodeid')) {
$sync_db = false
}
-$enable_fencing = str2bool(hiera('enable_fencing', false)) and hiera('step') >= 5
-$enable_load_balancer = hiera('enable_load_balancer', true)
-
-# When to start and enable services which haven't been Pacemakerized
-# FIXME: remove when we start all OpenStack services using Pacemaker
-# (occurrences of this variable will be gradually replaced with false)
-$non_pcmk_start = 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',
- }
-
# Galera
if str2bool(hiera('enable_galera', true)) {
$mysql_config_file = '/etc/my.cnf.d/galera.cnf'
@@ -163,15 +113,6 @@ if hiera('step') >= 2 {
$mongodb_replset = hiera('mongodb::server::replset')
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 => true,
- }
-
pacemaker::resource::ocf { 'galera' :
ocf_agent_name => 'heartbeat:galera',
op_params => 'promote timeout=300s on-fail=block',
diff --git a/puppet/services/pacemaker.yaml b/puppet/services/pacemaker.yaml
new file mode 100644
index 00000000..dc1d6e40
--- /dev/null
+++ b/puppet/services/pacemaker.yaml
@@ -0,0 +1,19 @@
+heat_template_version: 2016-04-08
+
+description: >
+ Pacemaker service configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+
+outputs:
+ role_data:
+ description: Role data for the Pacemaker role.
+ value:
+ config_settings:
+ step_config: |
+ include ::tripleo::profile::base::pacemaker