On the controller node where devstack is being run should create
the neutron network. The compute node should not.
The the case that we want to run a multi-node neutron setup we need
to configure the following (in the case that a plugin does not
have any agents running on the compute node):
ENABLED_SERVICES=n-cpu,neutron
In addition to this the code did not enable decomposed plugins to
configure their nova configurations if necessary.
This patch ensure that the multi-node support works.
Change-Id: I8e80edd453a1106ca666d6c531b2433be631bce4
Closes-bug: #1613069
... | ... |
@@ -305,6 +305,9 @@ function configure_neutron_nova_new { |
305 | 305 |
|
306 | 306 |
iniset $NOVA_CONF DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver |
307 | 307 |
|
308 |
+ # optionally set options in nova_conf |
|
309 |
+ neutron_plugin_create_nova_conf |
|
310 |
+ |
|
308 | 311 |
if is_service_enabled neutron-metadata-agent; then |
309 | 312 |
iniset $NOVA_CONF neutron service_metadata_proxy "True" |
310 | 313 |
fi |
... | ... |
@@ -140,6 +140,14 @@ function _neutron_get_ext_gw_interface { |
140 | 140 |
} |
141 | 141 |
|
142 | 142 |
function create_neutron_initial_network { |
143 |
+ if ! is_service_enabled q-svc && ! is_service_enabled neutron-api; then |
|
144 |
+ echo "Controller services not enabled. No networks configured!" |
|
145 |
+ return |
|
146 |
+ fi |
|
147 |
+ if [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "False" ]]; then |
|
148 |
+ echo "Network creation disabled!" |
|
149 |
+ return |
|
150 |
+ fi |
|
143 | 151 |
local project_id |
144 | 152 |
project_id=$(openstack project list | grep " demo " | get_field 1) |
145 | 153 |
die_if_not_set $LINENO project_id "Failure retrieving project_id for demo" |
... | ... |
@@ -1248,10 +1248,7 @@ if is_service_enabled neutron; then |
1248 | 1248 |
start_neutron |
1249 | 1249 |
fi |
1250 | 1250 |
# Once neutron agents are started setup initial network elements |
1251 |
-if is_service_enabled q-svc && [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "True" ]]; then |
|
1252 |
- echo_summary "Creating initial neutron network elements" |
|
1253 |
- create_neutron_initial_network |
|
1254 |
-fi |
|
1251 |
+create_neutron_initial_network |
|
1255 | 1252 |
|
1256 | 1253 |
if is_service_enabled nova; then |
1257 | 1254 |
echo_summary "Starting Nova" |