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

Salvatore Orlando authored on 2013/12/23 00:59:37
Showing 1 changed files
... ...
@@ -1104,10 +1104,7 @@ fi
1104 1104
 
1105 1105
 if is_service_enabled q-svc; then
1106 1106
     echo_summary "Starting Neutron"
1107
-
1108 1107
     start_neutron_service_and_check
1109
-    create_neutron_initial_network
1110
-    setup_neutron_debug
1111 1108
 elif is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-net; then
1112 1109
     NM_CONF=${NOVA_CONF}
1113 1110
     if is_service_enabled n-cell; then
... ...
@@ -1127,6 +1124,12 @@ fi
1127 1127
 if is_service_enabled neutron; then
1128 1128
     start_neutron_agents
1129 1129
 fi
1130
+# Once neutron agents are started setup initial network elements
1131
+if is_service_enabled q-svc; then
1132
+    echo_summary "Creating initial neutron network elements"
1133
+    create_neutron_initial_network
1134
+    setup_neutron_debug
1135
+fi
1130 1136
 if is_service_enabled nova; then
1131 1137
     echo_summary "Starting Nova"
1132 1138
     start_nova