Add option for nova-libvirt container to log to stdout/stderr

This adds the option to get the nova-libvirt container to log to stdout.
The option is disabled by default.

bp logging-stdout-rsyslog

Change-Id: Ie769b4d93f3bd728b7efb84d283509db8213b5fc
This commit is contained in:
Juan Antonio Osorio Robles 2017-10-09 12:43:28 +00:00 committed by Jiri Stransky
parent d3c991183f
commit 759d10770d
4 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,19 @@
heat_template_version: pike
description: >
OpenStack containerized Nova libvirt service
outputs:
config_settings:
description: Extra hieradata needed to log to stdout.
value:
nova::compute::libvirt::log_outputs: '3:stderr'
docker_config:
description: Extra containers needed for logging to stdout or a sidecar container.
value: null
volumes:
description: The volumes needed to log to stdout or a sidecar container.
value: null
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value: null

View File

@ -106,6 +106,9 @@ resources:
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
NovaLibvirtLogging:
type: OS::TripleO::Services::Logging::NovaLibvirt
outputs:
role_data:
description: Role data for the Libvirt service.
@ -114,6 +117,7 @@ outputs:
config_settings:
map_merge:
- get_attr: [NovaLibvirtBase, role_data, config_settings]
- get_attr: [NovaLibvirtLogging, config_settings]
- tripleo::profile::base::certmonger_user::libvirt_postsave_cmd: "true" # TODO: restart the libvirt container here
logging_source: {get_attr: [NovaLibvirtBase, role_data, logging_source]}

View File

@ -7,3 +7,4 @@ resource_registry:
OS::TripleO::Services::Logging::NovaApi: ../docker/services/logging/stdout/nova-api.yaml
OS::TripleO::Services::Logging::NovaCommon: ../docker/services/logging/stdout/nova-common.yaml
OS::TripleO::Services::Logging::NovaPlacement: ../docker/services/logging/stdout/nova-placement.yaml
OS::TripleO::Services::Logging::NovaLibvirt: ../docker/services/logging/stdout/nova-libvirt.yaml

View File

@ -305,6 +305,7 @@ resource_registry:
OS::TripleO::Services::Logging::NovaApi: docker/services/logging/files/nova-api.yaml
OS::TripleO::Services::Logging::NovaCommon: docker/services/logging/files/nova-common.yaml
OS::TripleO::Services::Logging::NovaPlacement: docker/services/logging/files/nova-placement.yaml
OS::TripleO::Services::Logging::NovaLibvirt: OS::Heat::None
parameter_defaults:
EnablePackageInstall: false