0a976790b9
The nova-novncproxy and nova-spicehtml5proxy services do not support using a HUP signal to reload, so the init file for them should not implement a reload. Depends-On: Id4b9caa1cdfd0f53023548c4ede5d497d64c873d Change-Id: I36e2200e2ca43d87208d2c4edb17b98654bb121e
38 lines
1.4 KiB
Django/Jinja
38 lines
1.4 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 %}
|
|
{% if item.service_name != nova_services['nova-novncproxy']['service_name'] and item.service_name != nova_services['nova-spicehtml5proxy']['service_name'] %}
|
|
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') }}
|
|
{% endif %}
|
|
|
|
# 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
|