Skip to content

Commit 713f17c

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "lib/neutron: stop loading all config files into all processes"
2 parents 17c2f02 + 19f4b3f commit 713f17c

1 file changed

Lines changed: 6 additions & 34 deletions

File tree

lib/neutron

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ NEUTRON_ROOTWRAP=$(get_rootwrap_location neutron)
7070
NEUTRON_ROOTWRAP_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf
7171
NEUTRON_ROOTWRAP_DAEMON_CMD="sudo $NEUTRON_ROOTWRAP-daemon $NEUTRON_ROOTWRAP_CONF_FILE"
7272

73-
# Add all enabled config files to a single config arg
74-
NEUTRON_CONFIG_ARG=${NEUTRON_CONFIG_ARG:-""}
75-
7673
# Additional neutron api config files
7774
declare -a _NEUTRON_SERVER_EXTRA_CONF_FILES_ABS
7875

@@ -337,7 +334,7 @@ function init_neutron_new {
337334
recreate_database neutron
338335

339336
# Run Neutron db migrations
340-
$NEUTRON_BIN_DIR/neutron-db-manage $NEUTRON_CONFIG_ARG upgrade heads
337+
$NEUTRON_BIN_DIR/neutron-db-manage upgrade heads
341338

342339
create_neutron_cache_dir
343340
}
@@ -416,20 +413,19 @@ function start_neutron_api {
416413

417414
# start_neutron() - Start running processes, including screen
418415
function start_neutron_new {
419-
_set_config_files
420-
421416
# Start up the neutron agents if enabled
422417
# TODO(sc68cal) Make this pluggable so different DevStack plugins for different Neutron plugins
423418
# can resolve the $NEUTRON_AGENT_BINARY
424419
if is_service_enabled neutron-agent; then
425-
run_process neutron-agent "$NEUTRON_BIN_DIR/$NEUTRON_AGENT_BINARY $NEUTRON_CONFIG_ARG"
420+
# TODO(ihrachys) stop loading ml2_conf.ini into agents, instead load agent specific files
421+
run_process neutron-agent "$NEUTRON_BIN_DIR/$NEUTRON_AGENT_BINARY --config-file $NEUTRON_CONF --config-file $NEUTRON_CORE_PLUGIN_CONF"
426422
fi
427423
if is_service_enabled neutron-dhcp; then
428424
neutron_plugin_configure_dhcp_agent $NEUTRON_DHCP_CONF
429-
run_process neutron-dhcp "$NEUTRON_BIN_DIR/$NEUTRON_DHCP_BINARY $NEUTRON_CONFIG_ARG"
425+
run_process neutron-dhcp "$NEUTRON_BIN_DIR/$NEUTRON_DHCP_BINARY --config-file $NEUTRON_CONF --config-file $NEUTRON_DHCP_CONF"
430426
fi
431427
if is_service_enabled neutron-l3; then
432-
run_process neutron-l3 "$NEUTRON_BIN_DIR/$NEUTRON_L3_BINARY $NEUTRON_CONFIG_ARG"
428+
run_process neutron-l3 "$NEUTRON_BIN_DIR/$NEUTRON_L3_BINARY --config-file $NEUTRON_CONF --config-file $NEUTRON_L3_CONF"
433429
fi
434430
if is_service_enabled neutron-api; then
435431
# XXX(sc68cal) - Here's where plugins can wire up their own networks instead
@@ -444,7 +440,7 @@ function start_neutron_new {
444440
fi
445441
fi
446442
if is_service_enabled neutron-metadata-agent; then
447-
run_process neutron-metadata-agent "$NEUTRON_BIN_DIR/$NEUTRON_META_BINARY $NEUTRON_CONFIG_ARG"
443+
run_process neutron-metadata-agent "$NEUTRON_BIN_DIR/$NEUTRON_META_BINARY --config-file $NEUTRON_CONF --config-file $NEUTRON_META_CONF"
448444
fi
449445

450446
if is_service_enabled neutron-metering; then
@@ -470,30 +466,6 @@ function stop_neutron_new {
470466
fi
471467
}
472468

473-
# Compile the lost of enabled config files
474-
function _set_config_files {
475-
476-
NEUTRON_CONFIG_ARG+=" --config-file $NEUTRON_CONF"
477-
478-
#TODO(sc68cal) OVS and LB agent uses settings in NEUTRON_CORE_PLUGIN_CONF (ml2_conf.ini) but others may not
479-
if is_service_enabled neutron-agent; then
480-
NEUTRON_CONFIG_ARG+=" --config-file $NEUTRON_CORE_PLUGIN_CONF"
481-
fi
482-
483-
if is_service_enabled neutron-dhcp; then
484-
NEUTRON_CONFIG_ARG+=" --config-file $NEUTRON_DHCP_CONF"
485-
fi
486-
487-
if is_service_enabled neutron-l3; then
488-
NEUTRON_CONFIG_ARG+=" --config-file $NEUTRON_L3_CONF"
489-
fi
490-
491-
if is_service_enabled neutron-metadata-agent; then
492-
NEUTRON_CONFIG_ARG+=" --config-file $NEUTRON_META_CONF"
493-
fi
494-
495-
}
496-
497469
# neutron_service_plugin_class_add() - add service plugin class
498470
function neutron_service_plugin_class_add_new {
499471
local service_plugin_class=$1

0 commit comments

Comments
 (0)