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:
Takashi Kajinami
2025-06-03 22:46:33 +09:00
parent 9049665c27
commit 459022c778
4 changed files with 4 additions and 24 deletions

View File

@@ -72,7 +72,6 @@
mysql: false
devstack_localrc:
DATABASE_TYPE: postgresql
AODH_BACKEND: postgresql
USE_PYTHON3: True
devstack_local_conf:
test-config:
@@ -91,7 +90,6 @@
irrelevant-files: *aodh-irrelevant-files
vars:
devstack_localrc:
AODH_BACKEND: "mysql"
USE_PYTHON3: True
devstack_local_conf:
test-config:

View File

@@ -17,7 +17,7 @@ Enabling Aodh in DevStack
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
of Aodh. If you don't want to use their default value, you can set a new
one in ``local.conf``.

View File

@@ -9,7 +9,6 @@
# By default all aodh services are started (see
# devstack/settings).
#
# AODH_BACKEND: Database backend (e.g. 'mysql')
# AODH_COORDINATION_URL: URL for group membership service provided by tooz.
# Support potential entry-points console scripts in VENV or not
@@ -82,15 +81,6 @@ function cleanup_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
function configure_aodh {
iniset_rpc_backend aodh $AODH_CONF
@@ -120,8 +110,7 @@ function configure_aodh {
configure_keystone_authtoken_middleware $AODH_CONF aodh
# Configured storage
_aodh_configure_storage_backend
iniset $AODH_CONF database connection $(database_connection_url aodh)
# NOTE: This must come after database configuration as those can
# call cleanup_aodh which will wipe the WSGI config.
@@ -135,12 +124,8 @@ function init_aodh {
# Get aodh keystone settings in place
_aodh_create_accounts
if is_service_enabled mysql postgresql; then
if [ "$AODH_BACKEND" = 'mysql' ] || [ "$AODH_BACKEND" = 'postgresql' ] ; then
recreate_database aodh
$AODH_BIN_DIR/aodh-dbsync
fi
fi
recreate_database aodh
$AODH_BIN_DIR/aodh-dbsync
}
# Install Aodh.

View File

@@ -13,9 +13,6 @@ AODH_CONF=$AODH_CONF_DIR/aodh.conf
AODH_UWSGI_CONF=$AODH_CONF_DIR/aodh-uwsgi.ini
AODH_UWSGI=aodh.wsgi.api:application
# Set up database backend
AODH_BACKEND=${AODH_BACKEND:-mysql}
# Aodh connection info.
AODH_SERVICE_PROTOCOL=http
AODH_SERVICE_HOST=${AODH_SERVICE_HOST:-$SERVICE_HOST}