lib/apache: Pass name, not path, to remove_uwsgi_config
We'd like to move from configuring uWSGI with '.wsgi' files to configuring with module paths. Do this for all in-tree services and log a deprecation warning for anyone still passing a path. Note that since 'basepath foo' returns 'foo', this is effectively a no-op for the services being converted here. Change-Id: Ia1ad5ff160a9821ceab97ff1c24bc48cd4bf1d6f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
951e53bfcc
commit
d5182ce3fc
@ -402,8 +402,14 @@ function remove_uwsgi_config {
|
||||
local conf=$1
|
||||
local wsgi=$2
|
||||
local name=""
|
||||
# TODO(stephenfin): Remove this call when everyone is using module path
|
||||
# configuration instead of file path configuration
|
||||
name=$(basename $wsgi)
|
||||
|
||||
if [[ "$wsgi" = /* ]]; then
|
||||
deprecated "Passing a wsgi script to remove_uwsgi_config is deprecated, pass an application name instead"
|
||||
fi
|
||||
|
||||
rm -rf $conf
|
||||
disable_apache_site $name
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ function cleanup_cinder {
|
||||
fi
|
||||
|
||||
stop_process "c-api"
|
||||
remove_uwsgi_config "$CINDER_UWSGI_CONF" "$CINDER_UWSGI"
|
||||
remove_uwsgi_config "$CINDER_UWSGI_CONF" "cinder-wsgi"
|
||||
}
|
||||
|
||||
# configure_cinder() - Set config files, create data dirs, etc
|
||||
|
@ -168,7 +168,7 @@ function cleanup_glance {
|
||||
# Cleanup reserved stores directories
|
||||
sudo rm -rf $GLANCE_STAGING_DIR $GLANCE_TASKS_DIR
|
||||
fi
|
||||
remove_uwsgi_config "$GLANCE_UWSGI_CONF" "$GLANCE_UWSGI"
|
||||
remove_uwsgi_config "$GLANCE_UWSGI_CONF" "glance-wsgi-api"
|
||||
}
|
||||
|
||||
# Set multiple cinder store related config options for each of the cinder store
|
||||
|
@ -150,7 +150,7 @@ function cleanup_keystone {
|
||||
sudo rm -f $(apache_site_config_for keystone)
|
||||
else
|
||||
stop_process "keystone"
|
||||
remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI"
|
||||
remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "keystone-wsgi-public"
|
||||
sudo rm -f $(apache_site_config_for keystone-wsgi-public)
|
||||
fi
|
||||
}
|
||||
|
@ -823,7 +823,7 @@ function cleanup_neutron {
|
||||
if [ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" ]; then
|
||||
stop_process neutron-api
|
||||
stop_process neutron-rpc-server
|
||||
remove_uwsgi_config "$NEUTRON_UWSGI_CONF" "$NEUTRON_BIN_DIR/neutron-api"
|
||||
remove_uwsgi_config "$NEUTRON_UWSGI_CONF" "neutron-api"
|
||||
sudo rm -f $(apache_site_config_for neutron-api)
|
||||
fi
|
||||
|
||||
|
4
lib/nova
4
lib/nova
@ -248,8 +248,8 @@ function cleanup_nova {
|
||||
|
||||
stop_process "n-api"
|
||||
stop_process "n-api-meta"
|
||||
remove_uwsgi_config "$NOVA_UWSGI_CONF" "$NOVA_UWSGI"
|
||||
remove_uwsgi_config "$NOVA_METADATA_UWSGI_CONF" "$NOVA_METADATA_UWSGI"
|
||||
remove_uwsgi_config "$NOVA_UWSGI_CONF" "nova-api"
|
||||
remove_uwsgi_config "$NOVA_METADATA_UWSGI_CONF" "nova-metadata"
|
||||
|
||||
if [[ "$NOVA_BACKEND" == "LVM" ]]; then
|
||||
clean_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME
|
||||
|
@ -68,7 +68,7 @@ function is_placement_enabled {
|
||||
# runs that a clean run would need to clean up
|
||||
function cleanup_placement {
|
||||
sudo rm -f $(apache_site_config_for placement-api)
|
||||
remove_uwsgi_config "$PLACEMENT_UWSGI_CONF" "$PLACEMENT_UWSGI"
|
||||
remove_uwsgi_config "$PLACEMENT_UWSGI_CONF" "placement-api"
|
||||
}
|
||||
|
||||
# _config_placement_apache_wsgi() - Set WSGI config files
|
||||
|
Loading…
Reference in New Issue
Block a user