Set logging parameters for virtlogd
Set logging parameters for virtlogd so what we can configure logging for it in addition to libvirtd. Depends-on: https://review.opendev.org/#/c/685024 Depends-on: https://review.opendev.org/#/c/685349 Change-Id: If2f8ed617b7dca0d7defb819dcfdddb129c2ea1c
This commit is contained in:
parent
38a95f12b1
commit
55b0bfed1c
@ -11,6 +11,13 @@ parameters:
|
||||
type: number
|
||||
constraints:
|
||||
- range: { min: 1, max: 4 }
|
||||
LibvirtVirtlogdLogLevel:
|
||||
default: 3
|
||||
description: Defines log level in virtlogd 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:
|
||||
@ -22,6 +29,12 @@ outputs:
|
||||
'LEVEL:file:/var/log/libvirt/libvirtd.log'
|
||||
params:
|
||||
LEVEL: {get_param: LibvirtLogLevel}
|
||||
nova::compute::libvirt::virtlogd::log_outputs:
|
||||
str_replace:
|
||||
template:
|
||||
'LEVEL:file:/var/log/libvirt/virtlogd.log'
|
||||
params:
|
||||
LEVEL: {get_param: LibvirtVirtlogdLogLevel}
|
||||
volumes:
|
||||
description: The volumes needed to log to files in the host.
|
||||
value:
|
||||
|
@ -11,6 +11,13 @@ parameters:
|
||||
type: number
|
||||
constraints:
|
||||
- range: { min: 1, max: 4 }
|
||||
LibvirtVirtlogdLogLevel:
|
||||
default: 3
|
||||
description: Defines log level in virtlogd 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:
|
||||
@ -22,6 +29,12 @@ outputs:
|
||||
'LEVEL:stderr'
|
||||
params:
|
||||
LEVEL: {get_param: LibvirtLogLevel}
|
||||
nova::compute::libvirt::virtlogd::log_outputs:
|
||||
str_replace:
|
||||
template:
|
||||
'LEVEL:stderr'
|
||||
params:
|
||||
LEVEL: {get_param: LibvirtVirtlogdLogLevel}
|
||||
docker_config:
|
||||
description: Extra containers needed for logging to stdout or a sidecar container.
|
||||
value: null
|
||||
|
@ -213,11 +213,17 @@ parameters:
|
||||
tags:
|
||||
- role_specific
|
||||
LibvirtLogFilters:
|
||||
description: Defines a filter to select a different logging level
|
||||
for a given category log outputs, as specified in
|
||||
https://libvirt.org/logging.html .
|
||||
description: Defines a filter in libvirt daemon to select a different
|
||||
logging level for a given category log outputs, as specified
|
||||
in https://libvirt.org/logging.html .
|
||||
type: string
|
||||
default: '1:libvirt 1:qemu 1:conf 1:security 3:event 3:json 3:file 3:object 1:util'
|
||||
LibvirtVirtlogdLogFilters:
|
||||
description: Defines a filter in virtlogd to select a different
|
||||
logging level for a given category log outputs, as specified
|
||||
in https://libvirt.org/logging.html .
|
||||
type: string
|
||||
default: '1:logging 4:object 4:json 4:event 1:util'
|
||||
LibvirtTLSPriority:
|
||||
description: >
|
||||
Override the compile time default TLS priority string.
|
||||
@ -400,6 +406,7 @@ outputs:
|
||||
params:
|
||||
$NETWORK: {get_param: [ServiceNetMap, NovaLibvirtNetwork]}
|
||||
nova::compute::libvirt::log_filters: {get_param: LibvirtLogFilters}
|
||||
nova::compute::libvirt::virtlogd::log_filters: {get_param: LibvirtVirtlogdLogFilters}
|
||||
rbd_persistent_storage: {get_param: CinderEnableRbdBackend}
|
||||
-
|
||||
if:
|
||||
@ -549,7 +556,7 @@ outputs:
|
||||
- {}
|
||||
puppet_config:
|
||||
config_volume: nova_libvirt
|
||||
puppet_tags: libvirtd_config,nova_config,file,libvirt_tls_password
|
||||
puppet_tags: libvirtd_config,virtlogd_config,nova_config,file,libvirt_tls_password
|
||||
step_config:
|
||||
list_join:
|
||||
- "\n"
|
||||
@ -649,6 +656,7 @@ outputs:
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [NovaLibvirtLogging, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/nova_virtlogd.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/nova_libvirt:/var/lib/kolla/config_files/src:ro
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Now virtlogd will output its logs into an independent log file,
|
||||
/var/log/containers/libvirt/virtlogd.log, instead of host journal.
|
||||
- |
|
||||
LibvirtVirtlogdLogLevel and LibvirtVirtlogdLogFilters were added to
|
||||
set logging parameters in virtlogd.
|
Loading…
x
Reference in New Issue
Block a user