From nobody Mon May 6 17:09:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642434189; cv=none; d=zohomail.com; s=zohoarc; b=a4Lz145H7JMFOXoPekQJyzkK7pyPoq0Z2ogSuKdH0Nuj5O7mT5scwRKlfbV3vd+QOTpSdvNRPL6wb24Wb+bejBnuei3hUmKUcFnQOkLdxgU9KyEEMBOYZ2XAdPmJ/I+/Nd4YewF+vLiK+VvNyVblj1vZf6oDmBgdwzg/q5b/v8k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434189; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jS63p8xbuODgz8UbJHr2GiVXWMxeGSdD0uBYCRVn0Ns=; b=izynOf8+j6nEOmj1YpZ9H+LIuwJciumNABRn4FKML7no9eVwnKpoVXl2Q7peqkGol26ZSM8aHj729XXzu3Qn2K0mPI+RwAY3SjTQllHBzuPODUj/ZjE35WH43zS/vC4nVjgBW/dc14qR8FR7tvFRKCYt+vfT5GiwXnY3IMV6JBs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1642434189762294.4775753845224; Mon, 17 Jan 2022 07:43:09 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-634-qBJILvfFPMysS4l40sopUQ-1; Mon, 17 Jan 2022 10:42:44 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A4F3A100C62F; Mon, 17 Jan 2022 15:41:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8718A10A48AC; Mon, 17 Jan 2022 15:41:10 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 52FD11806D2C; Mon, 17 Jan 2022 15:41:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFdTG4000470 for ; Mon, 17 Jan 2022 10:39:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6466C5B920; Mon, 17 Jan 2022 15:39:29 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id BBDC45444C for ; Mon, 17 Jan 2022 15:39:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434188; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jS63p8xbuODgz8UbJHr2GiVXWMxeGSdD0uBYCRVn0Ns=; b=Xgbm+7bHADuqNXfNKMyOJTwbGA4JdePLCoP/NiMOWvBOnsuTgZEzUcHmoKuOeUnmzNl4FD HO/J3MYEe8VTQaQ98uV4E7L0iu8JKMfwiyM911rPrbNhNLWfCIbrEZS+hPkjJ3133Iln6p IGJHDtwnlovzWcwSD0+qZhZoJaj5npM= X-MC-Unique: qBJILvfFPMysS4l40sopUQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/8] docs: daemons: Add section on figuring out whether modular or monolithic daemon is in use Date: Mon, 17 Jan 2022 16:39:09 +0100 Message-Id: <90c6e52ea12b237a5245576c1dcd1953b7c40204.1642433476.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642434191507100001 Content-Type: text/plain; charset="utf-8" Since we are at a transition period where some users may be running monolithic libvirtd and others already the modular topology we need a section that allows users to figure out which is in use. This will be particularly important in the document about enabling logging, as the active log file depends on which daemon is in use. Signed-off-by: Peter Krempa --- docs/daemons.rst | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/docs/daemons.rst b/docs/daemons.rst index c8ae3b0cef..1446c1f92c 100644 --- a/docs/daemons.rst +++ b/docs/daemons.rst @@ -435,6 +435,53 @@ host first. $ systemctl enable virtproxyd-tls.socket $ systemctl start virtproxyd-tls.socket +Checking whether modular/monolithic mode is in use +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D + +To determine whether modular or monolithic mode is in use on a host running +``systemd`` as the init system you can take the following steps: + +#. Check whether the modular daemon infrastructure is in use + + First check whether the modular daemon you are interested in is running: + + #. Check ``.socket`` for socket activated services + + :: + + # systemctl is-active virtqemud.socket + active + + #. Check ``.service`` for always-running daemons + + :: + + # systemctl is-active virtqemud.service + active + + If either of the above is ``active`` your system is using the modular d= aemons. + +#. Check whether the monolithic daemon is in use + + #. Check ``libvirtd.socket`` + + :: + + # systemctl is-active libvirtd.socket + active + + #. Check ``libvirtd.service`` for always-running daemon + + :: + + # systemctl is-active libvirtd.service + active + + If either of the above is ``active`` your system is using the monolithic + daemon. + +#. To determine which of the above will be in use on the next boot of the = system, + substitute ``is-enabled`` for ``is-active`` in the above examples. Proxy daemon =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.34.1 From nobody Mon May 6 17:09:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642434058; cv=none; d=zohomail.com; s=zohoarc; b=UIctmaKMBSnd7gPvWu5/T6Dol4rUdAqsMKmxN3D/hG1aHS5aWKu1DdAkhFnqpky3tX95Fnw4YJU2O1D35xAaQq1q60nIatGp5pLKS6upx/ep56ULVh7WZCXu3kIMw/OAWvE14s4NojWzJG6xDK2KnbwhXC9R0HjC+1NtrsSu2gw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434058; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Pwg/vuyA74IRFpytlr0xkcPxx8TE0htWl+KhwHlP+N0=; b=l1GzMypyJs7Imbn1LnJdIu16lKXoge8g4sxsEuVM5S0/8XRgVa1Zmd27/p3Tkzn3BoI5SHllgVyv3vT2Ia9HT6FQjJLc2NkynejjB68ejyZyj6Q/UMLAK9pMdEbh6bLvOQwX7kEw070b3x18mVHHJg3iLqfhJJmgQUW/fb/79sg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642434058554227.910517967058; Mon, 17 Jan 2022 07:40:58 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-567-ZM978xOvMP-B8kroPdkpZQ-1; Mon, 17 Jan 2022 10:40:42 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 45DC3835BD1; Mon, 17 Jan 2022 15:39:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 27530798DB; Mon, 17 Jan 2022 15:39:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E70AB1806D1D; Mon, 17 Jan 2022 15:39:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFdUjo000478 for ; Mon, 17 Jan 2022 10:39:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id 76F355B920; Mon, 17 Jan 2022 15:39:30 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFB945444C for ; Mon, 17 Jan 2022 15:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434057; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Pwg/vuyA74IRFpytlr0xkcPxx8TE0htWl+KhwHlP+N0=; b=AXhfd6IgLCDeLSqturmpQzr+yVJlmshVe9Zct3xCYpi79/Fe75AADVwiz0DhpQsbh7VGD2 Gw46IpvVqi/2hrbji835LZ+MvFR976PXPso0fp0/zHrSEpDVpu2Ckb/uDaq0o+gA3QS7/e T0oBSLfQkpwBayCu0hHxo3onkJ0YhUw= X-MC-Unique: ZM978xOvMP-B8kroPdkpZQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/8] kbase: debuglogs: Use common heading hierarchy Date: Mon, 17 Jan 2022 16:39:10 +0100 Message-Id: <27159d0ac5790b2c116dd4c75d6b014f1712f7ed.1642433476.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642434060870100001 Content-Type: text/plain; charset="utf-8" Use the heading hierarchy as generated by pandoc which we use in most of the converted XML format docs. Signed-off-by: Peter Krempa --- docs/kbase/debuglogs.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index 3fb06bedc3..967ec10f4a 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -5,7 +5,7 @@ Debug Logs .. contents:: Turning on debug logs ---------------------- +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D If you `report a bug `__ against libvirt, in most cases you will be asked to attach debug logs. The= se @@ -18,10 +18,10 @@ well. How to turn on debug logs for libvirt -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------------- Persistent setting -^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~ The daemon configuration files location is dependent on `connection URI `__. For ``qemu:///system``: @@ -71,7 +71,7 @@ However, when you are using the session mode ``qemu:///se= ssion`` or you run the ``$XDG_CONFIG_HOME/libvirt/libvirtd.conf``. Runtime setting -^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~ Debugging anomalies can be very painful, especially when trying to reprodu= ce it after the daemon restarts, since the new session can make the anomaly @@ -112,7 +112,7 @@ once you're finished debugging, just remember to save t= he original sets of filters and outputs and restore them at the end the same way as described = above. Removing filters and outputs -'''''''''''''''''''''''''''' +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It's also possible to remove all the filters and produce an enormous log f= ile, but it is not recommended since some of libvirt's modules can produce a la= rge @@ -136,7 +136,7 @@ setting which depends on the host configuration, *journ= ald* in our case: Logging outputs: 2:journald What to attach? ---------------- +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Now you should go and reproduce the bug. Once you're finished, attach: @@ -156,7 +156,7 @@ Now you should go and reproduce the bug. Once you're fi= nished, attach: required. Example filter settings ------------------------ +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Some filter setting suggestions for debugging more specific things. Unless= it's explicitly stated, these work on libvirt 4.4.0 and later. Please note that= some @@ -164,7 +164,7 @@ of the filters below may not log enough information for= filing a proper libvirt bug. Usually it's better to log more than less. Targeted logging for debugging QEMU VMs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--------------------------------------- Specifying only some sections allows for a targeted filter configuration w= hich works on all versions and is sufficient for most cases. @@ -174,7 +174,7 @@ works on all versions and is sufficient for most cases. 1:libvirt 1:qemu 1:conf 1:security 3:event 3:json 3:file 3:object 1:ut= il Less verbose logging for QEMU VMs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--------------------------------- Some subsystems are very noisy and usually not the culprit of the problems= . They can be silenced individually for a less verbose log while still logging @@ -186,7 +186,7 @@ A permissive filter is good for development use cases. 3:remote 4:event 3:util.json 3:util.object 3:util.dbus 3:util.netlink = 3:node_device 3:rpc 3:access 1:* Minimalistic QEMU QMP monitor logging -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------------- This filter logs only QMP traffic and skips most of libvirt's messages. --=20 2.34.1 From nobody Mon May 6 17:09:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642434052; cv=none; d=zohomail.com; s=zohoarc; b=l7hEhj6F1E5iLpSOWt3ZSBemmx4duGSPcdlHn+nzjk//EdbDPuEybliFUrjGyzLLYY6tT5/RZUWMTfa2f+gE36/aHBb3KDJZdoJNez0rBr6hhVj/sV6LAq8Dj8Tq47pKf8p0UffrkL6Pb0UdrwaSQH7Q98TFOCUKdwQhE8ujD4Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434052; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=B7Hlbst64qHeX9XE/VW78CJe2ciuc5E9oPrW5M3SmjE=; b=XSQCkaQuHG1vutK8HWvJ9x/uy1b4bCd5fHM7SIvzuwwdouqmmRglSPtdFL386m9rhYd6rmgqg9ke6ry6tWhX1K360N7lnDzpGk+PMwUNnKYy1M0tMGLb9z1DG1ejCJpr9UvH0keBHxtR+BxKFnl742Qbr8mI2TkueSGEdAKTROU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1642434052608823.9455643278615; Mon, 17 Jan 2022 07:40:52 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-542-vCibIDGnMxO3atzE1c8Z3Q-1; Mon, 17 Jan 2022 10:40:31 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 43142106B3A6; Mon, 17 Jan 2022 15:39:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 243F3798C6; Mon, 17 Jan 2022 15:39:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E74844BB7C; Mon, 17 Jan 2022 15:39:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFdVgF000489 for ; Mon, 17 Jan 2022 10:39:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id B5BF75B922; Mon, 17 Jan 2022 15:39:31 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C0B85444C for ; Mon, 17 Jan 2022 15:39:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434051; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=B7Hlbst64qHeX9XE/VW78CJe2ciuc5E9oPrW5M3SmjE=; b=WgdiQBu6lnIzTcoFG38QbVnCaS85SQpeD5xAYn2m5um4Lj+MXRuycEZERyi+5XWgX44KvB PUKThnJjJgFcJy3mnj/HFP6fWRYiGaJqZq7lqMAAr4/cllV7Ir7kAVP53wbj+uzFDbMVXx YIv2uAUpAp7kmzJE/mOZFZ/5CoUGo5M= X-MC-Unique: vCibIDGnMxO3atzE1c8Z3Q-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/8] kbase: debuglogs: Un-nest section on enabling debug logs Date: Mon, 17 Jan 2022 16:39:11 +0100 Message-Id: <648c8d29d9fabeba830b95b03b62d185d80d842f.1642433476.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642434053537100001 Content-Type: text/plain; charset="utf-8" Enabling the logs is the focus of this article. Decouple it from the first section. Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- docs/kbase/debuglogs.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index 967ec10f4a..e0115bd23f 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -18,10 +18,10 @@ well. How to turn on debug logs for libvirt -------------------------------------- +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Persistent setting -~~~~~~~~~~~~~~~~~~ +------------------ The daemon configuration files location is dependent on `connection URI `__. For ``qemu:///system``: @@ -71,7 +71,7 @@ However, when you are using the session mode ``qemu:///se= ssion`` or you run the ``$XDG_CONFIG_HOME/libvirt/libvirtd.conf``. Runtime setting -~~~~~~~~~~~~~~~ +--------------- Debugging anomalies can be very painful, especially when trying to reprodu= ce it after the daemon restarts, since the new session can make the anomaly @@ -112,7 +112,7 @@ once you're finished debugging, just remember to save t= he original sets of filters and outputs and restore them at the end the same way as described = above. Removing filters and outputs -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's also possible to remove all the filters and produce an enormous log f= ile, but it is not recommended since some of libvirt's modules can produce a la= rge --=20 2.34.1 From nobody Mon May 6 17:09:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642434166; cv=none; d=zohomail.com; s=zohoarc; b=Y92A0+VomVKc6BlpKCUYyx44936Yu9ygTwCZkyZMULjGpRnTfUSt1AfVktTzheN+S265HnaqccfE04D6HMgJWQTHEnFUr2CtQnoTLo1JKpQTGSD2i2+mUYXbfPBmuir5qSQIyAOy4DcCvFesomMvDp/uGPi7pDaZFK2TyNzjpKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434166; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0zsTXYfnr0SzBr8eTwNSXyzAS/Gn5/P4Sx1UnPtDuJA=; b=gz26fe0cOS3mO/8fK5tcWWRwV7h+KYTfwGzpgj4GEdi6yQCMKlaVNdt9BmYb2fs6m7dUoZTC9P8NqFvX70QWnxBL1+eBjFXsTD/3NklsCQEIvFDmTOB1TwDHsQNi0MhAveZ7Fgys60cSKf8Dn2dfNfJx4zfHNxx52Z+7+DUW1/U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1642434166385422.4076752639869; Mon, 17 Jan 2022 07:42:46 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-154-wbl46dt_PH2_9NxaXJ-FLg-1; Mon, 17 Jan 2022 10:42:36 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9AFEC10151EC; Mon, 17 Jan 2022 15:41:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79DC5798CA; Mon, 17 Jan 2022 15:41:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 431F31806D2C; Mon, 17 Jan 2022 15:41:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFdWY7000494 for ; Mon, 17 Jan 2022 10:39:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id BC4515B920; Mon, 17 Jan 2022 15:39:32 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B8875444C for ; Mon, 17 Jan 2022 15:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434165; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0zsTXYfnr0SzBr8eTwNSXyzAS/Gn5/P4Sx1UnPtDuJA=; b=AgjwnnkMIdmIzpSxeBU+JiZQkNSQl2/ob/L5wIldnPnaDCo7uS90iNC445UFX3lU7auxZi pnNR765RqvinD8K4WSs8lwrjRgBtov+liWHAdnyHLJtRRkXa8PuDrCe2SlJoKOvXkGh+fq IsmP+8tEehNOxGpKjG082quegkoHyoE= X-MC-Unique: wbl46dt_PH2_9NxaXJ-FLg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/8] kbase: debuglogs: Section off the settings for legacy libvirt Date: Mon, 17 Jan 2022 16:39:12 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642434167559100001 Content-Type: text/plain; charset="utf-8" Move out the settings required to pre libvirt-4.4.0 deployments into a separate section so that the main point is not cluttered by now mostly irrelevant settings. Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- docs/kbase/debuglogs.rst | 48 +++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index e0115bd23f..cba57e020d 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -33,14 +33,6 @@ URI `__. For ``qemu:///sys= tem``: :: - # LEGACY SETTINGS PRIOR LIBVIRT 4.4.0 SEE BELOW! # - log_level =3D 1 - log_filters=3D"1:qemu 3:remote 4:event 3:util.json 3:rpc" - log_outputs=3D"1:file:/var/log/libvirt/libvirtd.log" - -:: - - # PREFERRED SETTINGS AFTER LIBVIRT 4.4.0 # log_filters=3D"3:remote 4:event 3:util.json 3:rpc 1:*" log_outputs=3D"1:file:/var/log/libvirt/libvirtd.log" @@ -51,12 +43,10 @@ URI `__. For ``qemu:///sy= stem``: systemctl restart libvirtd.service -In the config variables above, we have set logging level to 1 (debug level= ), set -some filters (to filter out noise), e.g. from rpc only warnings (=3Dlevel = 3) and -above will be reported. The logs are saved into -``/var/log/libvirt/libvirtd.log``. Since libvirt **4.4.0** log filters sup= port -shell globbing, therefore the usage of ``log_level`` is considered depreca= ted in -favour of pure usage of ``log_filters``. + +*Note:* Libvirt prior to the ``libvirt-4.4.0`` release didn't support glob= bing +patterns and thus requires more configuration. See +`Legacy (pre-4.4.0) libvirt daemon logging configuration`_. In case you want to get the client logs, you need to set this environment variable: @@ -91,12 +81,6 @@ own set of filters: :: - ## LEGACY APPROACH ENUMERATING ALL THE DESIRED MODULES ## - # virt-admin daemon-log-filters "1:util 1:libvirt 1:storage 1:network 1= :nodedev 1:qemu" - -:: - - ## CURRENT APPROACH USING SHELL GLOBBING ## # virt-admin daemon-log-filters "3:remote 4:util.json 4:rpc 1:*" Analogically, the same procedure can be performed with log outputs: @@ -193,3 +177,27 @@ This filter logs only QMP traffic and skips most of li= bvirt's messages. :: 2:qemu.qemu_monitor 3:* + + +Legacy (pre-4.4.0) libvirt daemon logging configuration +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D + +Old libvirt versions didn't support globbing (e.g. ``1:*``) to configure l= ogging +wildcarts, thus it's required to explicitly set logging level to 1 (debug = level) +via the ``log_level`` setting and then filter out the noise via targetted = log +filters. + +:: + + # LEGACY SETTINGS PRIOR LIBVIRT 4.4.0 + log_level =3D 1 + log_filters=3D"1:qemu 3:remote 4:event 3:util.json 3:rpc" + log_outputs=3D"1:file:/var/log/libvirt/libvirtd.log" + + +Or using ``virt-admin``: + +:: + + ## LEGACY APPROACH ENUMERATING ALL THE DESIRED MODULES ## + # virt-admin daemon-log-filters "1:util 1:libvirt 1:storage 1:network 1= :nodedev 1:qemu" --=20 2.34.1 From nobody Mon May 6 17:09:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642434230; cv=none; d=zohomail.com; s=zohoarc; b=PwpYovkjj7c2HWl/itT13n/gkpgHgO+LcEsxkfYP2Ze1wU1rGOvy4VLu2FlbgZhy0HiwLd5xAyDspMltmO+Pomy2WjVL+spjgZRPzT10XfYi801B8EP5fz2F9sMCtNrdcoYs4EKZW3fHpKJ4L5R8Stwigbq6iFfvjJfBKuRDtLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434230; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XElS8Tx8eY/VaPCHt3Ii9dKu/newJ3/Ai97NAIu26Qk=; b=BfGqFIgUwoZ3Q6mcu4kcNBF1eW8uqvoK0kc4g5yz13xFLLvMJbUD8N5T5iYFDeM1kzBk7+nj8usbO8Ck6XVograjMdV5TEkZ4jynREov3cV4XMAU52fPKkbEJeJOkmkNEWPzVKl2VgHKU96OVxVC5b3rx6R0UX6SqllrtSbD9QY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1642434230824266.1449149771935; Mon, 17 Jan 2022 07:43:50 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-548-9pG5nO0jPFe8NdjpTP0JXQ-1; Mon, 17 Jan 2022 10:42:55 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A9B708189CF; Mon, 17 Jan 2022 15:41:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77A652B4D2; Mon, 17 Jan 2022 15:41:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4367C4BB7C; Mon, 17 Jan 2022 15:41:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFdXKU000516 for ; Mon, 17 Jan 2022 10:39:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id C6E025B920; Mon, 17 Jan 2022 15:39:33 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 280545444C for ; Mon, 17 Jan 2022 15:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434229; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=XElS8Tx8eY/VaPCHt3Ii9dKu/newJ3/Ai97NAIu26Qk=; b=aoXCYtMjASGMWdpkh8FpJCDAoQQwQnRaGo9b3LeRQEoK/unJomV0F+g7Z4XSG3clcE+0RP nqd7XqzVxscnUOvJqnMv+vS02JX8Z4E5W9CELllvKUIN7vRDSK2i4aHwbqCSMzVuzQtcSs viLo9QPw2Dyc3G2adZuMbuH+RgTXMJk= X-MC-Unique: 9pG5nO0jPFe8NdjpTP0JXQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 5/8] kbase: debuglogs: Add a section describing log outputs and filters Date: Mon, 17 Jan 2022 16:39:13 +0100 Message-Id: <22f4867d164160a7b39c24629caa1038158a79e5.1642433476.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642434232490100001 Content-Type: text/plain; charset="utf-8" Outline what the given settings influence. Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- docs/kbase/debuglogs.rst | 67 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index cba57e020d..9ba39b9f85 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -17,6 +17,73 @@ Moreover, libvirt catches stderr of all running domains.= These can be useful as well. +Logging settings in libvirt +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D + +Log levels +---------- + +Libvirt produces log entries in 4 priority levels; higher priority level m= eaning +more severe log entries, which in turn means less of them. The log level a= re +used by `Log outputs`_ and `Log filters`_ below): + + * ``1: DEBUG`` + * ``2: INFO`` + * ``3: WARNING`` + * ``4: ERROR`` + +For debugging it's necessary to capture ``DEBUG`` level entries as the name +implies. + +Log outputs +----------- + +Log outputs describe where the log messages are being recorded. The outputs +are described by a space-separated list of tuples in the following format: + +:: + + level:output + +``level`` refers to the minimum priority level of entries recorded in the = output. + +``output`` is one of the following: + + ``file:FILENAME`` + Logging messages are appended to FILENAME. + + ``journald`` + Logging goes to the ``journald`` logging daemon. + + ``stderr`` + Logging goes to the standard error output stream of the libvirt daemon. + + ``syslog:name`` + Logging goes to syslogd. ``name`` is used to identify the entries. + +The default output on systems running ``journald`` is ``3:journald``. Note= that +``journald`` can trottle the amount of logs per process so for capturing d= ebug +logs of libvirt daemons a file output should be used in addition to the ou= tput +to the logging daemon e.g.: + +:: + + "1:file:/var/log/libvirt/libvirtd.log 3:journald" + + +Log filters +----------- + +Log filters allow to avoid logging of messages which are not relevant to t= he +cause. The log filters is a space-separated list of tuples in the format +``level:identifer`` and limits messages which match ``identifier`` to the +configured log level. Identifier supports globbing patterns such as ``*``. + +As ``identifier`` is based on internal naming of modules, the best approac= h is +to select one of `Example filter settings`_. It's also always better to ha= ve +more information than lack something important. + + How to turn on debug logs for libvirt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.34.1 From nobody Mon May 6 17:09:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642434120; cv=none; d=zohomail.com; s=zohoarc; b=IFrGbdIZOs4E7KGG8ehF6YwFiKj36hdhLmwI9kf12cTVmgfNld+SVegFaDorI99aTgSNDrpNUSeWZ2QmlOPJhAtU6kLi1jSTMjsQBJBg2j7s7quwu0+02nNxOpqV4uDYH3NfcbY0Sz7X3mqner6fgMC4JvfoDt3298+bW2TMriw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434120; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=46ZvTEWoOofenF6+Cq8Ye6pq3lCQzc+DloWrafvhzVk=; b=QRuSy0kPhczno8wDXr/w0rs7oYDAc85WZONAqX/Ag65lBdG+amsXPkEQNMykH7LNCxOA7jt1bdT7ShR9MO0H2bKlDJ5y5s2cYfiMY1BpNkg56YWFrcZlkhZahTA/LVd35Ek8NglEcj7h5MBBICZDc45k5KckHeJFU5QUZU4qn40= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642434120892127.1028297602495; Mon, 17 Jan 2022 07:42:00 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-150-BZKMJ58nNceSn_doKH-vDA-1; Mon, 17 Jan 2022 10:40:28 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E9F0100DFC1; Mon, 17 Jan 2022 15:39:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C1BD7E91A; Mon, 17 Jan 2022 15:39:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DE5A41806D1C; Mon, 17 Jan 2022 15:39:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFdYST000528 for ; Mon, 17 Jan 2022 10:39:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id D19C95B920; Mon, 17 Jan 2022 15:39:34 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D6D05444C for ; Mon, 17 Jan 2022 15:39:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434119; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=46ZvTEWoOofenF6+Cq8Ye6pq3lCQzc+DloWrafvhzVk=; b=hwRhvhNvePiQ6IhZDXGbgormJTZwzg6VwkN5LQKReCpISEx4a8c1NzPQ2aSI1tB+Seiah0 cul41+t9TourxUG2sqn/7XmngXVUmm0joRPt797Zn6Fs9v6AowneNKQxNcqCUuI2GceEUq I8ORKmDKz7DMP2rkjYgGUA95smk5wMk= X-MC-Unique: BZKMJ58nNceSn_doKH-vDA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 6/8] kbase: debuglogs: Extract client library logging setup Date: Mon, 17 Jan 2022 16:39:14 +0100 Message-Id: <43aa0447917effc21bd6c503ee310c8a2ae78c58.1642433476.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642434121372100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- docs/kbase/debuglogs.rst | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index 9ba39b9f85..f353cf7de5 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -84,7 +84,7 @@ to select one of `Example filter settings`_. It's also al= ways better to have more information than lack something important. -How to turn on debug logs for libvirt +Libvirt daemons logging configuration =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Persistent setting @@ -115,14 +115,6 @@ URI `__. For ``qemu:///s= ystem``: patterns and thus requires more configuration. See `Legacy (pre-4.4.0) libvirt daemon logging configuration`_. -In case you want to get the client logs, you need to set this environment -variable: - -:: - - export LIBVIRT_LOG_OUTPUTS=3D"1:file:/tmp/libvirt_client.log" - - However, when you are using the session mode ``qemu:///session`` or you ru= n the ``libvirtd`` as unprivileged user you will find configuration file under ``$XDG_CONFIG_HOME/libvirt/libvirtd.conf``. @@ -186,6 +178,23 @@ setting which depends on the host configuration, *jour= nald* in our case: # virt-admin daemon-log-outputs "" Logging outputs: 2:journald + +Client library logging +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +By default the client library doesn't produce any logs and usually it's not +needed as in most scenarios the client library doesn't do anything interes= ting. + +In case you want to get the client logs, logging is controlled via +environment variables ``LIBVIRT_LOG_OUTPUTS`` and ``LIBVIRT_LOG_FILTERS``. +Generally when client logs are needed don't filter them: + +:: + + export LIBVIRT_LOG_OUTPUTS=3D"1:file:/tmp/libvirt_client.log" + + + What to attach? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.34.1 From nobody Mon May 6 17:09:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642434960; cv=none; d=zohomail.com; s=zohoarc; b=OXN4EyljOfeOXT+PRO9lZxdhhrpV9kdXiq5snuWflYYu1OvBh5AA1aBa0PzBIRqtq3heHpdytNtz8ERkM/t1lG/+M++4FmTSOB9ddHREDRmtuV8hfxmPDpr8t/f6VeSmgwT0ScnZz8tDsCngQ/L8nW/OYTqgKBc3dw/MEcuIIyc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434960; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cmvN1vJq3xdeN0BYRFjnYeeZ7V15I2XoRMPR/OqejHo=; b=jx8RF8T6ddRX6VKXQQ3dgXThkcsBJo9cXOksxGJKS0+hG6AuuvlqOEvW0ukBJyk8rCaG0K5uTZw1/GvmtDiYJOwW6Iharht4KiVl/MPqfi20Ucx2r+uhvMRdblGPxpbHikj/DuaniXOKCIBAE0+jdmYH5m/cBxozn4oHQW0DYfA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642434960117212.97485355686422; Mon, 17 Jan 2022 07:56:00 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-317-x1_tsa--PYq1f5dJ-jodnA-1; Mon, 17 Jan 2022 10:40:17 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75AE1802936; Mon, 17 Jan 2022 15:39:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 56BD47E91D; Mon, 17 Jan 2022 15:39:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 26DF04A7CA; Mon, 17 Jan 2022 15:39:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFdZiR000537 for ; Mon, 17 Jan 2022 10:39:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id E46315B92B; Mon, 17 Jan 2022 15:39:35 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 426FA5B931 for ; Mon, 17 Jan 2022 15:39:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434959; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=cmvN1vJq3xdeN0BYRFjnYeeZ7V15I2XoRMPR/OqejHo=; b=exIibGU6u1PnNYL9HhwNDWIzXvIeXAFwWFNc5EcFVS4D9jXE7MvGUc5oDrpnWrvqbAGvxD MUyVhgunzPGCl5A2CHp7pU7CqFpxWERg8VCjsE/4nPo3+AkxZ7JWvfA25bj2PWXyhoybZQ pxz9ifRJDuUVDZC5e5CtiB9XgSmYnf4= X-MC-Unique: x1_tsa--PYq1f5dJ-jodnA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 7/8] kbase: debuglogs: Emphasise 'virt-admin' Date: Mon, 17 Jan 2022 16:39:15 +0100 Message-Id: <85c5529ddc5c7c467cd4de1304564b6b115f2148.1642433476.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642434962325100001 Content-Type: text/plain; charset="utf-8" It's a tool name so use backticks to format it in monospace. Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- docs/kbase/debuglogs.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index f353cf7de5..fc75ef14a4 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -125,10 +125,11 @@ Runtime setting Debugging anomalies can be very painful, especially when trying to reprodu= ce it after the daemon restarts, since the new session can make the anomaly "disappear". Therefore, it's possible to enable the debug logs during runt= ime -using libvirt administration API. To use it conveniently, there's a virt-a= dmin -client provided by the libvirt-admin package. Use the package manager prov= ided -by your distribution to install this package. Once you have it installed, = run -the following as root to see the set of log filters currently being active: +using libvirt administration API. To use it conveniently, there's the +``virt-admin`` client provided by the ``libvirt-admin`` package. Use the +package manager provided by your distribution to install this package. Onc= e you +have it installed, run the following as root to see the set of log filters +currently being active: :: --=20 2.34.1 From nobody Mon May 6 17:09:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642434077; cv=none; d=zohomail.com; s=zohoarc; b=O1ANev5mJRBIOpZkQFNOEZKMHijxL+Q9AeDWtrXky9Hz3hYgPIB0j6owjUyBXQtAhKBKJ4v71POwZKI0bhSFr8/Ut21wreEgBCN8wR6ReXSTWjI4nGltH2HDZB5OIj2amo6Tvp5jhVZG9wnmoJ2TnxnmLB5NcPHzlNLCQxhEzkA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434077; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZxflmELYnaUHipVn2ilsLj7slibxGgaTyblAUswiSe4=; b=D/yIA5SenP73TKdl/dSZLetCuJBDkbeVImkLFx+YT0UNzrnp8+MEH+vpvNfL13pMqHe8F3jX0ivWgrvFu82ueObvTGRKwX34tHja+BCvzu/fP2U/8khCnLv/VkPmtCSt1x4FWSn8iXpxUZWSXT68MoL774AnojdDKzMncXwW4Dg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642434077945769.7543362825401; Mon, 17 Jan 2022 07:41:17 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-287-g0lpgsWZMXSFMEGQtSPO-A-1; Mon, 17 Jan 2022 10:40:50 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C4C9310247CA; Mon, 17 Jan 2022 15:39:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A66BD7D5B4; Mon, 17 Jan 2022 15:39:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 765794A700; Mon, 17 Jan 2022 15:39:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFda46000552 for ; Mon, 17 Jan 2022 10:39:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id EF0EF5B920; Mon, 17 Jan 2022 15:39:36 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 584C15B92B for ; Mon, 17 Jan 2022 15:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434076; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ZxflmELYnaUHipVn2ilsLj7slibxGgaTyblAUswiSe4=; b=f6MsSq5R10X9muqTaghjPtC5/sVf5PCNeWp4VoeMcHizIw+ciEDaquLHt3hsWmZpXuH6Cw Qf2bOiG82fEeh4tsJWKx44Fhc3rUSCKmSZh8LtmT7UMt7U7WXXA5AaCcJ44//rwh1ph2D0 xH9/uG9ZYHxz+vxEL549zw2/5pxU7dg= X-MC-Unique: g0lpgsWZMXSFMEGQtSPO-A-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 8/8] kbase: debuglogs: Fix for modular daemons Date: Mon, 17 Jan 2022 16:39:16 +0100 Message-Id: <47948acd03c4105ddc9fd8e312556193123c67be.1642433476.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642434079115100001 Content-Type: text/plain; charset="utf-8" Modular daemons are now the default in many new installations, thus we need to include steps how to determine that modular daemons are used and modular-daemon specific locations for the config files and admin URIs. Signed-off-by: Peter Krempa --- docs/kbase/debuglogs.rst | 94 +++++++++++++++++++++++++++++++--------- 1 file changed, 73 insertions(+), 21 deletions(-) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index fc75ef14a4..ea7c2c1d52 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -87,38 +87,87 @@ more information than lack something important. Libvirt daemons logging configuration =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -Persistent setting ------------------- +Libvirt daemons can be configured either via a config file or via the +administration API. The configuration location depends on multiple factors. -The daemon configuration files location is dependent on `connection -URI `__. For ``qemu:///system``: +Session vs. system daemons +-------------------------- +The libvirt daemons run either on ``system`` level or on ``session`` (user) +level, depending on the configuration of the host and the available permis= sion +levels. +The `connection URI `__ influences which dae= mon +the client is communicating with. -- open ``/etc/libvirt/libvirtd.conf`` in your favourite editor -- find & replace, or set these variables: +``system`` daemon e.g ``qemu:///system`` URI -:: + * config files are usually placed in ``/etc/libvirt/`` - log_filters=3D"3:remote 4:event 3:util.json 3:rpc 1:*" - log_outputs=3D"1:file:/var/log/libvirt/libvirtd.log" + * ``virt-admin`` URI ending in ``/system`` should be used. -- save and exit -- restart libvirtd service +``session`` daemon e.g. ``qemu:///session`` URI -:: + * config files are usually placed in ``$XDG_CONFIG_HOME/libvirt/`` direc= tory + + * ``virt-admin`` URI ending in ``/session`` should be used + +Modular vs. monolithic daemons +------------------------------ + +While the config file name for the monolithic daemon is simple, in case wh= en +modular daemons are used, there's a lot of options. + +All libvirt daemons support the logging configuration per this document, b= ut +in most cases it's required to configure logging for the appropriate. + +Refer to `documentation about daemons <../daemons.html#checking-whether-mo= dular-monolithic-mode-is-in-use>`__ +to figure out which is in use by your system. + + Modular daemons + + The configuration of modular daemons is in file named after the daemon.= E.g. + for ``qemu:///system`` connection this is the ``virtqemud`` daemon and + correspondingly: + + * ``virtqemud.conf`` config file is used + + * ``virtqemud:///system`` or ``virtqemud:///session`` admin URI is us= ed - systemctl restart libvirtd.service + Monolithic daemon + + * ``libvirtd.conf`` config file is used + + * ``libvirtd:///system`` or ``libvirtd:///session`` admin URI is used + when the modular qemu hypervisor driver ``virtqemud`` + +Persistent setting +------------------ + +- open the appropriate daemon config file in your favourite editor :: + + /etc/libvirt/virtqemud.conf + /etc/libvirt/libvirtd.conf + $XDG_CONFIG_HOME/libvirt/libvirtd.conf + $XDG_CONFIG_HOME/libvirt/virtqemud.conf + +- find & replace, or set the apropriate `Log outputs`_ and `Log filters`_= , e.g :: + + log_filters=3D"3:remote 4:event 3:util.json 3:rpc 1:*" + log_outputs=3D"1:file:/var/log/libvirt/libvirtd.log" + +- save and exit +- restart the corresponding service/daemon e.g. :: + + systemctl restart virtqemud.socket + systemctl restart libvirtd.socket + systemctl restart libvirtd.service *Note:* Libvirt prior to the ``libvirt-4.4.0`` release didn't support glob= bing patterns and thus requires more configuration. See `Legacy (pre-4.4.0) libvirt daemon logging configuration`_. -However, when you are using the session mode ``qemu:///session`` or you ru= n the -``libvirtd`` as unprivileged user you will find configuration file under -``$XDG_CONFIG_HOME/libvirt/libvirtd.conf``. - Runtime setting --------------- @@ -127,13 +176,16 @@ after the daemon restarts, since the new session can = make the anomaly "disappear". Therefore, it's possible to enable the debug logs during runt= ime using libvirt administration API. To use it conveniently, there's the ``virt-admin`` client provided by the ``libvirt-admin`` package. Use the -package manager provided by your distribution to install this package. Onc= e you -have it installed, run the following as root to see the set of log filters -currently being active: +package manager provided by your distribution to install this package. + +**Important**: Substitute ``virt-admin -c $ADMIN_URI`` per above guidance = in +place of ``virt-admin`` in the examples below if needed. + +The following command allows to query the list of log filters currently ac= tive: :: - # virt-admin daemon-log-filters + # virt-admin daemon-log-filters Logging filters: 3:remote 4:util.json 4:rpc In order to change this set, run the same command as root, this time with = your --=20 2.34.1