6b5a267065
uWSGI won't reload properly unless we use one of the built in options for uWSGI reloads: touch-reload pidfile reload using uwsgi binary This opts to use the pid file option, which uses the built in uWSGI --reload option along with the "pidfile" option specified in the conf file to reload the service. Change-Id: I720011f3486fa5c1cf8cf8f5d826ca726930f751
36 lines
1.2 KiB
Django/Jinja
36 lines
1.2 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
[Unit]
|
|
Description=nova openstack service
|
|
After=syslog.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User={{ nova_system_user_name }}
|
|
Group={{ nova_system_group_name }}
|
|
|
|
{% if item.program_override is defined %}
|
|
ExecStart={{ item.program_override }} {{ item.program_config_options | default('') }} {{ item.log_string | default('--log-file=') }}/var/log/nova/{{ item.service_name }}.log
|
|
{% else %}
|
|
ExecStart={{ nova_bin }}/{{ item.service_name }} {{ item.program_config_options | default('') }} {{ item.log_string | default('--log-file=') }}/var/log/nova/{{ item.service_name }}.log
|
|
{% endif %}
|
|
ExecReload={{ (item.wsgi_app is defined and item.wsgi_app) | ternary(nova_bin + '/uwsgi --reload /var/run/' + item.service_name + '/' + item.service_name +'.pid','/bin/kill -HUP $MAINPID') }}
|
|
|
|
# Give a reasonable amount of time for the server to start up/shut down
|
|
TimeoutSec=120
|
|
Restart=on-failure
|
|
RestartSec=2
|
|
|
|
# This creates a specific slice which all nova services will operate from
|
|
# The accounting options give us the ability to see resource usage through
|
|
# the `systemd-cgtop` command.
|
|
Slice=nova.slice
|
|
CPUAccounting=true
|
|
BlockIOAccounting=true
|
|
MemoryAccounting=false
|
|
TasksAccounting=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|