Add special handling of neutron-server service startup to fix race
authorGiulio Fidente <gfidente@redhat.com>
Tue, 23 Jun 2015 11:41:19 +0000 (13:41 +0200)
committermarios <marios@redhat.com>
Tue, 23 Jun 2015 16:37:03 +0000 (19:37 +0300)
Neutron will populate the database with some data as soon as the
neutron-server service is started; we want this to happen from a
single node before normal Pacemaker initialization.

Change-Id: I422972502fbb10ddae3201464bbd6885749de31e
Closes-Bug: 1467904
Closes-Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1233061

puppet/manifests/overcloud_controller_pacemaker.pp

index ed4f351..8ad7239 100644 (file)
@@ -839,6 +839,16 @@ if hiera('step') >= 4 {
     }
 
     # Neutron
+    # NOTE(gfidente): Neutron will try to populate the database with some data
+    # as soon as neutron-server is started; to avoid races we want to make this
+    # happen only on one node, before normal Pacemaker initialization
+    # https://bugzilla.redhat.com/show_bug.cgi?id=1233061
+    exec { 'neutron-server-start-wait-stop' :
+      command   => "systemctl start neutron-server && \
+                    sleep 5s && \
+                    systemctl stop neutron-server",
+      path      => ["/usr/bin", "/usr/sbin"],
+    } ->
     pacemaker::resource::service { $::neutron::params::server_service:
       op_params => "start timeout=90",
       clone_params   => "interleave=true",