Generate the neutron core sample config files by using the oslo
generator. The files are generated with a .sample extension and
replace the static example configuration files.
Once the generation code is delivered, the static config files
will be removed.
Change-Id: Ic37a16b6cf8eb92030649f1fc8b198738a8cc104
Related-blueprint: autogen-neutron-conf-file
Partial-bug: #1199963
Depends-On: I1c6dc4e7d479f1b7c755597caded24a0f018c712
Co-Authored-By: Louis Taylor <louis@kragniz.eu>
... | ... |
@@ -870,7 +870,10 @@ function _create_neutron_conf_dir { |
870 | 870 |
function _configure_neutron_common { |
871 | 871 |
_create_neutron_conf_dir |
872 | 872 |
|
873 |
- cp $NEUTRON_DIR/etc/neutron.conf $NEUTRON_CONF |
|
873 |
+ # Uses oslo config generator to generate core sample configuration files |
|
874 |
+ (cd $NEUTRON_DIR && exec ./tools/generate_config_file_samples.sh) |
|
875 |
+ |
|
876 |
+ cp $NEUTRON_DIR/etc/neutron.conf.sample $NEUTRON_CONF |
|
874 | 877 |
|
875 | 878 |
Q_POLICY_FILE=$NEUTRON_CONF_DIR/policy.json |
876 | 879 |
cp $NEUTRON_DIR/etc/policy.json $Q_POLICY_FILE |
... | ... |
@@ -895,7 +898,9 @@ function _configure_neutron_common { |
895 | 895 |
Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME |
896 | 896 |
# NOTE(hichihara): Some neutron vendor plugins were already decomposed and |
897 | 897 |
# there is no config file in Neutron tree. They should prepare the file in each plugin. |
898 |
- if [ -f $NEUTRON_DIR/$Q_PLUGIN_CONF_FILE ]; then |
|
898 |
+ if [ -f "$NEUTRON_DIR/$Q_PLUGIN_CONF_FILE.sample" ]; then |
|
899 |
+ cp "$NEUTRON_DIR/$Q_PLUGIN_CONF_FILE.sample" /$Q_PLUGIN_CONF_FILE |
|
900 |
+ elif [ -f $NEUTRON_DIR/$Q_PLUGIN_CONF_FILE ]; then |
|
899 | 901 |
cp $NEUTRON_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE |
900 | 902 |
fi |
901 | 903 |
|
... | ... |
@@ -903,6 +908,8 @@ function _configure_neutron_common { |
903 | 903 |
iniset $NEUTRON_CONF DEFAULT state_path $DATA_DIR/neutron |
904 | 904 |
iniset $NEUTRON_CONF DEFAULT use_syslog $SYSLOG |
905 | 905 |
iniset $NEUTRON_CONF DEFAULT bind_host $Q_LISTEN_ADDRESS |
906 |
+ iniset $NEUTRON_CONF oslo_concurrency lock_path $DATA_DIR/neutron/lock |
|
907 |
+ |
|
906 | 908 |
# If addition config files are set, make sure their path name is set as well |
907 | 909 |
if [[ ${#Q_PLUGIN_EXTRA_CONF_FILES[@]} > 0 && $Q_PLUGIN_EXTRA_CONF_PATH == '' ]]; then |
908 | 910 |
die $LINENO "Neutron additional plugin config not set.. exiting" |
... | ... |
@@ -959,7 +966,7 @@ function _configure_neutron_debug_command { |
959 | 959 |
return |
960 | 960 |
fi |
961 | 961 |
|
962 |
- cp $NEUTRON_DIR/etc/l3_agent.ini $NEUTRON_TEST_CONFIG_FILE |
|
962 |
+ cp $NEUTRON_DIR/etc/l3_agent.ini.sample $NEUTRON_TEST_CONFIG_FILE |
|
963 | 963 |
|
964 | 964 |
iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT verbose False |
965 | 965 |
iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT debug False |
... | ... |
@@ -975,7 +982,7 @@ function _configure_neutron_debug_command { |
975 | 975 |
|
976 | 976 |
function _configure_neutron_dhcp_agent { |
977 | 977 |
|
978 |
- cp $NEUTRON_DIR/etc/dhcp_agent.ini $Q_DHCP_CONF_FILE |
|
978 |
+ cp $NEUTRON_DIR/etc/dhcp_agent.ini.sample $Q_DHCP_CONF_FILE |
|
979 | 979 |
|
980 | 980 |
iniset $Q_DHCP_CONF_FILE DEFAULT verbose True |
981 | 981 |
iniset $Q_DHCP_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL |
... | ... |
@@ -1007,7 +1014,7 @@ function _configure_neutron_l3_agent { |
1007 | 1007 |
neutron_vpn_configure_agent |
1008 | 1008 |
fi |
1009 | 1009 |
|
1010 |
- cp $NEUTRON_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE |
|
1010 |
+ cp $NEUTRON_DIR/etc/l3_agent.ini.sample $Q_L3_CONF_FILE |
|
1011 | 1011 |
|
1012 | 1012 |
iniset $Q_L3_CONF_FILE DEFAULT verbose True |
1013 | 1013 |
iniset $Q_L3_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL |
... | ... |
@@ -1028,7 +1035,7 @@ function _configure_neutron_l3_agent { |
1028 | 1028 |
} |
1029 | 1029 |
|
1030 | 1030 |
function _configure_neutron_metadata_agent { |
1031 |
- cp $NEUTRON_DIR/etc/metadata_agent.ini $Q_META_CONF_FILE |
|
1031 |
+ cp $NEUTRON_DIR/etc/metadata_agent.ini.sample $Q_META_CONF_FILE |
|
1032 | 1032 |
|
1033 | 1033 |
iniset $Q_META_CONF_FILE DEFAULT verbose True |
1034 | 1034 |
iniset $Q_META_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL |
... | ... |
@@ -21,7 +21,7 @@ function neutron_agent_metering_configure_agent { |
21 | 21 |
|
22 | 22 |
METERING_AGENT_CONF_FILENAME="$METERING_AGENT_CONF_PATH/metering_agent.ini" |
23 | 23 |
|
24 |
- cp $NEUTRON_DIR/etc/metering_agent.ini $METERING_AGENT_CONF_FILENAME |
|
24 |
+ cp $NEUTRON_DIR/etc/metering_agent.ini.sample $METERING_AGENT_CONF_FILENAME |
|
25 | 25 |
} |
26 | 26 |
|
27 | 27 |
function neutron_metering_stop { |