From nobody Wed Dec 17 08:55:21 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1744276982; cv=none; d=zohomail.com; s=zohoarc; b=N4vQkdB1OkWZpWow+TNHMUVVtnfcP3xRTYNCasADQ6pzb1EkSfhhzx/dMslxmDM8KBuPWHIXqYmZg38X2ipYpHWzC8QRBQv+iQZ7wLVUN1B5/tL1xPFQTfimNYU+CR9nozF1TOnkOmojHz5je/s0PMoRU3gH9eunW8PLAeLzXYI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744276982; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=8VgChVcRjlX91gR0PWF47GRIhek2Jm2F2VAQ3TZz/5c=; b=AzuQLDrYP06j06VNJ8rVFIo44UrWES/Wp3dhPfTCN4DbexEqZuLltfjETiVYPmeB6YzZEEtw0w7Ua/9lcXsA5gVFUpJ18Fgoh9mZjDKYwI97IQWXBpdPr66h7g8kZdi1hcdGTaF57i1mWdHSY+O0dbIDXhdxzj1YXRzLDje42Gw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174427698252023.7266379176383; Thu, 10 Apr 2025 02:23:02 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id EF0C11504; Thu, 10 Apr 2025 05:23:01 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id BDD4F1710; Thu, 10 Apr 2025 05:22:15 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E938B1402; Thu, 10 Apr 2025 05:22:07 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 8D915135A for ; Thu, 10 Apr 2025 05:22:07 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-uxnm388zO7Sz8ub2Np7i7g-1; Thu, 10 Apr 2025 05:22:05 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2B1A4180899B for ; Thu, 10 Apr 2025 09:22:05 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 86E7A1828A95 for ; Thu, 10 Apr 2025 09:22:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1744276927; h=from:from: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; bh=vxwVYb7pQPKoQaNa+xRFJikLHz+B8+gBvZuPPrYFd6E=; b=a56BhglHw3Epxzfof5L0PkRBjUdaE36yA+hRfbHhgxHGRKaN6VQAeVenXLBJGTm3qZN+v5 A3SZ/Irc0F6ZYObp+G0AYCo7wy+KkE+lxGzdiKXqOeYrPCQdK0OOgGqI50ALC1XH6dHHNn Zoj3cOsbPX/d4qR5cfa3DQDicSdDFd8= X-MC-Unique: uxnm388zO7Sz8ub2Np7i7g-1 X-Mimecast-MFC-AGG-ID: uxnm388zO7Sz8ub2Np7i7g_1744276925 To: devel@lists.libvirt.org Subject: [PATCH 2/2] network: Suppress reporting an error when D-Bus is unavailable in networkStateInitialize() Date: Thu, 10 Apr 2025 11:22:00 +0200 Message-ID: <75ad4e3a7b4ff9c3b23a1f752fb4843d2426a899.1744276808.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: c3XYrcrbfE8MJaNtHgUDntPa_pKEcLuGjyLT3BEd-Sw_1744276925 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4MGLXTWE6DWBHSCTBYUI4U5VETHQZ65R X-Message-ID-Hash: 4MGLXTWE6DWBHSCTBYUI4U5VETHQZ65R X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1744276982815019000 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik When the network driver initializes itself, it tries to subscribe to signals from Firewalld sent over system D-Bus. Well, the code is written in best effort mode, i.e. lack of D-Bus is not considered an error. Problem is, virGDBusGetSystemBus() which is used to obtain system D-Bus prints out an error in case of lacking system D-Bus. This pollutes the logs (which may mislead users) and goes against the best-effort nature of aforementioned code. Check for the system D-Bus presence via virGDBusHasSystemBus() first. Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 2cad1c8cbe..34b655e816 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -710,7 +710,8 @@ networkStateInitialize(bool privileged, network_driver->networkEventState =3D virObjectEventStateNew(); =20 #ifdef WITH_FIREWALLD - if (!(sysbus =3D virGDBusGetSystemBus())) { + if (!virGDBusHasSystemBus() || + !(sysbus =3D virGDBusGetSystemBus())) { VIR_WARN("DBus not available, disabling firewalld support " "in bridge_network_driver: %s", virGetLastErrorMessage()); } else { --=20 2.49.0