Browse code

Enable Quantum agents and plugins to use more than one config file

Change-Id: I039101471d264c84f6e05cc3f33073932e71f788

Gary Kotton authored on 2012/07/25 16:26:23
Showing 1 changed files
... ...
@@ -1047,9 +1047,8 @@ if is_service_enabled quantum; then
1047 1047
     # If needed, move config file from $QUANTUM_DIR/etc/quantum to /etc/quantum
1048 1048
     mkdir -p /$Q_PLUGIN_CONF_PATH
1049 1049
     Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME
1050
-    if [[ -e $QUANTUM_DIR/$Q_PLUGIN_CONF_FILE ]]; then
1051
-            sudo mv $QUANTUM_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE
1052
-    fi
1050
+    cp $QUANTUM_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE
1051
+
1053 1052
     sudo sed -i -e "s/^sql_connection =.*$/sql_connection = mysql:\/\/$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST\/$Q_DB_NAME?charset=utf8/g" /$Q_PLUGIN_CONF_FILE
1054 1053
 
1055 1054
     OVS_ENABLE_TUNNELING=${OVS_ENABLE_TUNNELING:-True}
... ...
@@ -1098,7 +1097,7 @@ if is_service_enabled q-svc; then
1098 1098
 
1099 1099
     # Update either configuration file with plugin
1100 1100
     sudo sed -i -e "s/^core_plugin =.*$/core_plugin = $Q_PLUGIN_CLASS/g" $Q_CONF_FILE
1101
-    screen_it q-svc "cd $QUANTUM_DIR && python $QUANTUM_DIR/bin/quantum-server --config-file $Q_CONF_FILE"
1101
+    screen_it q-svc "cd $QUANTUM_DIR && python $QUANTUM_DIR/bin/quantum-server --config-file $Q_CONF_FILE --config-file /$Q_PLUGIN_CONF_FILE"
1102 1102
 fi
1103 1103
 
1104 1104
 # Quantum agent (for compute nodes)
... ...
@@ -1133,7 +1132,7 @@ if is_service_enabled q-agt; then
1133 1133
        AGENT_BINARY="$QUANTUM_DIR/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py"
1134 1134
     fi
1135 1135
     # Start up the quantum agent
1136
-    screen_it q-agt "sudo python $AGENT_BINARY /$Q_PLUGIN_CONF_FILE -v"
1136
+    screen_it q-agt "sudo python $AGENT_BINARY --config-file $Q_CONF_FILE --config-file /$Q_PLUGIN_CONF_FILE"
1137 1137
 fi
1138 1138
 
1139 1139
 # Quantum DHCP