Browse code

Merge "update stack.sh due to quantum changes"

Jenkins authored on 2012/06/28 03:57:28
Showing 1 changed files
... ...
@@ -1122,20 +1122,15 @@ if is_service_enabled quantum; then
1122 1122
             echo "OVS 1.4+ is required for tunneling between multiple hosts."
1123 1123
             exit 1
1124 1124
         fi
1125
-        sudo sed -i -e "s/.*enable-tunneling = .*$/enable-tunneling = $OVS_ENABLE_TUNNELING/g" /$Q_PLUGIN_CONF_FILE
1125
+        sudo sed -i -e "s/.*enable_tunneling = .*$/enable_tunneling = $OVS_ENABLE_TUNNELING/g" /$Q_PLUGIN_CONF_FILE
1126 1126
     fi
1127 1127
 fi
1128 1128
 
1129 1129
 # Quantum service (for controller node)
1130 1130
 if is_service_enabled q-svc; then
1131
-    # must remove this file from existing location, otherwise Quantum will prefer it
1132
-    if [[ -e $QUANTUM_DIR/etc/plugins.ini ]]; then
1133
-        # Support prior to common config
1134
-        Q_PLUGIN_INI_FILE=/etc/quantum/plugins.ini
1135
-        sudo mv $QUANTUM_DIR/etc/plugins.ini $Q_PLUGIN_INI_FILE
1136
-    fi
1137 1131
     Q_CONF_FILE=/etc/quantum/quantum.conf
1138 1132
     Q_API_PASTE_FILE=/etc/quantum/api-paste.ini
1133
+    Q_POLICY_FILE=/etc/quantum/policy.json
1139 1134
 
1140 1135
     if [[ -e $QUANTUM_DIR/etc/quantum.conf ]]; then
1141 1136
       sudo mv $QUANTUM_DIR/etc/quantum.conf $Q_CONF_FILE
... ...
@@ -1145,6 +1140,10 @@ if is_service_enabled q-svc; then
1145 1145
       sudo mv $QUANTUM_DIR/etc/api-paste.ini $Q_API_PASTE_FILE
1146 1146
     fi
1147 1147
 
1148
+    if [[ -e $QUANTUM_DIR/etc/policy.json ]]; then
1149
+      sudo mv $QUANTUM_DIR/etc/policy.json $Q_POLICY_FILE
1150
+    fi
1151
+
1148 1152
     if is_service_enabled mysql; then
1149 1153
             mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e "DROP DATABASE IF EXISTS $Q_DB_NAME;"
1150 1154
             mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e "CREATE DATABASE IF NOT EXISTS $Q_DB_NAME CHARACTER SET utf8;"
... ...
@@ -1153,14 +1152,8 @@ if is_service_enabled q-svc; then
1153 1153
             exit 1
1154 1154
     fi
1155 1155
 
1156
-    # Update either configuration file with plugin or old plugin file
1157
-    # file checked below exists only in common config version
1158
-    if [[ -e $QUANTUM_DIR/quantum/tests/etc/quantum.conf.test ]]; then
1159
-        sudo sed -i -e "s/^core_plugin =.*$/core_plugin = $Q_PLUGIN_CLASS/g" $Q_CONF_FILE
1160
-    else
1161
-        sudo sed -i -e "s/^provider =.*$/provider = $Q_PLUGIN_CLASS/g" $Q_PLUGIN_INI_FILE
1162
-    fi
1163
-
1156
+    # Update either configuration file with plugin
1157
+    sudo sed -i -e "s/^core_plugin =.*$/core_plugin = $Q_PLUGIN_CLASS/g" $Q_CONF_FILE
1164 1158
     screen_it q-svc "cd $QUANTUM_DIR && python $QUANTUM_DIR/bin/quantum-server --config-file $Q_CONF_FILE"
1165 1159
 fi
1166 1160
 
... ...
@@ -1185,7 +1178,7 @@ if is_service_enabled q-agt; then
1185 1185
         sudo ovs-vsctl --no-wait -- --if-exists del-br $OVS_BRIDGE
1186 1186
         sudo ovs-vsctl --no-wait add-br $OVS_BRIDGE
1187 1187
         sudo ovs-vsctl --no-wait br-set-external-id $OVS_BRIDGE bridge-id br-int
1188
-        sudo sed -i -e "s/.*local-ip = .*/local-ip = $HOST_IP/g" /$Q_PLUGIN_CONF_FILE
1188
+        sudo sed -i -e "s/.*local_ip = .*/local_ip = $HOST_IP/g" /$Q_PLUGIN_CONF_FILE
1189 1189
         AGENT_BINARY=$QUANTUM_DIR/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py
1190 1190
     elif [[ "$Q_PLUGIN" = "linuxbridge" ]]; then
1191 1191
        # Start up the quantum <-> linuxbridge agent