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: I469845201a4ebd756e70dd2ed5e462f0f6e4dcf9 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
99b7e4af83
commit
bb3f39cb2f
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
features:
|
||||
- New variables have been added to allow a deployer to customize
|
||||
a barbican systemd unit file to their liking.
|
||||
- The task dropping the barbican 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.
|
||||
|
|
@ -143,3 +143,5 @@ barbican_pip_packages:
|
|||
# pip packages required by this role. The value is picked up
|
||||
# by the py_pkgs lookup.
|
||||
barbican_role_project_group: barbican_all
|
||||
|
||||
barbican_uwsgi_init_overrides: {}
|
||||
|
|
|
@ -38,11 +38,13 @@
|
|||
group: "root"
|
||||
|
||||
- name: Place the systemd init script
|
||||
template:
|
||||
config_template:
|
||||
src: "barbican-systemd-init.j2"
|
||||
dest: "/etc/systemd/system/{{ program_name }}.service"
|
||||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
config_overrides: "{{ barbican_uwsgi_init_overrides }}"
|
||||
config_type: "ini"
|
||||
notify:
|
||||
- Restart barbican services
|
||||
|
|
|
@ -21,5 +21,14 @@ TimeoutSec=300
|
|||
Restart=on-failure
|
||||
RestartSec=150
|
||||
|
||||
# This creates a specific slice which all services will operate from
|
||||
# The accounting options give us the ability to see resource usage through
|
||||
# the `systemd-cgtop` command.
|
||||
Slice=barbican.slice
|
||||
CPUAccounting=true
|
||||
BlockIOAccounting=true
|
||||
MemoryAccounting=false
|
||||
TasksAccounting=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in New Issue