Browse code

Enable server-side and client-side logs for libvirt

Need this to diagnose libvirt Errors in the gate

Change-Id: Id46137a71d17abc8bfab66b14ab567d81a31f018
Related-Bug: #1254872

Davanum Srinivas authored on 2014/01/10 09:47:54
Showing 1 changed files
... ...
@@ -648,6 +648,14 @@ function start_nova_compute() {
648 648
     fi
649 649
 
650 650
     if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
651
+        # Enable client side traces for libvirt
652
+        export LIBVIRT_LOG_FILTERS="1:libvirt"
653
+        export LIBVIRT_LOG_OUTPUTS="1:file:/var/log/libvirt/libvirtd-nova.log"
654
+
655
+        # Enable server side traces for libvirtd
656
+        echo "log_filters=\"1:libvirt 1:qemu\"" | sudo tee -a /etc/libvirt/libvirtd.conf
657
+        echo "log_outputs=\"1:file:/var/log/libvirt/libvirtd.log\"" | sudo tee -a /etc/libvirt/libvirtd.conf
658
+
651 659
         # The group **$LIBVIRT_GROUP** is added to the current user in this script.
652 660
         # Use 'sg' to execute nova-compute as a member of the **$LIBVIRT_GROUP** group.
653 661
         screen_it n-cpu "cd $NOVA_DIR && sg $LIBVIRT_GROUP '$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf'"