make sure we start nova-compute after nova-conductor
authorEmilien Macchi <emilien@redhat.com>
Tue, 5 Jul 2016 19:26:30 +0000 (15:26 -0400)
committerEmilien Macchi <emilien@redhat.com>
Thu, 7 Jul 2016 02:47:30 +0000 (22:47 -0400)
When nova-compute and nova-conductor are collocated, we need to make
sure nova-conductor starts before nova-compute otherwise nova-compute
will just fail to start.

Change-Id: Icc3ed768af2a08e2db78d9c9278d309a62d26850

manifests/profile/base/nova/compute.pp
manifests/profile/pacemaker/nova/conductor.pp

index 16b61df..c73d2b1 100644 (file)
@@ -38,6 +38,9 @@ class tripleo::profile::base::nova::compute (
 
     # deploy basic bits for nova-compute
     include ::nova::compute
+    # If Service['nova-conductor'] is in catalog, make sure we start it
+    # before nova-compute.
+    Service<| title == 'nova-conductor' |> -> Service['nova-compute']
 
     # deploy bits to connect nova compute to neutron
     include ::nova::network::neutron
index 495c92e..3d5e41e 100644 (file)
@@ -47,6 +47,11 @@ class tripleo::profile::pacemaker::nova::conductor (
     pacemaker::resource::service { $::nova::params::conductor_service_name:
       clone_params => 'interleave=true',
     }
+    # If Service['nova-compute'] is in catalog, make sure we start it after
+    # nova-conductor pcmk resource.
+    # Also make sure to restart nova-compute if nova-conductor pcmk resource changed
+    # the state, since nova-compute is deployed at a previous step.
+    Pacemaker::Resource::Service[$::nova::params::conductor_service_name] ~> Service<| title == 'nova-compute' |>
   }
 
 }