* 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
... | ... |
@@ -148,16 +148,18 @@ function is_keystone_enabled { |
148 | 148 |
# cleanup_keystone() - Remove residual data files, anything left over from previous |
149 | 149 |
# runs that a clean run would need to clean up |
150 | 150 |
function cleanup_keystone { |
151 |
- # TODO: remove admin at pike-2 |
|
152 |
- # These files will be created if we are running WSGI_MODE="uwsgi" |
|
153 |
- remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI" |
|
154 |
- remove_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI" |
|
155 |
- sudo rm -f $(apache_site_config_for keystone-wsgi-public) |
|
156 |
- sudo rm -f $(apache_site_config_for keystone-wsgi-admin) |
|
157 |
- |
|
158 |
- # These files will be created if we are running WSGI_MODE="mod_wsgi" |
|
159 |
- disable_apache_site keystone |
|
160 |
- sudo rm -f $(apache_site_config_for keystone) |
|
151 |
+ if [ "$KEYSTONE_DEPLOY" == "mod_wsgi" ]; then |
|
152 |
+ # These files will be created if we are running WSGI_MODE="mod_wsgi" |
|
153 |
+ disable_apache_site keystone |
|
154 |
+ sudo rm -f $(apache_site_config_for keystone) |
|
155 |
+ else |
|
156 |
+ stop_process "keystone" |
|
157 |
+ # TODO: remove admin at pike-2 |
|
158 |
+ remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI" |
|
159 |
+ remove_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI" |
|
160 |
+ sudo rm -f $(apache_site_config_for keystone-wsgi-public) |
|
161 |
+ sudo rm -f $(apache_site_config_for keystone-wsgi-admin) |
|
162 |
+ fi |
|
161 | 163 |
} |
162 | 164 |
|
163 | 165 |
# _config_keystone_apache_wsgi() - Set WSGI config files of Keystone |
... | ... |
@@ -582,9 +584,6 @@ function stop_keystone { |
582 | 582 |
restart_apache_server |
583 | 583 |
else |
584 | 584 |
stop_process keystone |
585 |
- remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI" |
|
586 |
- # TODO(remove in at pike-2) |
|
587 |
- remove_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI" |
|
588 | 585 |
fi |
589 | 586 |
# Kill the Keystone screen window |
590 | 587 |
stop_process key |
... | ... |
@@ -896,14 +896,12 @@ fi |
896 | 896 |
if is_service_enabled nova; then |
897 | 897 |
# Compute service |
898 | 898 |
stack_install_service nova |
899 |
- cleanup_nova |
|
900 | 899 |
configure_nova |
901 | 900 |
fi |
902 | 901 |
|
903 | 902 |
if is_service_enabled placement; then |
904 | 903 |
# placement api |
905 | 904 |
stack_install_service placement |
906 |
- cleanup_placement |
|
907 | 905 |
configure_placement |
908 | 906 |
fi |
909 | 907 |
|