From fe332737acdd84752be760d516a46ac60463a782 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 4 Jan 2017 17:13:16 -0600 Subject: [PATCH] Use tricircle commands in devstack screen 1. What is the problem? Tricircle uses python script commands to setup and start the screens in devstack. Given the last addition of tricircle commands in I6a27d990803e928151ca424f47564b6626c8e99b this solution could be improved. 2. What is the solution to the problem? Replace the python script commads for tricircle commands and fix the tricircle-db-manage binary. 3. What the features need to be implemented to the Tricircle to realize the solution? None Change-Id: I7c2e28d6be58b4d1e72ca792d52ccc73d3f7b756 --- devstack/plugin.sh | 6 +++--- tricircle/cmd/manage.py | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 7289ffe7..1f429c58 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -153,7 +153,7 @@ if [[ "$Q_ENABLE_TRICIRCLE" == "True" ]]; then setup_package $TRICIRCLE_DIR -e recreate_database tricircle - python "$TRICIRCLE_DIR/cmd/manage.py" "$TRICIRCLE_API_CONF" + tricircle-db-manage "$TRICIRCLE_API_CONF" if is_service_enabled q-svc ; then start_central_neutron_server $CENTRAL_REGION_NAME $TRICIRCLE_NEUTRON_PORT @@ -166,12 +166,12 @@ if [[ "$Q_ENABLE_TRICIRCLE" == "True" ]]; then create_tricircle_accounts - run_process t-api "python $TRICIRCLE_API --config-file $TRICIRCLE_API_CONF" + run_process t-api "tricircle-api --config-file $TRICIRCLE_API_CONF" fi if is_service_enabled t-job; then - run_process t-job "python $TRICIRCLE_XJOB --config-file $TRICIRCLE_XJOB_CONF" + run_process t-job "tricircle-xjob --config-file $TRICIRCLE_XJOB_CONF" fi fi diff --git a/tricircle/cmd/manage.py b/tricircle/cmd/manage.py index ba76b745..969bfa4c 100644 --- a/tricircle/cmd/manage.py +++ b/tricircle/cmd/manage.py @@ -22,15 +22,14 @@ from tricircle.db import core from tricircle.db import migration_helpers -def main(argv=None, config_files=None): +def main(): core.initialize() - cfg.CONF(args=argv[2:], + cfg.CONF(args=sys.argv[2:], project='tricircle', - default_config_files=config_files) + default_config_files=[sys.argv[1]]) migration_helpers.find_migrate_repo() migration_helpers.sync_repo(2) if __name__ == '__main__': - config_file = sys.argv[1] - main(argv=sys.argv, config_files=[config_file]) + main()