Merge "Fix reloads for uWSGI"

This commit is contained in:
Jenkins 2017-08-16 09:25:22 +00:00 committed by Gerrit Code Review
commit 0d0527e8f8
2 changed files with 5 additions and 4 deletions

View File

@ -15,8 +15,8 @@ ExecStart={{ item.program_override }} {{ item.program_config_options|default('')
{% else %}
ExecStart={{ cinder_bin }}/{{ item.service_name }} {{ item.program_config_options|default('') }} --log-file=/var/log/cinder/{{ item.service_name }}.log
{% endif %}
{% if item.service_name != "cinder-api" %}
ExecReload=/bin/kill -HUP $MAINPID
{% if item.service_name != "cinder-api" or item.wsgi_app %}
ExecReload={{ (item.wsgi_app is defined and item.wsgi_app) | ternary(cinder_bin + '/uwsgi --reload /var/run/' + item.service_name + '/' + item.service_name +'.pid','/bin/kill -HUP $MAINPID') }}
{% endif %}
# Give a reasonable amount of time for the server to start up/shut down

View File

@ -4,16 +4,17 @@ gid = {{ cinder_system_group_name }}
virtualenv = /openstack/venvs/cinder-{{ cinder_venv_tag }}
wsgi-file = {{ cinder_bin }}/{{ item.wsgi_name }}
http-socket = {{ item.uwsgi_bind_address }}:{{ item.uwsgi_port }}
http = {{ item.uwsgi_bind_address }}:{{ item.uwsgi_port }}
master = true
enable-threads = true
processes = {{ cinder_wsgi_processes }}
threads = {{ cinder_wsgi_threads }}
exit-on-reload = true
exit-on-reload = false
die-on-term = true
lazy-apps = true
add-header = Connection: close
buffer-size = {{ cinder_wsgi_buffer_size }}
thunder-lock = true
logfile-chmod = 644
pidfile = /var/run/{{ item.service_name }}/{{ item.service_name }}.pid