Merge "docs: Move tip about Extension Drivers into misc section"
diff --git a/doc/source/guides/neutron.rst b/doc/source/guides/neutron.rst
index cf48e22..e99a143 100644
--- a/doc/source/guides/neutron.rst
+++ b/doc/source/guides/neutron.rst
@@ -178,6 +178,34 @@
DevStack will use the external router for L3 connectivity, as opposed
to the neutron L3 service.
+Physical Network Setup
+----------------------
+
+.. nwdiag::
+
+ nwdiag {
+ inet [ shape = cloud ];
+ router;
+ inet -- router;
+
+ network provider_net {
+ address = "203.0.113.0/24"
+ router [ address = "203.0.113.1" ];
+ controller;
+ compute1;
+ compute2;
+ }
+
+ network control_plane {
+ router [ address = "10.0.0.1" ]
+ address = "10.0.0.0/24"
+ controller [ address = "10.0.0.2" ]
+ compute1 [ address = "10.0.0.3" ]
+ compute2 [ address = "10.0.0.4" ]
+ }
+ }
+
+
Service Configuration
---------------------
@@ -203,8 +231,21 @@
::
+ HOST_IP=10.0.0.2
+ SERVICE_HOST=10.0.0.2
+ MYSQL_HOST=10.0.0.2
+ SERVICE_HOST=10.0.0.2
+ MYSQL_HOST=10.0.0.2
+ RABBIT_HOST=10.0.0.2
+ GLANCE_HOSTPORT=10.0.0.2:9292
PUBLIC_INTERFACE=eth1
+ ADMIN_PASSWORD=secrete
+ MYSQL_PASSWORD=secrete
+ RABBIT_PASSWORD=secrete
+ SERVICE_PASSWORD=secrete
+ SERVICE_TOKEN=secrete
+
## Neutron options
Q_USE_SECGROUP=True
ENABLE_TENANT_VLANS=True
@@ -236,24 +277,37 @@
allocated to you, so that you could access your instances from the
public internet.
-The following is a snippet of the DevStack configuration on the
-compute node.
+The following is the DevStack configuration on
+compute node 1.
::
+ HOST_IP=10.0.0.3
+ SERVICE_HOST=10.0.0.2
+ MYSQL_HOST=10.0.0.2
+ SERVICE_HOST=10.0.0.2
+ MYSQL_HOST=10.0.0.2
+ RABBIT_HOST=10.0.0.2
+ GLANCE_HOSTPORT=10.0.0.2:9292
+ ADMIN_PASSWORD=secrete
+ MYSQL_PASSWORD=secrete
+ RABBIT_PASSWORD=secrete
+ SERVICE_PASSWORD=secrete
+ SERVICE_TOKEN=secrete
+
# Services that a compute node runs
ENABLED_SERVICES=n-cpu,rabbit,q-agt
## Neutron options
- Q_USE_SECGROUP=True
- ENABLE_TENANT_VLANS=True
- TENANT_VLAN_RANGE=3001:4000
PHYSICAL_NETWORK=default
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_INTERFACE=eth1
Q_USE_PROVIDER_NETWORKING=True
Q_L3_ENABLED=False
+Compute node 2's configuration will be exactly the same, except
+`HOST_IP` will be `10.0.0.4`
+
When DevStack is configured to use provider networking (via
`Q_USE_PROVIDER_NETWORKING` is True and `Q_L3_ENABLED` is False) -
DevStack will automatically add the network interface defined in
diff --git a/functions-common b/functions-common
index f9e0b5a..08e5e7f 100644
--- a/functions-common
+++ b/functions-common
@@ -1729,6 +1729,7 @@
# the source phase corresponds to settings loading in plugins
if [[ "$mode" == "source" ]]; then
load_plugin_settings
+ verify_disabled_services
elif [[ "$mode" == "override_defaults" ]]; then
plugin_override_defaults
else
@@ -1784,25 +1785,26 @@
ENABLED_SERVICES=$(remove_disabled_services "$remaining" "$to_remove")
}
-# disable_service() removes the services passed as argument to the
-# ``ENABLED_SERVICES`` list, if they are present.
+# disable_service() prepares the services passed as argument to be
+# removed from the ``ENABLED_SERVICES`` list, if they are present.
#
# For example:
# disable_service rabbit
#
-# This function does not know about the special cases
-# for nova, glance, and neutron built into is_service_enabled().
-# Uses global ``ENABLED_SERVICES``
+# Uses global ``DISABLED_SERVICES``
# disable_service service [service ...]
function disable_service {
- local tmpsvcs=",${ENABLED_SERVICES},"
+ local disabled_svcs="${DISABLED_SERVICES}"
+ local enabled_svcs=",${ENABLED_SERVICES},"
local service
for service in $@; do
+ disabled_svcs+=",$service"
if is_service_enabled $service; then
- tmpsvcs=${tmpsvcs//,$service,/,}
+ enabled_svcs=${enabled_svcs//,$service,/,}
fi
done
- ENABLED_SERVICES=$(_cleanup_service_list "$tmpsvcs")
+ DISABLED_SERVICES=$(_cleanup_service_list "$disabled_svcs")
+ ENABLED_SERVICES=$(_cleanup_service_list "$enabled_svcs")
}
# enable_service() adds the services passed as argument to the
@@ -1819,6 +1821,10 @@
local tmpsvcs="${ENABLED_SERVICES}"
local service
for service in $@; do
+ if [[ ,${DISABLED_SERVICES}, =~ ,${service}, ]]; then
+ warn $LINENO "Attempt to enable_service ${service} when it has been disabled"
+ continue
+ fi
if ! is_service_enabled $service; then
tmpsvcs+=",$service"
fi
@@ -1923,6 +1929,18 @@
return 0
}
+# Make sure that nothing has manipulated ENABLED_SERVICES in a way
+# that conflicts with prior calls to disable_service.
+# Uses global ``ENABLED_SERVICES``
+function verify_disabled_services {
+ local service
+ for service in ${ENABLED_SERVICES//,/ }; do
+ if [[ ,${DISABLED_SERVICES}, =~ ,${service}, ]]; then
+ die $LINENO "ENABLED_SERVICES directly modified to overcome 'disable_service ${service}'"
+ fi
+ done
+}
+
# System Functions
# ================
diff --git a/stack.sh b/stack.sh
index db0ff98..b65c558 100755
--- a/stack.sh
+++ b/stack.sh
@@ -553,6 +553,7 @@
# Phase: source
run_phase source
+
# Interactive Configuration
# -------------------------