diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-06-16 10:41:57 +0000 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-06-17 10:44:09 +0000 |
commit | dec4212f8c074765f2e26c78ac10a306653685e8 (patch) | |
tree | 5a38ef596edd85e4eff656921e178492e40ed33e | |
parent | a0cdc9afae9e481710997d5522670324201004c9 (diff) | |
download | definitions-dec4212f8c074765f2e26c78ac10a306653685e8.tar.gz |
OpenStack: avoid running OpenVSwitch in the Controller
Avoid running OpenVSwitch in the Controller node for a three-node
OpenStack system.
Change-Id: I7a2da7f1d3ff1ed3dce5060675560d0a04996563
-rw-r--r-- | extensions/openstack-network.configure | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/extensions/openstack-network.configure b/extensions/openstack-network.configure index 10be5a1c..9128f845 100644 --- a/extensions/openstack-network.configure +++ b/extensions/openstack-network.configure @@ -23,6 +23,36 @@ enable(){ "$ROOT/etc/systemd/system/multi-user.target.wants/$1.service" } +unnaceptable(){ + eval echo Unexpected value \$$1 for $1 >&2 + exit 1 +} + +check_bool(){ + case "$(eval echo \"\$$1\")" in + True|'') + eval "$1=true" + ;; + False) + eval "$1=false" + ;; + *) + unnaceptable "$1" + ;; + esac +} + +########################################################################## +# Check variables +########################################################################## + +check_bool NEUTRON_ENABLE_MANAGER +check_bool NEUTRON_ENABLE_AGENT + +if ! "$NEUTRON_ENABLE_MANAGER" && ! "$NEUTRON_ENABLE_AGENT"; then + exit 0 +fi + ################### # Enable services # ################### |