Browse code

Merge "Enable server-side and client-side logs for libvirt"

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