libvirt: fix formatting of the log_outputs parameter

Change 3f2e063c78 updated format of
the log_outputs parameter unpexpectedly, and because of that change
libvirt no longer generate its log file by default.
This change fixes the parameter format so that libvirt records logs
as expected.

Closes-Bug: #1929264
Change-Id: Ic92584431e0bf38bf4ae2a2479aa7999b343ae33
This commit is contained in:
Takashi Kajinami 2021-05-22 14:32:36 +09:00
parent fe2373225f
commit 65ddeed5f4
2 changed files with 44 additions and 24 deletions

View File

@ -32,19 +32,29 @@ outputs:
description: Extra hieradata needed to log to files in the host.
value:
nova::compute::libvirt::log_outputs:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtLogLevel}
str_replace:
template:
'LEVEL:file:/var/log/libvirt/libvirtd.log'
params:
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtLogLevel}
nova::compute::libvirt::virtlogd::log_outputs:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtlogdLogLevel}
str_replace:
template:
'LEVEL:file:/var/log/libvirt/virtlogd.log'
params:
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtlogdLogLevel}
volumes:
description: The volumes needed to log to files in the host.
value:

View File

@ -32,19 +32,29 @@ outputs:
description: Extra hieradata needed to log to stdout.
value:
nova::compute::libvirt::log_outputs:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtLogLevel}
str_replace:
template:
'LEVEL:stderr'
params:
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtLogLevel}
nova::compute::libvirt::virtlogd::log_outputs:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtlogdLogLevel}
str_replace:
template:
'LEVEL:stderr'
params:
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtlogdLogLevel}
docker_config:
description: Extra containers needed for logging to stdout or a sidecar container.
value: null