Fix devstack plugin for CEILOMETER_BACKEND=none

My recent changes to the devstack plugin broke the plugin for
situations, where CEILOMETER_BACKEND=none. The reason is the
addition of the CEILOMETER_BACKENDS variable, which uses
"," for delimiting individual backends. This meant, that
when using CEILOMETER_BACKEND=none, the CEILOMETER_BACKENDS
would in fact be ",none", which wouldn't equal to "none" in
a check in the plugin.sh

The fix is to delete all "," characters from the
CEILOMETER_BACKENDS before checking if it equals to "none"

Change-Id: Ief09bf1d5da79d7f9b7a2ba4055be2b2ef3dc1b8
This commit is contained in:
Jaromir Wysoglad 2023-11-09 04:57:30 -05:00
parent b5dc7d6e94
commit 10ee6a9690

@ -209,7 +209,8 @@ function _ceilometer_configure_cache_backend {
# Set configuration for storage backend.
function _ceilometer_configure_storage_backend {
if [ "$CEILOMETER_BACKENDS" = 'none' ] ; then
# delete any "," characters used for delimiting individual backends before checking for "none"
if [ $(echo "$CEILOMETER_BACKENDS" | tr -d ",") = 'none' ] ; then
echo_summary "All Ceilometer backends seems disabled, set \$CEILOMETER_BACKENDS to select one."
else
head -n -1 $CEILOMETER_CONF_DIR/pipeline.yaml > $CEILOMETER_CONF_DIR/tmp ; mv $CEILOMETER_CONF_DIR/tmp $CEILOMETER_CONF_DIR/pipeline.yaml