Fix congre command excute error when using python3.6

when test murano python3 in patch [0], murano-congress-devstack
failed when excute congress command, error as below:
2018-12-28 05:33:03.601901 | controller | ++ functions-common:oscwrap:2287 :
out='openstack: '\''congress datasource create neutronv2 neutronv2 --config poll_time=10 --config username=admin
--config tenant_name=admin --config password=secretadmin --config auth_url=http://38.108.68.25/identity'\''
is not an openstack command. See '\''openstack --help'\''.
2018-12-28 05:33:03.601983 | controller | Did you mean one of these?
2018-12-28 05:33:03.602029 | controller |   address scope create
2018-12-28 05:33:03.602057 | controller |   address scope delete
2018-12-28 05:33:03.602082 | controller |   address scope list
2018-12-28 05:33:03.602122 | controller |   address scope set
2018-12-28 05:33:03.602149 | controller |   address scope show'
2018-12-28 05:33:03.604233 | controller | + functions-common:oscwrap:1               :   exit_trap
This patch using setup_dev_lib function from devstack install python-congressclient,
also this patch add a way to install congresscliet from requirements.

[0]: https://review.openstack.org/#/c/624600/

Change-Id: Ifda90653ca515bd5e21e5ed7338ab9fbdacc86ec
This commit is contained in:
zhurong 2019-01-03 10:46:26 +08:00
parent 7010b81d46
commit 21f075faac
5 changed files with 18 additions and 5 deletions

View File

@ -229,6 +229,16 @@ function init_congress {
congress-db-manage --config-file $CONGRESS_CONF upgrade head
}
function install_congress_pythonclient() {
# For using non-released client from git branch, need to add
# LIBS_FROM_GIT=python-congressclient parameter to localrc.
# Otherwise, congress will install python-congressclient from requirements.
if use_library_from_git "python-congressclient"; then
git_clone_by_name "python-congressclient"
setup_dev_lib "python-congressclient"
fi
}
# install_congress() - install dependency, collect client source and prepare
function install_congress {
# congress requires java so we install it here
@ -239,8 +249,8 @@ function install_congress {
else
die $LINENO "Congress devstack only supports Debian and Red Hat-based"
fi
git_clone $CONGRESSCLIENT_REPO $CONGRESSCLIENT_DIR $CONGRESSCLIENT_BRANCH
setup_develop $CONGRESSCLIENT_DIR
install_congress_pythonclient
if is_service_enabled horizon; then
_install_congress_dashboard

View File

@ -6,7 +6,6 @@
# Set up default directories
CONGRESS_DIR=$DEST/congress
CONGRESSCLIENT_DIR=$DEST/python-congressclient
CONGRESS_AUTH_CACHE_DIR=${CONGRESS_AUTH_CACHE_DIR:-/var/cache/congress}
CONGRESSDASHBOARD_DIR=$DEST/congress-dashboard
CONGRESS_Z3_DIR=$DEST/z3
@ -62,8 +61,9 @@ CONGRESS_REPO=${CONGRESS_REPO:-${GIT_BASE}/openstack/congress.git}
CONGRESS_BRANCH=${CONGRESS_BRANCH:-master}
# congress client library test
CONGRESSCLIENT_REPO=${CONGRESSCLIENT_REPO:-${GIT_BASE}/openstack/python-congressclient.git}
CONGRESSCLIENT_BRANCH=${CONGRESSCLIENT_BRANCH:-master}
GITREPO["python-congressclient"]=${CONGRESSCLIENT_REPO:-${GIT_BASE}/openstack/python-congressclient.git}
GITBRANCH["python-congressclient"]=${CONGRESSCLIENT_BRANCH:-master}
GITDIR["python-congressclient"]=$DEST/python-congressclient
# congress dashboard
CONGRESSDASHBOARD_REPO=${CONGRESSDASHBOARD_REPO:-${GIT_BASE}/openstack/congress-dashboard.git}

View File

@ -39,6 +39,7 @@
# To deploy congress as multi-process (api, pe, datasources)
CONGRESS_MULTIPROCESS_DEPLOYMENT=True
CONGRESS_EXPOSE_ENCRYPTION_KEY_FOR_TEST=True
LIBS_FROM_GIT=python-congressclient
ENABLE_CONGRESS_Z3=True
USE_Z3_RELEASE=4.7.1
TEMPEST_PLUGINS='/opt/stack/new/congress-tempest-plugin /opt/stack/new/telemetry-tempest-plugin /opt/stack/new/murano-tempest-plugin /opt/stack/new/heat-tempest-plugin /opt/stack/new/mistral-tempest-plugin /opt/stack/new/monasca-tempest-plugin'

View File

@ -45,6 +45,7 @@
# To deploy congress as multi-process (api, pe, datasources)
CONGRESS_MULTIPROCESS_DEPLOYMENT=True
CONGRESS_EXPOSE_ENCRYPTION_KEY_FOR_TEST=True
LIBS_FROM_GIT=python-congressclient
ENABLE_CONGRESS_Z3=True
USE_Z3_RELEASE=4.7.1
TEMPEST_PLUGINS='/opt/stack/new/congress-tempest-plugin /opt/stack/new/murano-tempest-plugin /opt/stack/new/heat-tempest-plugin'

View File

@ -39,6 +39,7 @@
# To deploy congress as multi-process (api, pe, datasources)
CONGRESS_MULTIPROCESS_DEPLOYMENT=True
CONGRESS_EXPOSE_ENCRYPTION_KEY_FOR_TEST=True
LIBS_FROM_GIT=python-congressclient
TEMPEST_PLUGINS='/opt/stack/new/congress-tempest-plugin /opt/stack/new/telemetry-tempest-plugin /opt/stack/new/murano-tempest-plugin /opt/stack/new/heat-tempest-plugin /opt/stack/new/mistral-tempest-plugin'
EOF