The following git commit a86c31ba1544528cd8473896076e8b1b4ef14bce
changes the following variables in ovs_quantum_plugin.ini from
(enable-tunneling, local-ip) to enable_tunneling, local_ip).
Therefore the quantum configuration section of stack.sh needs
to also update these variable names.
Fixes bug 1015333
Removes the logic used for plugins.ini which is no
longer needed and adds a mv to copy policy.json
Fixes bug 1015418
Change-Id: Ib4f39b3095bab3db116395e750cef695113340e8
| ... | ... |
@@ -1116,20 +1116,15 @@ if is_service_enabled quantum; then |
| 1116 | 1116 |
echo "OVS 1.4+ is required for tunneling between multiple hosts." |
| 1117 | 1117 |
exit 1 |
| 1118 | 1118 |
fi |
| 1119 |
- sudo sed -i -e "s/.*enable-tunneling = .*$/enable-tunneling = $OVS_ENABLE_TUNNELING/g" /$Q_PLUGIN_CONF_FILE |
|
| 1119 |
+ sudo sed -i -e "s/.*enable_tunneling = .*$/enable_tunneling = $OVS_ENABLE_TUNNELING/g" /$Q_PLUGIN_CONF_FILE |
|
| 1120 | 1120 |
fi |
| 1121 | 1121 |
fi |
| 1122 | 1122 |
|
| 1123 | 1123 |
# Quantum service (for controller node) |
| 1124 | 1124 |
if is_service_enabled q-svc; then |
| 1125 |
- # must remove this file from existing location, otherwise Quantum will prefer it |
|
| 1126 |
- if [[ -e $QUANTUM_DIR/etc/plugins.ini ]]; then |
|
| 1127 |
- # Support prior to common config |
|
| 1128 |
- Q_PLUGIN_INI_FILE=/etc/quantum/plugins.ini |
|
| 1129 |
- sudo mv $QUANTUM_DIR/etc/plugins.ini $Q_PLUGIN_INI_FILE |
|
| 1130 |
- fi |
|
| 1131 | 1125 |
Q_CONF_FILE=/etc/quantum/quantum.conf |
| 1132 | 1126 |
Q_API_PASTE_FILE=/etc/quantum/api-paste.ini |
| 1127 |
+ Q_POLICY_FILE=/etc/quantum/policy.json |
|
| 1133 | 1128 |
|
| 1134 | 1129 |
if [[ -e $QUANTUM_DIR/etc/quantum.conf ]]; then |
| 1135 | 1130 |
sudo mv $QUANTUM_DIR/etc/quantum.conf $Q_CONF_FILE |
| ... | ... |
@@ -1139,6 +1134,10 @@ if is_service_enabled q-svc; then |
| 1139 | 1139 |
sudo mv $QUANTUM_DIR/etc/api-paste.ini $Q_API_PASTE_FILE |
| 1140 | 1140 |
fi |
| 1141 | 1141 |
|
| 1142 |
+ if [[ -e $QUANTUM_DIR/etc/policy.json ]]; then |
|
| 1143 |
+ sudo mv $QUANTUM_DIR/etc/policy.json $Q_POLICY_FILE |
|
| 1144 |
+ fi |
|
| 1145 |
+ |
|
| 1142 | 1146 |
if is_service_enabled mysql; then |
| 1143 | 1147 |
mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e "DROP DATABASE IF EXISTS $Q_DB_NAME;" |
| 1144 | 1148 |
mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e "CREATE DATABASE IF NOT EXISTS $Q_DB_NAME CHARACTER SET utf8;" |
| ... | ... |
@@ -1147,14 +1146,8 @@ if is_service_enabled q-svc; then |
| 1147 | 1147 |
exit 1 |
| 1148 | 1148 |
fi |
| 1149 | 1149 |
|
| 1150 |
- # Update either configuration file with plugin or old plugin file |
|
| 1151 |
- # file checked below exists only in common config version |
|
| 1152 |
- if [[ -e $QUANTUM_DIR/quantum/tests/etc/quantum.conf.test ]]; then |
|
| 1153 |
- sudo sed -i -e "s/^core_plugin =.*$/core_plugin = $Q_PLUGIN_CLASS/g" $Q_CONF_FILE |
|
| 1154 |
- else |
|
| 1155 |
- sudo sed -i -e "s/^provider =.*$/provider = $Q_PLUGIN_CLASS/g" $Q_PLUGIN_INI_FILE |
|
| 1156 |
- fi |
|
| 1157 |
- |
|
| 1150 |
+ # Update either configuration file with plugin |
|
| 1151 |
+ sudo sed -i -e "s/^core_plugin =.*$/core_plugin = $Q_PLUGIN_CLASS/g" $Q_CONF_FILE |
|
| 1158 | 1152 |
screen_it q-svc "cd $QUANTUM_DIR && python $QUANTUM_DIR/bin/quantum-server --config-file $Q_CONF_FILE" |
| 1159 | 1153 |
fi |
| 1160 | 1154 |
|
| ... | ... |
@@ -1179,7 +1172,7 @@ if is_service_enabled q-agt; then |
| 1179 | 1179 |
sudo ovs-vsctl --no-wait -- --if-exists del-br $OVS_BRIDGE |
| 1180 | 1180 |
sudo ovs-vsctl --no-wait add-br $OVS_BRIDGE |
| 1181 | 1181 |
sudo ovs-vsctl --no-wait br-set-external-id $OVS_BRIDGE bridge-id br-int |
| 1182 |
- sudo sed -i -e "s/.*local-ip = .*/local-ip = $HOST_IP/g" /$Q_PLUGIN_CONF_FILE |
|
| 1182 |
+ sudo sed -i -e "s/.*local_ip = .*/local_ip = $HOST_IP/g" /$Q_PLUGIN_CONF_FILE |
|
| 1183 | 1183 |
AGENT_BINARY=$QUANTUM_DIR/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py |
| 1184 | 1184 |
elif [[ "$Q_PLUGIN" = "linuxbridge" ]]; then |
| 1185 | 1185 |
# Start up the quantum <-> linuxbridge agent |