Ensure the components are isolated from the system
This creates a specific slice which all OpenStack services will operate from. By creating an independent slice these components will be governed away from the system slice allowing us to better optimise resource consumption. See the following for more information on slices: * https://www.freedesktop.org/software/systemd/man/systemd.slice.html See for following for more information on resource controls: * https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html Tools like ``systemd-cgtop`` and ``systemd-cgls`` will now give us insight into specific processes, process groups, and resouce consumption in ways that we've not had access to before. To enable some of this reporting the accounting options have been added to the [Service] section of the unit file. Change-Id: I3cdaf5829011b5b73112e1a76a6dfc7259b169f5 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
1c6b5acae8
commit
e9cc32c574
@ -418,37 +418,56 @@ nova_libvirtd_listen_tcp: 0
|
||||
nova_libvirtd_auth_tcp: sasl
|
||||
nova_libvirtd_debug_log_filters: "3:remote 4:event 3:json 3:rpc"
|
||||
|
||||
nova_api_metadata_init_overrides: {}
|
||||
nova_api_os_compute_init_overrides: {}
|
||||
nova_compute_init_overrides: {}
|
||||
nova_conductor_init_overrides: {}
|
||||
nova_consoleauth_init_overrides: {}
|
||||
nova_novncproxy_init_overrides: {}
|
||||
nova_scheduler_init_overrides: {}
|
||||
nova_spicehtml5proxy_init_overrides: {}
|
||||
nova_placement_api_init_overrides: {}
|
||||
|
||||
## Service Name-Group Mapping
|
||||
nova_services:
|
||||
nova-api-metadata:
|
||||
group: nova_api_metadata
|
||||
service_name: nova-api-metadata
|
||||
init_config_overrides: "{{ nova_api_metadata_init_overrides }}"
|
||||
nova-api-os-compute:
|
||||
group: nova_api_os_compute
|
||||
service_name: nova-api-os-compute
|
||||
init_config_overrides: "{{ nova_api_os_compute_init_overrides }}"
|
||||
nova-compute:
|
||||
group: nova_compute
|
||||
service_name: nova-compute
|
||||
init_config_overrides: "{{ nova_compute_init_overrides }}"
|
||||
nova-conductor:
|
||||
group: nova_conductor
|
||||
service_name: nova-conductor
|
||||
init_config_overrides: "{{ nova_conductor_init_overrides }}"
|
||||
nova-consoleauth:
|
||||
group: nova_console
|
||||
service_name: nova-consoleauth
|
||||
init_config_overrides: "{{ nova_consoleauth_init_overrides }}"
|
||||
nova-novncproxy:
|
||||
group: nova_console
|
||||
service_name: nova-novncproxy
|
||||
init_config_overrides: "{{ nova_novncproxy_init_overrides }}"
|
||||
condition: "{{ nova_console_type == 'novnc' }}"
|
||||
nova-scheduler:
|
||||
group: nova_scheduler
|
||||
service_name: nova-scheduler
|
||||
init_config_overrides: "{{ nova_scheduler_init_overrides }}"
|
||||
nova-spicehtml5proxy:
|
||||
group: nova_console
|
||||
service_name: nova-spicehtml5proxy
|
||||
init_config_overrides: "{{ nova_spicehtml5proxy_init_overrides }}"
|
||||
condition: "{{ nova_console_type == 'spice' }}"
|
||||
nova-placement-api:
|
||||
group: nova_api_placement
|
||||
service_name: nova-placement-api
|
||||
init_config_overrides: "{{ nova_placement_api_init_overrides }}"
|
||||
condition: "{{ nova_placement_service_enabled | bool }}"
|
||||
log_string: "--logto "
|
||||
program_override: "{{ nova_bin }}/uwsgi --ini /etc/uwsgi/nova-placement-uwsgi.ini"
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
features:
|
||||
- New variables have been added to allow a deployer to customize
|
||||
a nova systemd unit file to their liking.
|
||||
- The task dropping the nova systemd unit files now uses the
|
||||
``config_template`` action plugin allowing deployers access to
|
||||
customize the unit files as they see fit without having to
|
||||
load extra options into the defaults and polute the generic
|
||||
systemd unit file with jinja2 variables and conditionals.
|
@ -62,12 +62,14 @@
|
||||
- "{{ item.value.condition | default(true) }}"
|
||||
|
||||
- name: Place the systemd init script
|
||||
template:
|
||||
config_template:
|
||||
src: "nova-systemd-init.j2"
|
||||
dest: "/etc/systemd/system/{{ item.value.service_name }}.service"
|
||||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
config_overrides: "{{ item.value.init_config_overrides }}"
|
||||
config_type: "ini"
|
||||
with_dict: "{{ nova_services }}"
|
||||
when:
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
|
@ -21,5 +21,14 @@ TimeoutSec=300
|
||||
Restart=on-failure
|
||||
RestartSec=150
|
||||
|
||||
# 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user