aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/manifests
diff options
context:
space:
mode:
authorJiri Stransky <jistr@redhat.com>2015-05-21 11:28:25 +0200
committerGiulio Fidente <gfidente@redhat.com>2015-05-21 17:04:26 +0200
commit69d9d5cf1c3505cb7259a729badd0b6ffc8edeb7 (patch)
tree93d9916ff6fd28b6cba2927b6e8fb0c88e978c58 /puppet/manifests
parent87f2c951b895ff01dd49a2afc858664b0c6ef5a3 (diff)
Add Cinder services as Pacemaker resources
Add Pacemaker resources for Cinder services, also add relevant ordering and colocation constraints. Change-Id: Idc2e1b5ec96d882543f7a1a4ec723a010020ab02
Diffstat (limited to 'puppet/manifests')
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp58
1 files changed, 51 insertions, 7 deletions
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