Browse code

Neutron: create network resources when agents are started

Creating network resources before the agents start with the ml2
plugin might result in bnding failures for some resources such as
DHCP ports because the resources are created before the agents
report to the server.

This patch should ensure all agents have started and reported
their state to the server before creating network resources.

Change-Id: Ifafb73bd3c5409a555a573ad9a94b96d79061c38
Related-Bug: #1253896
(cherry picked from commit 6fbb28d021d168271bb2a0643059e8c65c8ce74b)

Salvatore Orlando authored on 2013/12/23 00:59:37
Showing 1 changed files
... ...
@@ -1087,10 +1087,7 @@ fi
1087 1087
 
1088 1088
 if is_service_enabled q-svc; then
1089 1089
     echo_summary "Starting Neutron"
1090
-
1091 1090
     start_neutron_service_and_check
1092
-    create_neutron_initial_network
1093
-    setup_neutron_debug
1094 1091
 elif is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-net; then
1095 1092
     NM_CONF=${NOVA_CONF}
1096 1093
     if is_service_enabled n-cell; then
... ...
@@ -1110,6 +1107,12 @@ fi
1110 1110
 if is_service_enabled neutron; then
1111 1111
     start_neutron_agents
1112 1112
 fi
1113
+# Once neutron agents are started setup initial network elements
1114
+if is_service_enabled q-svc; then
1115
+    echo_summary "Creating initial neutron network elements"
1116
+    create_neutron_initial_network
1117
+    setup_neutron_debug
1118
+fi
1113 1119
 if is_service_enabled nova; then
1114 1120
     echo_summary "Starting Nova"
1115 1121
     start_nova