Merge "Repeatedly add log_filters,log_outputs to libvirtd.conf when restart"

This commit is contained in:
Jenkins 2014-01-28 22:30:29 +00:00 committed by Gerrit Code Review
commit 2a73a2b769

View File

@ -652,8 +652,12 @@ function start_nova_compute() {
local log_filters="1:libvirt 1:qemu 1:conf 1:security 3:event 3:json 3:file 1:util"
local log_outputs="1:file:/var/log/libvirt/libvirtd.log"
# Enable server side traces for libvirtd
echo "log_filters=\"$log_filters\"" | sudo tee -a /etc/libvirt/libvirtd.conf
echo "log_outputs=\"$log_outputs\"" | sudo tee -a /etc/libvirt/libvirtd.conf
if ! grep -q "log_filters=\"$log_filters\"" /etc/libvirt/libvirtd.conf; then
echo "log_filters=\"$log_filters\"" | sudo tee -a /etc/libvirt/libvirtd.conf
fi
if ! grep -q "log_outputs=\"$log_outputs\"" /etc/libvirt/libvirtd.conf; then
echo "log_outputs=\"$log_outputs\"" | sudo tee -a /etc/libvirt/libvirtd.conf
fi
# The group **$LIBVIRT_GROUP** is added to the current user in this script.
# Use 'sg' to execute nova-compute as a member of the **$LIBVIRT_GROUP** group.