Change-Id: Ia83ce84b792494800fbfe7baa6423c8de9260014
| ... | ... |
@@ -79,8 +79,8 @@ NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
|
| 79 | 79 |
# Support entry points installation of console scripts |
| 80 | 80 |
if [[ -d $NEUTRON_DIR/bin/neutron-server ]]; then |
| 81 | 81 |
NEUTRON_BIN_DIR=$NEUTRON_DIR/bin |
| 82 |
- else |
|
| 83 |
-NEUTRON_BIN_DIR=$(get_python_exec_prefix) |
|
| 82 |
+else |
|
| 83 |
+ NEUTRON_BIN_DIR=$(get_python_exec_prefix) |
|
| 84 | 84 |
fi |
| 85 | 85 |
|
| 86 | 86 |
NEUTRON_CONF_DIR=/etc/neutron |
| ... | ... |
@@ -373,7 +373,7 @@ function create_neutron_initial_network() {
|
| 373 | 373 |
iniset $Q_L3_CONF_FILE DEFAULT router_id $ROUTER_ID |
| 374 | 374 |
fi |
| 375 | 375 |
fi |
| 376 |
- fi |
|
| 376 |
+ fi |
|
| 377 | 377 |
} |
| 378 | 378 |
|
| 379 | 379 |
# init_neutron() - Initialize databases, etc. |
| ... | ... |
@@ -404,7 +404,7 @@ function install_neutron_agent_packages() {
|
| 404 | 404 |
fi |
| 405 | 405 |
|
| 406 | 406 |
if is_service_enabled q-lbaas; then |
| 407 |
- neutron_agent_lbaas_install_agent_packages |
|
| 407 |
+ neutron_agent_lbaas_install_agent_packages |
|
| 408 | 408 |
fi |
| 409 | 409 |
} |
| 410 | 410 |
|
| ... | ... |
@@ -414,13 +414,13 @@ function start_neutron_service_and_check() {
|
| 414 | 414 |
local cfg_file |
| 415 | 415 |
local CFG_FILE_OPTIONS="--config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE" |
| 416 | 416 |
for cfg_file in ${Q_PLUGIN_EXTRA_CONF_FILES[@]}; do
|
| 417 |
- CFG_FILE_OPTIONS+=" --config-file /$cfg_file" |
|
| 417 |
+ CFG_FILE_OPTIONS+=" --config-file /$cfg_file" |
|
| 418 | 418 |
done |
| 419 | 419 |
# Start the Neutron service |
| 420 | 420 |
screen_it q-svc "cd $NEUTRON_DIR && python $NEUTRON_BIN_DIR/neutron-server $CFG_FILE_OPTIONS" |
| 421 | 421 |
echo "Waiting for Neutron to start..." |
| 422 | 422 |
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$Q_HOST:$Q_PORT; do sleep 1; done"; then |
| 423 |
- die $LINENO "Neutron did not start" |
|
| 423 |
+ die $LINENO "Neutron did not start" |
|
| 424 | 424 |
fi |
| 425 | 425 |
} |
| 426 | 426 |
|
| ... | ... |
@@ -712,9 +712,9 @@ function _neutron_setup_rootwrap() {
|
| 712 | 712 |
# Set up ``rootwrap.conf``, pointing to ``$NEUTRON_CONF_DIR/rootwrap.d`` |
| 713 | 713 |
# location moved in newer versions, prefer new location |
| 714 | 714 |
if test -r $NEUTRON_DIR/etc/neutron/rootwrap.conf; then |
| 715 |
- sudo cp -p $NEUTRON_DIR/etc/neutron/rootwrap.conf $Q_RR_CONF_FILE |
|
| 715 |
+ sudo cp -p $NEUTRON_DIR/etc/neutron/rootwrap.conf $Q_RR_CONF_FILE |
|
| 716 | 716 |
else |
| 717 |
- sudo cp -p $NEUTRON_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE |
|
| 717 |
+ sudo cp -p $NEUTRON_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE |
|
| 718 | 718 |
fi |
| 719 | 719 |
sudo sed -e "s:^filters_path=.*$:filters_path=$Q_CONF_ROOTWRAP_D:" -i $Q_RR_CONF_FILE |
| 720 | 720 |
sudo chown root:root $Q_RR_CONF_FILE |
| ... | ... |
@@ -848,11 +848,11 @@ function _ssh_check_neutron() {
|
| 848 | 848 |
# please refer to ``lib/neutron_thirdparty/README.md`` for details |
| 849 | 849 |
NEUTRON_THIRD_PARTIES="" |
| 850 | 850 |
for f in $TOP_DIR/lib/neutron_thirdparty/*; do |
| 851 |
- third_party=$(basename $f) |
|
| 852 |
- if is_service_enabled $third_party; then |
|
| 853 |
- source $TOP_DIR/lib/neutron_thirdparty/$third_party |
|
| 854 |
- NEUTRON_THIRD_PARTIES="$NEUTRON_THIRD_PARTIES,$third_party" |
|
| 855 |
- fi |
|
| 851 |
+ third_party=$(basename $f) |
|
| 852 |
+ if is_service_enabled $third_party; then |
|
| 853 |
+ source $TOP_DIR/lib/neutron_thirdparty/$third_party |
|
| 854 |
+ NEUTRON_THIRD_PARTIES="$NEUTRON_THIRD_PARTIES,$third_party" |
|
| 855 |
+ fi |
|
| 856 | 856 |
done |
| 857 | 857 |
|
| 858 | 858 |
function _neutron_third_party_do() {
|
| ... | ... |
@@ -52,11 +52,11 @@ function neutron_plugin_configure_dhcp_agent() {
|
| 52 | 52 |
} |
| 53 | 53 |
|
| 54 | 54 |
function neutron_plugin_configure_l3_agent() {
|
| 55 |
- die $LINENO "q-l3 must not be executed with MidoNet plugin!" |
|
| 55 |
+ die $LINENO "q-l3 must not be executed with MidoNet plugin!" |
|
| 56 | 56 |
} |
| 57 | 57 |
|
| 58 | 58 |
function neutron_plugin_configure_plugin_agent() {
|
| 59 |
- die $LINENO "q-agt must not be executed with MidoNet plugin!" |
|
| 59 |
+ die $LINENO "q-agt must not be executed with MidoNet plugin!" |
|
| 60 | 60 |
} |
| 61 | 61 |
|
| 62 | 62 |
function neutron_plugin_configure_service() {
|
| ... | ... |
@@ -101,15 +101,15 @@ function _neutron_setup_ovs_tunnels() {
|
| 101 | 101 |
local id=0 |
| 102 | 102 |
GRE_LOCAL_IP=${GRE_LOCAL_IP:-$HOST_IP}
|
| 103 | 103 |
if [ -n "$GRE_REMOTE_IPS" ]; then |
| 104 |
- for ip in ${GRE_REMOTE_IPS//:/ }
|
|
| 105 |
- do |
|
| 106 |
- if [[ "$ip" == "$GRE_LOCAL_IP" ]]; then |
|
| 107 |
- continue |
|
| 108 |
- fi |
|
| 109 |
- sudo ovs-vsctl --no-wait add-port $bridge gre$id -- \ |
|
| 110 |
- set Interface gre$id type=gre options:remote_ip=$ip |
|
| 111 |
- id=`expr $id + 1` |
|
| 112 |
- done |
|
| 104 |
+ for ip in ${GRE_REMOTE_IPS//:/ }
|
|
| 105 |
+ do |
|
| 106 |
+ if [[ "$ip" == "$GRE_LOCAL_IP" ]]; then |
|
| 107 |
+ continue |
|
| 108 |
+ fi |
|
| 109 |
+ sudo ovs-vsctl --no-wait add-port $bridge gre$id -- \ |
|
| 110 |
+ set Interface gre$id type=gre options:remote_ip=$ip |
|
| 111 |
+ id=`expr $id + 1` |
|
| 112 |
+ done |
|
| 113 | 113 |
fi |
| 114 | 114 |
} |
| 115 | 115 |
|
| ... | ... |
@@ -58,13 +58,13 @@ function neutron_plugin_configure_dhcp_agent() {
|
| 58 | 58 |
} |
| 59 | 59 |
|
| 60 | 60 |
function neutron_plugin_configure_l3_agent() {
|
| 61 |
- # Nicira plugin does not run L3 agent |
|
| 62 |
- die $LINENO "q-l3 should must not be executed with Nicira plugin!" |
|
| 61 |
+ # Nicira plugin does not run L3 agent |
|
| 62 |
+ die $LINENO "q-l3 should must not be executed with Nicira plugin!" |
|
| 63 | 63 |
} |
| 64 | 64 |
|
| 65 | 65 |
function neutron_plugin_configure_plugin_agent() {
|
| 66 |
- # Nicira plugin does not run L2 agent |
|
| 67 |
- die $LINENO "q-agt must not be executed with Nicira plugin!" |
|
| 66 |
+ # Nicira plugin does not run L2 agent |
|
| 67 |
+ die $LINENO "q-agt must not be executed with Nicira plugin!" |
|
| 68 | 68 |
} |
| 69 | 69 |
|
| 70 | 70 |
function neutron_plugin_configure_service() {
|