From f69c6f16d21ce51eb5939ea6fecd99a8b28b426b Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 9 Jan 2014 19:47:54 -0500 Subject: [PATCH] Enable server-side and client-side logs for libvirt Need this to diagnose libvirt Errors in the gate Change-Id: Id46137a71d17abc8bfab66b14ab567d81a31f018 Related-Bug: #1254872 --- lib/nova | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/nova b/lib/nova index e754341bad..162212da59 100644 --- a/lib/nova +++ b/lib/nova @@ -648,6 +648,14 @@ function start_nova_compute() { fi if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then + # Enable client side traces for libvirt + export LIBVIRT_LOG_FILTERS="1:libvirt" + export LIBVIRT_LOG_OUTPUTS="1:file:/var/log/libvirt/libvirtd-nova.log" + + # Enable server side traces for libvirtd + echo "log_filters=\"1:libvirt 1:qemu\"" | sudo tee -a /etc/libvirt/libvirtd.conf + echo "log_outputs=\"1:file:/var/log/libvirt/libvirtd.log\"" | sudo tee -a /etc/libvirt/libvirtd.conf + # 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. screen_it n-cpu "cd $NOVA_DIR && sg $LIBVIRT_GROUP '$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf'"