Normally a standalone uwsgi server would run in "master" mode -- it
handles signals to reload the processes. I tried this originally
with keystone but found that the server didn't shut down when
unstacking. The reason it didn't shut down is because (by default)
uwsgi does a reload on SIGTERM & SIGHUP rather than shutting down by
default, see [1].
Setting "die-on-term = true" & "exit-on-reload = true" changes the
uwsgi server to shut down when unstacking.
[1] http://uwsgi-docs.readthedocs.org/en/latest/Management.html#reloading-the-server
Change-Id: I145fef185d4a31078295941779e175b7452a5760
| ... | ... |
@@ -310,6 +310,11 @@ function configure_keystone {
|
| 310 | 310 |
|
| 311 | 311 |
# Common settings |
| 312 | 312 |
for file in "$KEYSTONE_PUBLIC_UWSGI_FILE" "$KEYSTONE_ADMIN_UWSGI_FILE"; do |
| 313 |
+ # This is running standalone |
|
| 314 |
+ iniset "$file" uwsgi master true |
|
| 315 |
+ # Set die-on-term & exit-on-reload so that uwsgi shuts down |
|
| 316 |
+ iniset "$file" uwsgi die-on-term true |
|
| 317 |
+ iniset "$file" uwsgi exit-on-reload true |
|
| 313 | 318 |
iniset "$file" uwsgi enable-threads true |
| 314 | 319 |
iniset "$file" uwsgi plugins python |
| 315 | 320 |
# uwsgi recommends this to prevent thundering herd on accept. |