Browse code

Fix service start sequence

1. zmq-receiver should be started in advance
2. when using zeromq driver, nova-compute relies
on nova-conductor's rpc to be initialized

This fix is totally safe and won't influence
on other services.

Change-Id: I9d7b682df4d411af24a1ff6bcad79697e32fa723
Partially-Implements: blueprint zeromq

Li Ma authored on 2014/12/22 16:41:07
Showing 2 changed files
... ...
@@ -769,8 +769,8 @@ function start_nova_rest {
769 769
 }
770 770
 
771 771
 function start_nova {
772
-    start_nova_compute
773 772
     start_nova_rest
773
+    start_nova_compute
774 774
 }
775 775
 
776 776
 function stop_nova_compute {
... ...
@@ -1030,6 +1030,14 @@ if is_service_enabled key; then
1030 1030
 fi
1031 1031
 
1032 1032
 
1033
+# ZeroMQ
1034
+# ------
1035
+if is_service_enabled zeromq; then
1036
+    echo_summary "Starting zeromq receiver"
1037
+    run_process zeromq "$OSLO_BIN_DIR/oslo-messaging-zmq-receiver"
1038
+fi
1039
+
1040
+
1033 1041
 # Horizon
1034 1042
 # -------
1035 1043
 
... ...
@@ -1208,11 +1216,6 @@ if is_service_enabled nova; then
1208 1208
     iniset $NOVA_CONF keymgr fixed_key $(generate_hex_string 32)
1209 1209
 fi
1210 1210
 
1211
-if is_service_enabled zeromq; then
1212
-    echo_summary "Starting zermomq receiver"
1213
-    run_process zeromq "$OSLO_BIN_DIR/oslo-messaging-zmq-receiver"
1214
-fi
1215
-
1216 1211
 # Launch the nova-api and wait for it to answer before continuing
1217 1212
 if is_service_enabled n-api; then
1218 1213
     echo_summary "Starting Nova API"