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
parent 644a6b9f10
commit aa33c878d8
3 changed files with 13 additions and 15 deletions

View File

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

View File

@ -148,16 +148,18 @@ 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 {
# 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)
if [ "$KEYSTONE_DEPLOY" == "mod_wsgi" ]; then
# 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)
else
stop_process "keystone"
# 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)
fi
}
# _config_keystone_apache_wsgi() - Set WSGI config files of Keystone
@ -582,9 +584,6 @@ function stop_keystone {
restart_apache_server
else
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
# Kill the Keystone screen window
stop_process key

View File

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