6c2a2f536e
Modify nova-libvirt extend_start.sh for preventing docker boot fail if there is no libvirtd.log file in libvirt folder. Change-Id: If1df41fb07b90b6020a60e3f987d51f5a9792bca Closes-Bug: 1855253
25 lines
696 B
Bash
25 lines
696 B
Bash
#!/bin/bash
|
|
|
|
# TODO(SamYaple): Tweak libvirt.conf rather than change permissions.
|
|
# Fix permissions for libvirt
|
|
# Do not remove unless CentOS has been validated
|
|
if [[ -c /dev/kvm ]]; then
|
|
chmod 660 /dev/kvm
|
|
chown root:qemu /dev/kvm
|
|
fi
|
|
|
|
# Mount xenfs for libxl to work
|
|
if [[ $(lsmod | grep xenfs) ]]; then
|
|
mount -t xenfs xenfs /proc/xen
|
|
fi
|
|
|
|
if [[ ! -e "/var/log/kolla/libvirt/libvirtd.log" ]]; then
|
|
mkdir -p /var/log/kolla/libvirt
|
|
touch /var/log/kolla/libvirt/libvirtd.log
|
|
chmod 644 /var/log/kolla/libvirt/libvirtd.log
|
|
fi
|
|
if [[ $(stat -c %a /var/log/kolla/libvirt) != "755" ]]; then
|
|
chmod 755 /var/log/kolla/libvirt
|
|
chmod 644 /var/log/kolla/libvirt/libvirtd.log
|
|
fi
|