From 69d9d5cf1c3505cb7259a729badd0b6ffc8edeb7 Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Thu, 21 May 2015 11:28:25 +0200 Subject: Add Cinder services as Pacemaker resources Add Pacemaker resources for Cinder services, also add relevant ordering and colocation constraints. Change-Id: Idc2e1b5ec96d882543f7a1a4ec723a010020ab02 --- puppet/manifests/overcloud_controller_pacemaker.pp | 58 +++++++++++++++++++--- 1 file changed, 51 insertions(+), 7 deletions(-) (limited to 'puppet/manifests') diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index ce8e81ee..6daa7f87 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -502,16 +502,16 @@ if hiera('step') >= 3 { include ::cinder class { '::cinder::api': sync_db => $sync_db, - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::cinder::scheduler' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::cinder::volume' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } include ::cinder::glance class {'cinder::setup_test_volume': @@ -694,5 +694,49 @@ if hiera('step') >= 3 { } #END STEP 3 if hiera('step') >= 4 { - # TODO: pacemaker::resource::service for OpenStack services go here + if $pacemaker_master { + + # Cinder + pacemaker::resource::service { $::cinder::params::api_service : + clone_params => "interleave=true", + } + pacemaker::resource::service { $::cinder::params::scheduler_service : + clone_params => "interleave=true", + } + pacemaker::resource::service { $::cinder::params::volume_service : } + + pacemaker::constraint::base { 'cinder-api-then-cinder-scheduler-constraint': + constraint_type => "order", + first_resource => "${::cinder::params::api_service}-clone", + second_resource => "${::cinder::params::scheduler_service}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::cinder::params::api_service], + Pacemaker::Resource::Service[$::cinder::params::scheduler_service]], + } + pacemaker::constraint::colocation { 'cinder-scheduler-with-cinder-api-colocation': + source => "${::cinder::params::scheduler_service}-clone", + target => "${::cinder::params::api_service}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service[$::cinder::params::api_service], + Pacemaker::Resource::Service[$::cinder::params::scheduler_service]], + } + pacemaker::constraint::base { 'cinder-scheduler-then-cinder-volume-constraint': + constraint_type => "order", + first_resource => "${::cinder::params::scheduler_service}-clone", + second_resource => "${::cinder::params::volume_service}", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::cinder::params::scheduler_service], + Pacemaker::Resource::Service[$::cinder::params::volume_service]], + } + pacemaker::constraint::colocation { 'cinder-volume-with-cinder-scheduler-colocation': + source => "${::cinder::params::volume_service}", + target => "${::cinder::params::scheduler_service}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service[$::cinder::params::scheduler_service], + Pacemaker::Resource::Service[$::cinder::params::volume_service]], + } + + } } #END STEP 4 -- cgit 1.2.3-korg