Add base constraint so gnocchi metricd is tied to core-clone
authorPradeep Kilambi <pkilambi@redhat.com>
Wed, 20 Jul 2016 13:06:20 +0000 (09:06 -0400)
committerPradeep Kilambi <pkilambi@redhat.com>
Wed, 20 Jul 2016 15:11:09 +0000 (15:11 +0000)
Currently if we manually restart the cluster saometimes gnocchi statsd
doesnt comeup as galera is not up yet. This should tie the metrics to
core and follow the order.

Closes-bug: #1604860

Change-Id: I5ec29622938336410b91785ca49b410bcdd30cdd

manifests/profile/pacemaker/gnocchi.pp

index 98d1b36..cbe7ea1 100644 (file)
@@ -68,6 +68,15 @@ class tripleo::profile::pacemaker::gnocchi (
 
   if $step >= 5 and $pacemaker_master {
 
+    pacemaker::constraint::base { 'keystone-then-gnocchi-metricd-constraint':
+      constraint_type => 'order',
+      first_resource  => 'openstack-core-clone',
+      second_resource => "${::gnocchi::params::metricd_service_name}-clone",
+      first_action    => 'start',
+      second_action   => 'start',
+      require         => [Pacemaker::Resource::Service[$::gnocchi::params::metricd_service_name],
+                          Pacemaker::Resource::Ocf['openstack-core']],
+    }
     pacemaker::constraint::base { 'gnocchi-metricd-then-gnocchi-statsd-constraint':
       constraint_type => 'order',
       first_resource  => "${::gnocchi::params::metricd_service_name}-clone",