7552166404
Use OS::TripleO::Services::Logging::NovaLibvirt resource to configure logging in libvirt, so that we can gather logging configuration into deployments/logging. Change-Id: I6db952002b6d5f3d2efa65498db520526614d96b
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
heat_template_version: rocky
|
|
|
|
description: >
|
|
OpenStack containerized Nova libvirt service
|
|
|
|
parameters:
|
|
LibvirtLogLevel:
|
|
default: 3
|
|
description: Defines log level in libvirt to filter log output.
|
|
See https://libvirt.org/logging.html to find its detail.
|
|
type: number
|
|
constraints:
|
|
- range: { min: 1, max: 4 }
|
|
|
|
outputs:
|
|
config_settings:
|
|
description: Extra hieradata needed to log to files in the host.
|
|
value:
|
|
nova::compute::libvirt::log_outputs:
|
|
str_replace:
|
|
template:
|
|
'LEVEL:file:/var/log/libvirt/libvirtd.log'
|
|
params:
|
|
LEVEL: {get_param: LibvirtLogLevel}
|
|
volumes:
|
|
description: The volumes needed to log to files in the host.
|
|
value:
|
|
- /var/log/containers/libvirt:/var/log/libvirt:z
|
|
docker_config:
|
|
description: Extra containers needed for logging to file in the host.
|
|
value: null
|
|
host_prep_tasks:
|
|
description: Extra ansible tasks needed for logging to files in the host.
|
|
value:
|
|
- name: create persistent directories
|
|
file:
|
|
path: "{{ item.path }}"
|
|
setype: "{{ item.setype }}"
|
|
state: directory
|
|
with_items:
|
|
- { 'path': /var/log/containers/libvirt, 'setype': svirt_sandbox_file_t }
|
|
- name: libvirt logs readme
|
|
copy:
|
|
dest: /var/log/libvirt/readme.txt
|
|
content: |
|
|
Log files from libvirt containers can be found under
|
|
/var/log/containers/libvirt.
|
|
ignore_errors: true
|