
The policy.json file is currently read continually by the services and is not only read on service start. We therefore cannot template directly to the file read by the service (if the service is already running) because the new policies may not be valid until the service restarts. This is particularly important during a major upgrade. We therefore only put the policy file in place after the service restart. This patch also tidies up the handlers and some of the install tasks to simplify them and reduce the tasks/code a little. Change-Id: Icba9df7be6012576eca0afb040a6953809cc9a5f
35 lines
1.0 KiB
Django/Jinja
35 lines
1.0 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 %}
|
|
|
|
# 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
|