diff options
author | Michele Baldessari <michele@acksyn.org> | 2016-07-26 14:21:49 +0200 |
---|---|---|
committer | Michele Baldessari <michele@acksyn.org> | 2016-07-27 22:49:40 +0200 |
commit | a93d22f45a24a16b253f6842a087d850763926eb (patch) | |
tree | 18eec3eda07679ff84cef592d15bc8e7004de2a2 /manifests/profile/pacemaker/nova/api.pp | |
parent | 7a4ac41ec499867a38a9078eea356b9912fbf3c0 (diff) |
Move nova constraints from controller manifest to each service
Currently we are still creating all the pacemaker constraints for nova
in the main overcloud_controller_pacemaker.pp manifest file.
Let's move those to each role where they belong. Note that given
that a constraint depends on two separate pacemaker resources it is
a bit arbitrary in which file they end up being (the one of the first
resource or the second one).
Change-Id: I96a3a313d15fac820b020feae0568437c2cbade3
Diffstat (limited to 'manifests/profile/pacemaker/nova/api.pp')
-rw-r--r-- | manifests/profile/pacemaker/nova/api.pp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/manifests/profile/pacemaker/nova/api.pp b/manifests/profile/pacemaker/nova/api.pp index 8a6dc8d..5e8f15f 100644 --- a/manifests/profile/pacemaker/nova/api.pp +++ b/manifests/profile/pacemaker/nova/api.pp @@ -48,6 +48,40 @@ class tripleo::profile::pacemaker::nova::api ( pacemaker::resource::service { $::nova::params::api_service_name: clone_params => 'interleave=true', } + + pacemaker::constraint::base { 'nova-vncproxy-then-nova-api-constraint': + constraint_type => 'order', + first_resource => "${::nova::params::vncproxy_service_name}-clone", + second_resource => "${::nova::params::api_service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name], + Pacemaker::Resource::Service[$::nova::params::api_service_name]], + } + pacemaker::constraint::colocation { 'nova-api-with-nova-vncproxy-colocation': + source => "${::nova::params::api_service_name}-clone", + target => "${::nova::params::vncproxy_service_name}-clone", + score => 'INFINITY', + require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name], + Pacemaker::Resource::Service[$::nova::params::api_service_name]], + } + pacemaker::constraint::base { 'nova-api-then-nova-scheduler-constraint': + constraint_type => 'order', + first_resource => "${::nova::params::api_service_name}-clone", + second_resource => "${::nova::params::scheduler_service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::nova::params::api_service_name], + Pacemaker::Resource::Service[$::nova::params::scheduler_service_name]], + } + pacemaker::constraint::colocation { 'nova-scheduler-with-nova-api-colocation': + source => "${::nova::params::scheduler_service_name}-clone", + target => "${::nova::params::api_service_name}-clone", + score => 'INFINITY', + require => [Pacemaker::Resource::Service[$::nova::params::api_service_name], + Pacemaker::Resource::Service[$::nova::params::scheduler_service_name]], + } + } } |