Ensure directories managed by libvirt-daemon exist
The /var/run/libvirt directory is managed by libvirt-daemon. As
this service is now running within a container, the directory
might not exists on a fresh install.
This patch also takes care of the fact the /var/run directory is
cleaned upon reboot, and uses systemd-tmpfiles in order to ensure
the directory creation during the boot process.
We also take care of missing log directories, also managed by the
libvirt-daemon package.
Change-Id: I6f8dc49ff556215a25e8bb23ae8da63ce607d70c
Closes-Bug: #1801977
(cherry picked from commit f65664ff56
)
This commit is contained in:
parent
d1b90da077
commit
82d0b03d23
|
@ -310,7 +310,7 @@ outputs:
|
|||
- /run:/run
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup
|
||||
- /var/lib/nova:/var/lib/nova:shared
|
||||
- /var/run/libvirt:/var/run/libvirt
|
||||
- /var/run/libvirt:/var/run/libvirt:shared
|
||||
- /var/lib/libvirt:/var/lib/libvirt
|
||||
- /etc/libvirt/qemu:/etc/libvirt/qemu:ro
|
||||
- /var/log/libvirt/qemu:/var/log/libvirt/qemu
|
||||
|
@ -409,6 +409,9 @@ outputs:
|
|||
- /etc/libvirt/qemu
|
||||
- /var/lib/libvirt
|
||||
- /var/log/containers/libvirt
|
||||
- /var/run/libvirt
|
||||
- /var/log/libvirt
|
||||
- /var/log/libvirt/qemu
|
||||
# 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.
|
||||
|
@ -452,6 +455,11 @@ outputs:
|
|||
- libvirtd.service
|
||||
- virtlogd.socket
|
||||
when: libvirt_installed.rc == 0
|
||||
- name: ensure /var/run/libvirt is present upon reboot
|
||||
copy:
|
||||
dest: /etc/tmpfiles.d/var-run-libvirt.conf
|
||||
content: |
|
||||
d /var/run/libvirt 0755 root root - -
|
||||
metadata_settings:
|
||||
get_attr: [NovaLibvirtBase, role_data, metadata_settings]
|
||||
upgrade_tasks:
|
||||
|
|
Loading…
Reference in New Issue