devstack: Drop redundant AODH_BACKEND
Database backend used by aodh is selected according to DATABASE_TYPE environment, and AODH_BACKEND has no effect. Change-Id: If9a99fa00f990d061f884cf8e40f3515845d7949
This commit is contained in:
@@ -72,7 +72,6 @@
|
|||||||
mysql: false
|
mysql: false
|
||||||
devstack_localrc:
|
devstack_localrc:
|
||||||
DATABASE_TYPE: postgresql
|
DATABASE_TYPE: postgresql
|
||||||
AODH_BACKEND: postgresql
|
|
||||||
USE_PYTHON3: True
|
USE_PYTHON3: True
|
||||||
devstack_local_conf:
|
devstack_local_conf:
|
||||||
test-config:
|
test-config:
|
||||||
@@ -91,7 +90,6 @@
|
|||||||
irrelevant-files: *aodh-irrelevant-files
|
irrelevant-files: *aodh-irrelevant-files
|
||||||
vars:
|
vars:
|
||||||
devstack_localrc:
|
devstack_localrc:
|
||||||
AODH_BACKEND: "mysql"
|
|
||||||
USE_PYTHON3: True
|
USE_PYTHON3: True
|
||||||
devstack_local_conf:
|
devstack_local_conf:
|
||||||
test-config:
|
test-config:
|
||||||
|
@@ -17,7 +17,7 @@ Enabling Aodh in DevStack
|
|||||||
|
|
||||||
enable_plugin aodh https://opendev.org/openstack/aodh stable/mitaka
|
enable_plugin aodh https://opendev.org/openstack/aodh stable/mitaka
|
||||||
|
|
||||||
There are some options, such as AODH_BACKEND, defined in
|
There are some options, such as AODH_COORDINATION_URL, defined in
|
||||||
``aodh/devstack/settings``, they can be used to configure the installation
|
``aodh/devstack/settings``, they can be used to configure the installation
|
||||||
of Aodh. If you don't want to use their default value, you can set a new
|
of Aodh. If you don't want to use their default value, you can set a new
|
||||||
one in ``local.conf``.
|
one in ``local.conf``.
|
||||||
|
@@ -9,7 +9,6 @@
|
|||||||
# By default all aodh services are started (see
|
# By default all aodh services are started (see
|
||||||
# devstack/settings).
|
# devstack/settings).
|
||||||
#
|
#
|
||||||
# AODH_BACKEND: Database backend (e.g. 'mysql')
|
|
||||||
# AODH_COORDINATION_URL: URL for group membership service provided by tooz.
|
# AODH_COORDINATION_URL: URL for group membership service provided by tooz.
|
||||||
|
|
||||||
# Support potential entry-points console scripts in VENV or not
|
# Support potential entry-points console scripts in VENV or not
|
||||||
@@ -82,15 +81,6 @@ function cleanup_aodh {
|
|||||||
remove_uwsgi_config "$AODH_UWSGI_CONF" "aodh"
|
remove_uwsgi_config "$AODH_UWSGI_CONF" "aodh"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set configuration for storage backend.
|
|
||||||
function _aodh_configure_storage_backend {
|
|
||||||
if [ "$AODH_BACKEND" = 'mysql' ] || [ "$AODH_BACKEND" = 'postgresql' ] ; then
|
|
||||||
iniset $AODH_CONF database connection $(database_connection_url aodh)
|
|
||||||
else
|
|
||||||
die $LINENO "Unable to configure unknown AODH_BACKEND $AODH_BACKEND"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Configure Aodh
|
# Configure Aodh
|
||||||
function configure_aodh {
|
function configure_aodh {
|
||||||
iniset_rpc_backend aodh $AODH_CONF
|
iniset_rpc_backend aodh $AODH_CONF
|
||||||
@@ -120,8 +110,7 @@ function configure_aodh {
|
|||||||
|
|
||||||
configure_keystone_authtoken_middleware $AODH_CONF aodh
|
configure_keystone_authtoken_middleware $AODH_CONF aodh
|
||||||
|
|
||||||
# Configured storage
|
iniset $AODH_CONF database connection $(database_connection_url aodh)
|
||||||
_aodh_configure_storage_backend
|
|
||||||
|
|
||||||
# NOTE: This must come after database configuration as those can
|
# NOTE: This must come after database configuration as those can
|
||||||
# call cleanup_aodh which will wipe the WSGI config.
|
# call cleanup_aodh which will wipe the WSGI config.
|
||||||
@@ -135,12 +124,8 @@ function init_aodh {
|
|||||||
# Get aodh keystone settings in place
|
# Get aodh keystone settings in place
|
||||||
_aodh_create_accounts
|
_aodh_create_accounts
|
||||||
|
|
||||||
if is_service_enabled mysql postgresql; then
|
recreate_database aodh
|
||||||
if [ "$AODH_BACKEND" = 'mysql' ] || [ "$AODH_BACKEND" = 'postgresql' ] ; then
|
$AODH_BIN_DIR/aodh-dbsync
|
||||||
recreate_database aodh
|
|
||||||
$AODH_BIN_DIR/aodh-dbsync
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install Aodh.
|
# Install Aodh.
|
||||||
|
@@ -13,9 +13,6 @@ AODH_CONF=$AODH_CONF_DIR/aodh.conf
|
|||||||
AODH_UWSGI_CONF=$AODH_CONF_DIR/aodh-uwsgi.ini
|
AODH_UWSGI_CONF=$AODH_CONF_DIR/aodh-uwsgi.ini
|
||||||
AODH_UWSGI=aodh.wsgi.api:application
|
AODH_UWSGI=aodh.wsgi.api:application
|
||||||
|
|
||||||
# Set up database backend
|
|
||||||
AODH_BACKEND=${AODH_BACKEND:-mysql}
|
|
||||||
|
|
||||||
# Aodh connection info.
|
# Aodh connection info.
|
||||||
AODH_SERVICE_PROTOCOL=http
|
AODH_SERVICE_PROTOCOL=http
|
||||||
AODH_SERVICE_HOST=${AODH_SERVICE_HOST:-$SERVICE_HOST}
|
AODH_SERVICE_HOST=${AODH_SERVICE_HOST:-$SERVICE_HOST}
|
||||||
|
Reference in New Issue
Block a user