Merge "follow-up: Enable support for Libvirt modular daemons"

This commit is contained in:
Zuul 2021-10-13 02:57:56 +00:00 committed by Gerrit Code Review
commit 82626e9b85
5 changed files with 172 additions and 33 deletions

View File

@ -413,7 +413,9 @@ outputs:
rbd_persistent_storage: {get_param: CinderEnableRbdBackend}
rbd_disk_cachemodes: {get_param: RbdDiskCachemodes}
tripleo::profile::base::nova::libvirt::modular_libvirt: false
nova::params::modular_libvirt: false
nova::compute::libvirt::services::modular_libvirt: false
nova::compute::libvirt::modular_libvirt: false
nova::migration::libvirt::modular_libvirt: false
- if:
- use_tls_for_live_migration
- tripleo::profile::base::nova::migration::client::libvirt_tls: true

View File

@ -95,31 +95,61 @@ outputs:
template:
'LEVEL:file:/var/log/libvirt/virtsecretd.log'
params:
LEVEL: {get_param: LibvirtVirtsecretdLogLevel}
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtsecretdLogLevel}
nova::compute::libvirt::virtnodedevd::log_outputs:
str_replace:
template:
'LEVEL:file:/var/log/libvirt/virtnodedevd.log'
params:
LEVEL: {get_param: LibvirtVirtnodedevdLogLevel}
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtnodedevdLogLevel}
nova::compute::libvirt::virtqemud::log_outputs:
str_replace:
template:
'LEVEL:file:/var/log/libvirt/virtqemud.log'
params:
LEVEL: {get_param: LibvirtVirtqemudLogLevel}
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtqemudLogLevel}
nova::compute::libvirt::virtproxyd::log_outputs:
str_replace:
template:
'LEVEL:file:/var/log/libvirt/virtproxyd.log'
params:
LEVEL: {get_param: LibvirtVirtproxydLogLevel}
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtproxydLogLevel}
nova::compute::libvirt::virtstoraged::log_outputs:
str_replace:
template:
'LEVEL:file:/var/log/libvirt/virtstoraged.log'
params:
LEVEL: {get_param: LibvirtVirtstoragedLogLevel}
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtstoragedLogLevel}
volumes:
description: The volumes needed to log to files in the host.
value:

View File

@ -26,6 +26,41 @@ parameters:
type: number
constraints:
- range: { min: 1, max: 4 }
LibvirtVirtsecretdLogLevel:
default: 3
description: Defines log level in virtsecretd to filter log output.
See https://libvirt.org/logging.html to find its detail.
type: number
constraints:
- range: { min: 1, max: 4 }
LibvirtVirtnodedevdLogLevel:
default: 3
description: Defines log level in virtnodedevd to filter log output.
See https://libvirt.org/logging.html to find its detail.
type: number
constraints:
- range: { min: 1, max: 4 }
LibvirtVirtqemudLogLevel:
default: 3
description: Defines log level in virtqemud to filter log output.
See https://libvirt.org/logging.html to find its detail.
type: number
constraints:
- range: { min: 1, max: 4 }
LibvirtVirtproxydLogLevel:
default: 3
description: Defines log level in virtproxyd to filter log output.
See https://libvirt.org/logging.html to find its detail.
type: number
constraints:
- range: { min: 1, max: 4 }
LibvirtVirtstoragedLogLevel:
default: 3
description: Defines log level in virtstoraged 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:
@ -55,6 +90,66 @@ outputs:
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtlogdLogLevel}
nova::compute::libvirt::virtsecretd::log_outputs:
str_replace:
template:
'LEVEL:stderr'
params:
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtsecretdLogLevel}
nova::compute::libvirt::virtnodedevd::log_outputs:
str_replace:
template:
'LEVEL:stderr'
params:
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtnodedevdLogLevel}
nova::compute::libvirt::virtqemud::log_outputs:
str_replace:
template:
'LEVEL:stderr'
params:
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtqemudLogLevel}
nova::compute::libvirt::virtproxyd::log_outputs:
str_replace:
template:
'LEVEL:stderr'
params:
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtproxydLogLevel}
nova::compute::libvirt::virtstoraged::log_outputs:
str_replace:
template:
'LEVEL:stderr'
params:
LEVEL:
if:
- or:
- {get_param: Debug }
- {get_param: LibvirtDebug }
- 1
- {get_param: LibvirtVirtstoragedLogLevel}
docker_config:
description: Extra containers needed for logging to stdout or a sidecar container.
value: null

View File

@ -81,6 +81,19 @@ conditions:
- {equals: [{get_param: QemuMemoryBackingDir}, '']}
- {equals: [{get_param: [RoleParameters, QemuMemoryBackingDir]}, '']}
resources:
RoleParametersValue:
type: OS::Heat::Value
properties:
type: json
value:
map_replace:
- map_replace:
- nova::compute::libvirt::qemu::memory_backing_dir: QemuMemoryBackingDir
- values: {get_param: [RoleParameters]}
- values:
QemuMemoryBackingDir: {get_param: QemuMemoryBackingDir}
outputs:
kolla_config_files:
description: Common kolla config_files.
@ -154,5 +167,5 @@ outputs:
- - str_replace:
template: "MEMORY_BACKING_DIR:MEMORY_BACKING_DIR"
params:
MEMORY_BACKING_DIR: {get_attr: [RoleParametersValue, value, memory_backing_dir]}
MEMORY_BACKING_DIR: {get_attr: [RoleParametersValue, value, 'nova::compute::libvirt::qemu::memory_backing_dir']}

View File

@ -237,31 +237,31 @@ parameters:
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'
default: '1:qemu 1:libvirt 4:object 4:json 4:event 1:util'
LibvirtVirtnodedevdLogFilters:
description: Defines a filter in virtnodedevd 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'
default: '1:qemu 1:libvirt 4:object 4:json 4:event 1:util'
LibvirtVirtstoragedLogFilters:
description: Defines a filter in virtstoraged 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'
default: '1:qemu 1:libvirt 4:object 4:json 4:event 1:util'
LibvirtVirtqemudLogFilters:
description: Defines a filter in virtqemud 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'
default: '1:qemu 1:libvirt 4:object 4:json 4:event 1:util'
LibvirtVirtproxydLogFilters:
description: Defines a filter in virtproxyd 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'
default: '1:qemu 1:libvirt 4:object 4:json 4:event 1:util'
LibvirtTLSPriority:
description: >
Override the compile time default TLS priority string.
@ -369,8 +369,8 @@ resources:
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
VirtCommon:
type: ./nova-virt-common.yaml
NovaLibvirtCommon:
type: ./nova-libvirt-common.yaml
outputs:
role_data:
@ -448,7 +448,6 @@ outputs:
nova::compute::libvirt::services::modular_libvirt: true
nova::compute::libvirt::modular_libvirt: true
nova::migration::libvirt::modular_libvirt: true
nova::params::modular_libvirt: true
- if:
- use_tls_for_live_migration
- tripleo::profile::base::nova::migration::client::libvirt_tls: true
@ -494,28 +493,28 @@ outputs:
- {get_param: NovaEnableVirtlogdContainerWrapper}
- /usr/local/bin/virtlogd_wrapper
- /usr/sbin/virtlogd --config /etc/libvirt/virtlogd.conf
config_files: {get_attr: [VirtCommon, kolla_config_files]}
permissions: {get_attr: [VirtCommon, kolla_permissions]}
config_files: {get_attr: [NovaLibvirtCommon, kolla_config_files]}
permissions: {get_attr: [NovaLibvirtCommon, kolla_permissions]}
/var/lib/kolla/config_files/nova_virtsecretd.json:
command: /usr/sbin/virtsecretd --config /etc/libvirt/virtsecretd.conf
config_files: {get_attr: [VirtCommon, kolla_config_files]}
permissions: {get_attr: [VirtCommon, kolla_permissions]}
config_files: {get_attr: [NovaLibvirtCommon, kolla_config_files]}
permissions: {get_attr: [NovaLibvirtCommon, kolla_permissions]}
/var/lib/kolla/config_files/nova_virtnodedevd.json:
command: /usr/sbin/virtnodedevd --config /etc/libvirt/virtnodedevd.conf
config_files: {get_attr: [VirtCommon, kolla_config_files]}
permissions: {get_attr: [VirtCommon, kolla_permissions]}
config_files: {get_attr: [NovaLibvirtCommon, kolla_config_files]}
permissions: {get_attr: [NovaLibvirtCommon, kolla_permissions]}
/var/lib/kolla/config_files/nova_virtstoraged.json:
command: /usr/sbin/virtstoraged --config /etc/libvirt/virtstoraged.conf
config_files: {get_attr: [VirtCommon, kolla_config_files]}
permissions: {get_attr: [VirtCommon, kolla_permissions]}
config_files: {get_attr: [NovaLibvirtCommon, kolla_config_files]}
permissions: {get_attr: [NovaLibvirtCommon, kolla_permissions]}
/var/lib/kolla/config_files/nova_virtqemud.json:
command: /usr/sbin/virtqemud --config /etc/libvirt/virtqemud.conf
config_files: {get_attr: [VirtCommon, kolla_config_files]}
permissions: {get_attr: [VirtCommon, kolla_permissions]}
config_files: {get_attr: [NovaLibvirtCommon, kolla_config_files]}
permissions: {get_attr: [NovaLibvirtCommon, kolla_permissions]}
/var/lib/kolla/config_files/nova_virtproxyd.json:
command: /usr/sbin/virtproxyd --config /etc/libvirt/virtproxyd.conf
config_files: {get_attr: [VirtCommon, kolla_config_files]}
permissions: {get_attr: [VirtCommon, kolla_permissions]}
config_files: {get_attr: [NovaLibvirtCommon, kolla_config_files]}
permissions: {get_attr: [NovaLibvirtCommon, kolla_permissions]}
container_config_scripts:
nova_libvirt_init_secret.sh:
mode: "0755"
@ -563,7 +562,7 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
- {get_attr: [NovaLibvirtLogging, volumes]}
- {get_attr: [VirtCommon, volumes]}
- {get_attr: [NovaLibvirtCommon, volumes]}
- - /var/lib/kolla/config_files/nova_virtlogd.json:/var/lib/kolla/config_files/config.json:ro
- if:
- {get_param: NovaEnableVirtlogdContainerWrapper}
@ -593,7 +592,7 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
- {get_attr: [NovaLibvirtLogging, volumes]}
- {get_attr: [VirtCommon, volumes]}
- {get_attr: [NovaLibvirtCommon, volumes]}
- {get_attr: [RoleParametersValue, value, nova_libvirt_opt_volumes]}
- - /var/lib/kolla/config_files/nova_virtsecretd.json:/var/lib/kolla/config_files/config.json:ro
- nova_virtnodedevd:
@ -618,7 +617,7 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
- {get_attr: [NovaLibvirtLogging, volumes]}
- {get_attr: [VirtCommon, volumes]}
- {get_attr: [NovaLibvirtCommon, volumes]}
- {get_attr: [RoleParametersValue, value, nova_libvirt_opt_volumes]}
- - /var/lib/kolla/config_files/nova_virtnodedevd.json:/var/lib/kolla/config_files/config.json:ro
- nova_virtstoraged:
@ -643,7 +642,7 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
- {get_attr: [NovaLibvirtLogging, volumes]}
- {get_attr: [VirtCommon, volumes]}
- {get_attr: [NovaLibvirtCommon, volumes]}
- {get_attr: [RoleParametersValue, value, nova_libvirt_opt_volumes]}
- - /var/lib/kolla/config_files/nova_virtstoraged.json:/var/lib/kolla/config_files/config.json:ro
- nova_virtqemud:
@ -668,7 +667,7 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
- {get_attr: [NovaLibvirtLogging, volumes]}
- {get_attr: [VirtCommon, volumes]}
- {get_attr: [NovaLibvirtCommon, volumes]}
- {get_attr: [RoleParametersValue, value, nova_libvirt_opt_volumes]}
- - /var/lib/kolla/config_files/nova_virtqemud.json:/var/lib/kolla/config_files/config.json:ro
- nova_virtproxyd:
@ -693,7 +692,7 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
- {get_attr: [NovaLibvirtLogging, volumes]}
- {get_attr: [VirtCommon, volumes]}
- {get_attr: [NovaLibvirtCommon, volumes]}
- {get_attr: [RoleParametersValue, value, nova_libvirt_opt_volumes]}
- - /var/lib/kolla/config_files/nova_virtproxyd.json:/var/lib/kolla/config_files/config.json:ro
step_4: