Change generator config file from tox to oslo-config-generator

When restart tox script it will remove all python libraries and
download libraries again. In the case that git/pip frequently
timeout, this may cause failure of installation.
Closes-Bug: #1527961

Change-Id: I4671bb8436f38686c1ca638ea33a797bd23389a0
This commit is contained in:
kexiaodong 2015-12-23 00:37:37 -08:00
parent 4078e92eaa
commit 1f86c28000
2 changed files with 3 additions and 2 deletions

View File

@ -64,8 +64,7 @@ if is_service_enabled kuryr; then
else
echo -n "${KURYR_CONFIG} and the default config missing. Auto generating and copying one... "
cd ${KURYR_HOME}
pip_install tox
tox -egenconfig
oslo-config-generator --config-file=${KURYR_CONFIG_GENERATOR}
sudo cp ${KURYR_DEFAULT_CONFIG}.sample ${KURYR_DEFAULT_CONFIG}
sudo cp ${KURYR_DEFAULT_CONFIG} ${KURYR_CONFIG}
cd -

View File

@ -2,6 +2,8 @@
KURYR_HOME=${KURYR_HOME:-$DEST/kuryr}
KURYR_JSON_FILENAME=kuryr.json
KURYR_DEFAULT_JSON=${KURYR_HOME}/etc/${KURYR_JSON_FILENAME}
KURYR_CONFIG_GENERATOR_FILENAME=kuryr-config-generator.conf
KURYR_CONFIG_GENERATOR=${KURYR_HOME}/etc/${KURYR_CONFIG_GENERATOR_FILENAME}
# See libnetwork's plugin discovery mechanism:
# https://github.com/docker/docker/blob/c4d45b6a29a91f2fb5d7a51ac36572f2a9b295c6/docs/extend/plugin_api.md#plugin-discovery