kolla/docker/nova/nova-libvirt/extend_start.sh
Xinliang Liu 14cda91c4e Revert "nova-libvirt: fix kvm permission issue"
This is not needed. If we make sure qemu use nova user.
Because nova user in group qemu.

See comment #7 of bug #1715356:
The root cause for this issue is that qemu not run with nova user on
debian.
If we set qemu running with nova user with this patch:
https://review.openstack.org/#/c/525891/
Then we need to revert commit f1b98a4925.

This reverts commit f1b98a4925.
Closes-bug: #1715356
Depends-on: I36720af0c7d3dd7c69d2404843f54c0991aea1bb

Change-Id: I62fbcf9e4ee5c3170c96576698f4ae8b66db1b74
2017-12-11 17:43:24 +08:00

25 lines
683 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 [[ ! -d "/var/log/kolla/libvirt" ]]; 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