From nobody Thu Jan 2 17:22:02 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1725374320902351.07144333428937; Tue, 3 Sep 2024 07:38:40 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D5DF81406; Tue, 3 Sep 2024 10:38:39 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 37198D59; Tue, 3 Sep 2024 10:36:51 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B4137BD7; Tue, 3 Sep 2024 10:36:36 -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 5E5ABD8F for ; Tue, 3 Sep 2024 10:36:36 -0400 (EDT) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-455-DZkQqUoZPKeOTW8FHm8eMg-1; Tue, 03 Sep 2024 10:36:34 -0400 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42bbf928882so36052005e9.1 for ; Tue, 03 Sep 2024 07:36:34 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3749ee9ba8esm14444244f8f.50.2024.09.03.07.36.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 07:36:32 -0700 (PDT) Received: from wheatley.brq.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 4940D1FC90BD for ; Tue, 03 Sep 2024 16:36:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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=1725374196; 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=LiKIdGH/9WcfsqQ6FJfTFxnT2T7Rb+uYqiidd399YMg=; b=HLPZNaImtj50pgA/yfMpmiSA4XSJrrhwNb98gqzy/S2rXqhWkvBDEYpIltYy8hTugbMlpd fRMdMvt/wIp83cGUksw1UkjqonWuxJMG47a+Ju0roPtub+4l75Dv4vztDlESd1akOTipxN UqAKgnZiFZVRmijabwuWGZfaF0jQAA0= X-MC-Unique: DZkQqUoZPKeOTW8FHm8eMg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725374193; x=1725978993; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LiKIdGH/9WcfsqQ6FJfTFxnT2T7Rb+uYqiidd399YMg=; b=uOQav3Rozy9+V7Cmw72iMlyk+hRRGlXrTSSl8gLKbJy7yCc41UVdRla0ZUvEjHAsvo nXOB4avlcqdB0vd/BKPeIet2WSasEq/WrjWmHqijZSylv8TS4VY2iST0v+opud6lCdWt ozSX15cwLHJZceA4DHgkQGffaV6D4hD8sZdP5aFyzfM6Cz4iiCl9dfrKi/O6ZYOFDDcG SG1hWAzANhYTm440lvde4WX0eDnzGeqlcCQoBpg+0DiHtQRDti+HK+4Gl2xwqFA0mTGM uFZePSAmNA1OW2AaNmjPtYAyd8LfDa333Bz3P2bSTFy2nwUT5rPikd4HX+1WkMnHgwcI EBqA== X-Gm-Message-State: AOJu0YxkNTMHx0g0hVxc1+8ubUhM4CZmDhevWeasm0VsYUhkrIRP2FPB XGSOpa0PPxts57yT4a0UG9j7btDGSf77i0qnvl6NqEx6b9JmZE+R6CMUPHHWHTXEvs9TTODkt/P shHrQH3KJE3lXulFw+l4Pnf/vvqdtgrMSve3/xo45Zh0cjVaaAXD6MYUJv2WT5Kdhtkqfa1vZgg mwSAuPz4ntybtamiEg6f3vekzaehVZkQ+F6LzEUTI= X-Received: by 2002:adf:f0cf:0:b0:374:b9a7:5ed6 with SMTP id ffacd0b85a97d-376dd15a94bmr846727f8f.22.1725374193497; Tue, 03 Sep 2024 07:36:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFEyUC2Bhr/BV+XxJ6+z1eqXvEQaJJ17zn1fCvtDNEg8LW66yvUNiWI31dmynjqAP7ELRF9/Q== X-Received: by 2002:adf:f0cf:0:b0:374:b9a7:5ed6 with SMTP id ffacd0b85a97d-376dd15a94bmr846694f8f.22.1725374192838; Tue, 03 Sep 2024 07:36:32 -0700 (PDT) From: Martin Kletzander To: devel@lists.libvirt.org Subject: [PATCH 5/8] network: Clean up after inactive objects during start Date: Tue, 3 Sep 2024 16:36:24 +0200 Message-ID: <9df782e91f3c8a30a2c53da7f78db572d7f4a01c.1725373964.git.mkletzan@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 5YL2XVZHVXTWENLEKVWAAP4ILQB6ABC7 X-Message-ID-Hash: 5YL2XVZHVXTWENLEKVWAAP4ILQB6ABC7 X-MailFrom: mkletzan@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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1725374322525116600 Content-Type: text/plain; charset="utf-8"; x-default="true" Once networkUpdateState() identifies a dead network it should clean up after it as well. Resolves: https://issues.redhat.com/browse/RHEL-50968 Signed-off-by: Martin Kletzander --- src/network/bridge_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index e507dcd4c5c9..ebdb39d0743b 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -510,6 +510,12 @@ networkUpdateState(virNetworkObj *obj, virNetworkObjSetDnsmasqPid(obj, dnsmasqPid); } =20 + /* Clean up after networks which were active but we have found out the= y are + * actually down */ + if (!virNetworkObjIsActive(obj)) { + networkShutdownNetwork(driver, obj); + } + return 0; } =20 --=20 2.46.0