Fix Cleanups for keystone/placement/nova

* Check KEYSTONE_DEPLOY flag and cleanup appropriately
* When we stop process, we should not wipe uwsgi config we should
  remove files only on cleanup
* We should not call cleanup *BEFORE* configure, we are just wiping
  out the uwsgi ini files
* cleanup_placement should be called from clean.sh

Change-Id: I066f5f87ff22d7da2e3814f8c2de75f2af625d2b
This commit is contained in:
Davanum Srinivas 2017-08-16 22:51:07 -04:00 committed by Davanum Srinivas (dims)
parent e9f92355eb
commit bd2f6a860f
3 changed files with 13 additions and 15 deletions

View File

@ -88,6 +88,7 @@ cleanup_cinder || /bin/true
cleanup_glance cleanup_glance
cleanup_keystone cleanup_keystone
cleanup_nova cleanup_nova
cleanup_placement
cleanup_neutron cleanup_neutron
cleanup_swift cleanup_swift
cleanup_horizon cleanup_horizon

View File

@ -148,16 +148,18 @@ function is_keystone_enabled {
# cleanup_keystone() - Remove residual data files, anything left over from previous # cleanup_keystone() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up # runs that a clean run would need to clean up
function cleanup_keystone { function cleanup_keystone {
# TODO: remove admin at pike-2 if [ "$KEYSTONE_DEPLOY" == "mod_wsgi" ]; then
# These files will be created if we are running WSGI_MODE="uwsgi" # These files will be created if we are running WSGI_MODE="mod_wsgi"
remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI" disable_apache_site keystone
remove_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI" sudo rm -f $(apache_site_config_for keystone)
sudo rm -f $(apache_site_config_for keystone-wsgi-public) else
sudo rm -f $(apache_site_config_for keystone-wsgi-admin) stop_process "keystone"
# TODO: remove admin at pike-2
# These files will be created if we are running WSGI_MODE="mod_wsgi" remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI"
disable_apache_site keystone remove_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI"
sudo rm -f $(apache_site_config_for keystone) sudo rm -f $(apache_site_config_for keystone-wsgi-public)
sudo rm -f $(apache_site_config_for keystone-wsgi-admin)
fi
} }
# _config_keystone_apache_wsgi() - Set WSGI config files of Keystone # _config_keystone_apache_wsgi() - Set WSGI config files of Keystone
@ -582,9 +584,6 @@ function stop_keystone {
restart_apache_server restart_apache_server
else else
stop_process keystone stop_process keystone
remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI"
# TODO(remove in at pike-2)
remove_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI"
fi fi
# Kill the Keystone screen window # Kill the Keystone screen window
stop_process key stop_process key

View File

@ -896,14 +896,12 @@ fi
if is_service_enabled nova; then if is_service_enabled nova; then
# Compute service # Compute service
stack_install_service nova stack_install_service nova
cleanup_nova
configure_nova configure_nova
fi fi
if is_service_enabled placement; then if is_service_enabled placement; then
# placement api # placement api
stack_install_service placement stack_install_service placement
cleanup_placement
configure_placement configure_placement
fi fi