aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/pacemaker
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2016-07-29 12:06:29 +0200
committerMichele Baldessari <michele@acksyn.org>2016-07-29 13:37:16 +0200
commit0bc4c11c671f669feb1be1f5b58994e534f5dd35 (patch)
tree25bdcd3dec53fd627663d6850f8a45d0b2b0eee8 /manifests/profile/pacemaker
parent171a747061892cc37f6f1f1181d48723e4e17995 (diff)
Move constraints to their respective services
The openstack-core-then-httpd constraint needs to live in the apache pacemaker manifest and not in the main controller manifest file. The same goes for those specific vsm/cisco neutron resources. Change-Id: I2041d4d163f051427b62eec07b8345ad7006cc1d
Diffstat (limited to 'manifests/profile/pacemaker')
-rw-r--r--manifests/profile/pacemaker/apache.pp10
-rw-r--r--manifests/profile/pacemaker/neutron.pp26
2 files changed, 36 insertions, 0 deletions
diff --git a/manifests/profile/pacemaker/apache.pp b/manifests/profile/pacemaker/apache.pp
index f23d3e7..4b0b16e 100644
--- a/manifests/profile/pacemaker/apache.pp
+++ b/manifests/profile/pacemaker/apache.pp
@@ -44,5 +44,15 @@ class tripleo::profile::pacemaker::apache (
clone_params => 'interleave=true',
verify_on_create => true,
}
+ pacemaker::constraint::base { 'openstack-core-then-httpd-constraint':
+ constraint_type => 'order',
+ first_resource => 'openstack-core-clone',
+ second_resource => "${::apache::params::service_name}-clone",
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::apache::params::service_name],
+ Pacemaker::Resource::Ocf['openstack-core']],
+ }
}
+
}
diff --git a/manifests/profile/pacemaker/neutron.pp b/manifests/profile/pacemaker/neutron.pp
index 75a75b3..0298298 100644
--- a/manifests/profile/pacemaker/neutron.pp
+++ b/manifests/profile/pacemaker/neutron.pp
@@ -181,5 +181,31 @@ class tripleo::profile::pacemaker::neutron (
Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]]
}
}
+
+ #VSM
+ if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
+ pacemaker::resource::ocf { 'vsm-p' :
+ ocf_agent_name => 'heartbeat:VirtualDomain',
+ resource_params => 'force_stop=true config=/var/spool/cisco/vsm/vsm_primary_deploy.xml',
+ require => Class['n1k_vsm'],
+ meta_params => 'resource-stickiness=INFINITY',
+ }
+ if str2bool(hiera('n1k_vsm::pacemaker_control', true)) {
+ pacemaker::resource::ocf { 'vsm-s' :
+ ocf_agent_name => 'heartbeat:VirtualDomain',
+ resource_params => 'force_stop=true config=/var/spool/cisco/vsm/vsm_secondary_deploy.xml',
+ require => Class['n1k_vsm'],
+ meta_params => 'resource-stickiness=INFINITY',
+ }
+ pacemaker::constraint::colocation { 'vsm-colocation-contraint':
+ source => 'vsm-p',
+ target => 'vsm-s',
+ score => '-INFINITY',
+ require => [Pacemaker::Resource::Ocf['vsm-p'],
+ Pacemaker::Resource::Ocf['vsm-s']],
+ }
+ }
+ }
+
}
}