Fix libvirt/qemu logs location

Fix bind-mount to point /var/log/containers/libvirt/(qemu)
on the host, via the shared NovaLibvirtLogging attribute.

Remove the nested libvirt/qemu path bind-mount since the outer libvirt
directory is sufficient to hold the qemu logs as well. For that,
bind-mount it with the shared mounts propagation mode.

Related: rhbz#2005340
Depends-On: https://review.opendev.org/811096
Change-Id: Iccbae5589aa4a4fc449f23b82755dea1f54f5678
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2021-09-21 11:24:51 +02:00
parent e33a9c9fa3
commit 56a58f88e9
2 changed files with 1 additions and 5 deletions

View File

@ -58,7 +58,7 @@ outputs:
volumes:
description: The volumes needed to log to files in the host.
value:
- /var/log/containers/libvirt:/var/log/libvirt:z
- /var/log/containers/libvirt:/var/log/libvirt:shared,z # +qemu subdir
docker_config:
description: Extra containers needed for logging to file in the host.
value: null

View File

@ -571,7 +571,6 @@ outputs:
- /run/libvirt:/run/libvirt:shared
- /var/lib/libvirt:/var/lib/libvirt
- /etc/libvirt/qemu:/etc/libvirt/qemu:ro
- /var/log/libvirt/qemu:/var/log/libvirt/qemu
- /var/lib/nova:/var/lib/nova:shared
- if:
- {get_param: NovaEnableVirtlogdContainerWrapper}
@ -623,7 +622,6 @@ outputs:
- /run/libvirt:/run/libvirt:shared
- /var/lib/libvirt:/var/lib/libvirt:shared
- /var/cache/libvirt:/var/cache/libvirt:shared
- /var/log/libvirt/qemu:/var/log/libvirt/qemu:ro
- /var/lib/vhost_sockets:/var/lib/vhost_sockets
- /var/lib/nova:/var/lib/nova:shared
- /sys/fs/selinux:/sys/fs/selinux
@ -859,8 +857,6 @@ outputs:
- { 'path': /var/cache/libvirt }
- { 'path': /var/lib/nova, 'setype': container_file_t }
- { 'path': /run/libvirt, 'setype': virt_var_run_t }
- { 'path': /var/log/libvirt, 'setype': container_file_t }
- { 'path': /var/log/libvirt/qemu, 'setype': container_file_t }
# qemu user on host will be cretaed by libvirt package install, ensure
# the qemu user created with same uid/gid as like libvirt package.
# These specific values are required since ovs is running on host.