Merge "Set logging parameters for virtlogd"
This commit is contained in:
commit
d515e1a235
|
@ -11,6 +11,13 @@ parameters:
|
||||||
type: number
|
type: number
|
||||||
constraints:
|
constraints:
|
||||||
- range: { min: 1, max: 4 }
|
- 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:
|
outputs:
|
||||||
config_settings:
|
config_settings:
|
||||||
|
@ -22,6 +29,12 @@ outputs:
|
||||||
'LEVEL:file:/var/log/libvirt/libvirtd.log'
|
'LEVEL:file:/var/log/libvirt/libvirtd.log'
|
||||||
params:
|
params:
|
||||||
LEVEL: {get_param: LibvirtLogLevel}
|
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:
|
volumes:
|
||||||
description: The volumes needed to log to files in the host.
|
description: The volumes needed to log to files in the host.
|
||||||
value:
|
value:
|
||||||
|
|
|
@ -11,6 +11,13 @@ parameters:
|
||||||
type: number
|
type: number
|
||||||
constraints:
|
constraints:
|
||||||
- range: { min: 1, max: 4 }
|
- 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:
|
outputs:
|
||||||
config_settings:
|
config_settings:
|
||||||
|
@ -22,6 +29,12 @@ outputs:
|
||||||
'LEVEL:stderr'
|
'LEVEL:stderr'
|
||||||
params:
|
params:
|
||||||
LEVEL: {get_param: LibvirtLogLevel}
|
LEVEL: {get_param: LibvirtLogLevel}
|
||||||
|
nova::compute::libvirt::virtlogd::log_outputs:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
'LEVEL:stderr'
|
||||||
|
params:
|
||||||
|
LEVEL: {get_param: LibvirtVirtlogdLogLevel}
|
||||||
docker_config:
|
docker_config:
|
||||||
description: Extra containers needed for logging to stdout or a sidecar container.
|
description: Extra containers needed for logging to stdout or a sidecar container.
|
||||||
value: null
|
value: null
|
||||||
|
|
|
@ -215,11 +215,17 @@ parameters:
|
||||||
tags:
|
tags:
|
||||||
- role_specific
|
- role_specific
|
||||||
LibvirtLogFilters:
|
LibvirtLogFilters:
|
||||||
description: Defines a filter to select a different logging level
|
description: Defines a filter in libvirt daemon to select a different
|
||||||
for a given category log outputs, as specified in
|
logging level for a given category log outputs, as specified
|
||||||
https://libvirt.org/logging.html .
|
in https://libvirt.org/logging.html .
|
||||||
type: string
|
type: string
|
||||||
default: '1:libvirt 1:qemu 1:conf 1:security 3:event 3:json 3:file 3:object 1:util'
|
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:
|
LibvirtTLSPriority:
|
||||||
description: >
|
description: >
|
||||||
Override the compile time default TLS priority string.
|
Override the compile time default TLS priority string.
|
||||||
|
@ -402,6 +408,7 @@ outputs:
|
||||||
params:
|
params:
|
||||||
$NETWORK: {get_param: [ServiceNetMap, NovaLibvirtNetwork]}
|
$NETWORK: {get_param: [ServiceNetMap, NovaLibvirtNetwork]}
|
||||||
nova::compute::libvirt::log_filters: {get_param: LibvirtLogFilters}
|
nova::compute::libvirt::log_filters: {get_param: LibvirtLogFilters}
|
||||||
|
nova::compute::libvirt::virtlogd::log_filters: {get_param: LibvirtVirtlogdLogFilters}
|
||||||
rbd_persistent_storage: {get_param: CinderEnableRbdBackend}
|
rbd_persistent_storage: {get_param: CinderEnableRbdBackend}
|
||||||
-
|
-
|
||||||
if:
|
if:
|
||||||
|
@ -551,7 +558,7 @@ outputs:
|
||||||
- {}
|
- {}
|
||||||
puppet_config:
|
puppet_config:
|
||||||
config_volume: nova_libvirt
|
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:
|
step_config:
|
||||||
list_join:
|
list_join:
|
||||||
- "\n"
|
- "\n"
|
||||||
|
@ -651,6 +658,7 @@ outputs:
|
||||||
volumes:
|
volumes:
|
||||||
list_concat:
|
list_concat:
|
||||||
- {get_attr: [ContainersCommon, volumes]}
|
- {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/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
|
- /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…
Reference in New Issue