From nobody Fri Apr 26 04:37:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1555084586; cv=none; d=zoho.com; s=zohoarc; b=Isyywc24NkQmuVxMcDMI9hfeeJ0/NJgZtwwM3hwI55VrkDn8nA1V7dF+xgl2dYCYMWU9l/e6kd/ouIndHjaAPiytlL1n2w0breIb4ONa/6uqZcDiWe0qkcwM6KzyIUAWTlTKSO74gqDRRtOMNHMXDDFMwe5bV0R3iOwev+HKF0E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555084586; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=jjYBy3kxvOqMJHYkotwk01Txp+s5VXc7NPqA+Fw6CYk=; b=LA1l4OWy8/+TofeROveF4YPS+6kaLkxKhhfwlXp7yzDBUiYHI5IaZ3TeGnLRDt6XKRlAc1b88WWV3pWlXr+u96t5ZzLGMjkcIWMHo22a0rb4YNrDPKfN6npzs7n6bS59qnLzoZLpcLpZ1xP04CyratckecHU4mR2q56IZVj4t50= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555084586711722.1626774785176; Fri, 12 Apr 2019 08:56:26 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 18FFC9D41C; Fri, 12 Apr 2019 15:56:24 +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 F3547608BB; Fri, 12 Apr 2019 15:56:22 +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 68212181AC45; Fri, 12 Apr 2019 15:56:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3CFuJ4X002362 for ; Fri, 12 Apr 2019 11:56:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 51BB05D9CC; Fri, 12 Apr 2019 15:56:19 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-27.ams2.redhat.com [10.36.112.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A5B05D9C5; Fri, 12 Apr 2019 15:56:15 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Fri, 12 Apr 2019 16:56:13 +0100 Message-Id: <20190412155613.5555-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] network: clear cached error if we successfully create firewall chains 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 12 Apr 2019 15:56:24 +0000 (UTC) Since: commit 9f4e35dc73ec9e940aa61bc7c140c2b800218ef3 Author: Daniel P. Berrang=C3=A9 Date: Mon Mar 18 17:31:21 2019 +0000 network: improve error report when firewall chain creation fails We cache an error when failing to create the top level firewall chains. This commit failed to account for fact that we may invoke networkPreReloadFirewallRules() many times while libvirtd is running. For example when firewalld is restarted. When this happens the original failure may no longer occurr and we'll successfully create our top level chains. We failed to clear the cached error resulting in us failing to start virtual networks. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Laine Stump --- src/network/bridge_driver_linux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_= linux.c index 50fc197134..f2827543ca 100644 --- a/src/network/bridge_driver_linux.c +++ b/src/network/bridge_driver_linux.c @@ -55,6 +55,9 @@ void networkPreReloadFirewallRules(bool startup) if (rc < 0) { errInitV4 =3D virSaveLastError(); virResetLastError(); + } else { + virFreeError(errInitV4); + errInitV4 =3D NULL; } if (rc) created =3D true; @@ -63,6 +66,9 @@ void networkPreReloadFirewallRules(bool startup) if (rc < 0) { errInitV6 =3D virSaveLastError(); virResetLastError(); + } else { + virFreeError(errInitV6); + errInitV6 =3D NULL; } if (rc) created =3D true; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list