aboutsummaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2016-07-11 15:47:28 -0400
committerEmilien Macchi <emilien@redhat.com>2016-07-13 13:19:34 +0000
commitd91bb38e1d8686cbe9bc5f36ee282d0a6ac1b619 (patch)
treedad4b51cc235668ac9e2a8b317b906876adefb91 /puppet
parentf12f7f33ddb953259259151faea2edb7f0f070fe (diff)
Composable Pacemaker service
Deploy Pacemaker using composable services. Change-Id: I038514812af5a9f30260a81ea3366d46bee4ee4e Depends-On: I46215f82480854b5e04aef1ac1609dd99455181b Closes-Bug: #1601970
Diffstat (limited to 'puppet')
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp59
-rw-r--r--puppet/services/pacemaker.yaml19
2 files changed, 19 insertions, 59 deletions
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