Skip to content

Commit dd5bb9e

Browse files
pedro-martinspriteau
authored andcommitted
Fix devstack runprocess for cloudkitty api
After the commit openstack/pbr@8778c64 The module PBR in openstack started to validating the parameters when creating an embedded WSGI, now if invalid arguments are given to the cloudkitty-api it raises an error as we are facing in the devstack when using `CLOUDKITTY_USE_MOD_WSGI=False`: cloudkitty-api[86126]: usage: cloudkitty-api [-h] [--port PORT] [--host IP] -- [passed options] cloudkitty-api[86126]: cloudkitty-api: error: unrecognized arguments: --config-file=/etc/cloudkitty/cloudkitty.conf This PR also extracts the upgrade database workflow to a function to be used in grenade tests Change-Id: Ifc1a8563a9efcae2abaa6f8eb036405a93ff296d (cherry picked from commit 25a7306)
1 parent 1cac176 commit dd5bb9e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

devstack/plugin.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ function init_cloudkitty {
279279
create_opensearch_index
280280

281281
# Migrate cloudkitty database
282-
$CLOUDKITTY_BIN_DIR/cloudkitty-dbsync upgrade
282+
upgrade_cloudkitty_database
283283

284284
# Init the storage backend
285285
if [ $CLOUDKITTY_STORAGE_BACKEND == 'hybrid' ]; then
@@ -381,7 +381,7 @@ function install_cloudkitty {
381381
function start_cloudkitty {
382382
run_process ck-proc "$CLOUDKITTY_BIN_DIR/cloudkitty-processor --config-file=$CLOUDKITTY_CONF"
383383
if [[ "$CLOUDKITTY_USE_MOD_WSGI" == "False" ]]; then
384-
run_process ck-api "$CLOUDKITTY_BIN_DIR/cloudkitty-api --config-file=$CLOUDKITTY_CONF"
384+
run_process ck-api "$CLOUDKITTY_BIN_DIR/cloudkitty-api --host $CLOUDKITTY_SERVICE_HOST --port $CLOUDKITTY_SERVICE_PORT"
385385
elif is_service_enabled ck-api; then
386386
enable_apache_site cloudkitty
387387
echo_summary "Waiting 15s for cloudkitty-processor to authenticate against keystone before apache is restarted."
@@ -443,6 +443,11 @@ function update_horizon_static {
443443
restart_apache_server
444444
}
445445

446+
# Upgrade cloudkitty database
447+
function upgrade_cloudkitty_database {
448+
$CLOUDKITTY_BIN_DIR/cloudkitty-dbsync upgrade
449+
}
450+
446451
# configure_cloudkitty_dashboard() - Set config files, create data dirs, etc
447452
function configure_cloudkitty_dashboard {
448453
sudo ln -s $CLOUDKITTY_ENABLED_DIR/_[0-9]*.py \

0 commit comments

Comments
 (0)