diff --git a/functions-common b/functions-common index 65c38a58eb..90f540017c 100644 --- a/functions-common +++ b/functions-common @@ -1679,15 +1679,12 @@ function stop_process { SERVICE_DIR=${SERVICE_DIR:-${DEST}/status} if is_service_enabled $service; then - # Kill via pid if we have one available - if [[ "$USE_SYSTEMD" == "True" ]]; then - # Only do this for units which appear enabled, this also - # catches units that don't really exist for cases like - # keystone without a failure. - if $SYSTEMCTL is-enabled devstack@$service.service; then - $SYSTEMCTL stop devstack@$service.service - $SYSTEMCTL disable devstack@$service.service - fi + # Only do this for units which appear enabled, this also + # catches units that don't really exist for cases like + # keystone without a failure. + if $SYSTEMCTL is-enabled devstack@$service.service; then + $SYSTEMCTL stop devstack@$service.service + $SYSTEMCTL disable devstack@$service.service fi if [[ -r $SERVICE_DIR/$SCREEN_NAME/$service.pid ]]; then diff --git a/lib/keystone b/lib/keystone index fd1e29ce28..61b0a0c287 100644 --- a/lib/keystone +++ b/lib/keystone @@ -141,16 +141,16 @@ function is_keystone_enabled { # cleanup_keystone() - Remove residual data files, anything left over from previous # runs that a clean run would need to clean up function cleanup_keystone { - if [[ "$WSGI_MODE" == "uwsgi" ]]; then - # TODO: remove admin at pike-2 - remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI" - remove_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI" - sudo rm -f $(apache_site_config_for keystone-wsgi-public) - sudo rm -f $(apache_site_config_for keystone-wsgi-admin) - else - disable_apache_site keystone - sudo rm -f $(apache_site_config_for keystone) - fi + # TODO: remove admin at pike-2 + # These files will be created if we are running WSGI_MODE="uwsgi" + remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI" + remove_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI" + sudo rm -f $(apache_site_config_for keystone-wsgi-public) + sudo rm -f $(apache_site_config_for keystone-wsgi-admin) + + # These files will be created if we are running WSGI_MODE="mod_wsgi" + disable_apache_site keystone + sudo rm -f $(apache_site_config_for keystone) } # _config_keystone_apache_wsgi() - Set WSGI config files of Keystone diff --git a/lib/placement b/lib/placement index 2c51ed69b4..ad12824a38 100644 --- a/lib/placement +++ b/lib/placement @@ -69,6 +69,7 @@ function is_placement_enabled { # cleanup_placement() - Remove residual data files, anything left over from previous # runs that a clean run would need to clean up function cleanup_placement { + sudo rm -f $(apache_site_config_for nova-placement-api) sudo rm -f $(apache_site_config_for placement-api) }