From nobody Sun Feb 8 18:35:10 2026 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=1658227551; cv=none; d=zohomail.com; s=zohoarc; b=C/sQ+CDrIJdgYbWhv+OLtXYx9/1EgzPgydFcyytxG5YKEux9rzgB8hY6MlyHvwvZy72ENlHiWcm8AGWqU7/VtrscyllMLBosZMLYKsc7EeQ3p+SHwuzF1U6uTe2sXwAbfmTljUftxGzXYeYoX9eOzHUuvfTS0xqPbY2MmdBFOVY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658227551; 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=MeP0NfZX9HsyHN33NG8mOSBNtQbVgC16mIz+9ie0EsM=; b=kcvTUEtEjGGn+tfXEcFNb0uCIByIcmqCI/YUgc7dHGVmfUL5JLeZgbRNmId4X4jkP8m/d1qomzFD52s984C4VU0XLX83E2JvfZdRh8saq5kMoCIySqrhnycUqcP31Iaesh8wXAvN2KHCinJPqSt6c42WrBoeZPr83Nx0Obr1NuM= 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 1658227551625716.7675677937199; Tue, 19 Jul 2022 03:45:51 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-265-MKQTZItINyK_Zhc8Y09fqQ-1; Tue, 19 Jul 2022 06:45:46 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AE9CA1C04B57; Tue, 19 Jul 2022 10:45:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B93740E80E0; Tue, 19 Jul 2022 10:45:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 558061945DA7; Tue, 19 Jul 2022 10:45:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6DD531945DA7 for ; Tue, 19 Jul 2022 10:45:42 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5B33B492CA9; Tue, 19 Jul 2022 10:45:42 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95BF0492C3B for ; Tue, 19 Jul 2022 10:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658227550; 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=MeP0NfZX9HsyHN33NG8mOSBNtQbVgC16mIz+9ie0EsM=; b=IxFIvMLdCb5DCYd0uHwP9Eo8QI6kyblzDnbdlRwp2NkKDxfrfqQwPTzHDLEIu7W/b0LyFz oP9wFrR/IK3RBaHncAmMqUKexSQ4Vj0qqv/axLrrnXpQCvdsPjfP2VJp0v4OaMuXO6309L YLht0syucmh+GpU5jyDWQA9yVnVKucI= X-MC-Unique: MKQTZItINyK_Zhc8Y09fqQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/7] virLXCProcessAutostartAll: Remove unused 'conn' Date: Tue, 19 Jul 2022 12:45:26 +0200 Message-Id: <66594ff4e7a11ccd55450778fc5a6784d3a8c66e.1658227484.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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: 1658227553721100003 Content-Type: text/plain; charset="utf-8" The connection object is not needed when autostarting containers so we can remove the machinery for it. Signed-off-by: Peter Krempa --- src/lxc/lxc_process.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 130c16aa04..a733f146f4 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -1540,7 +1540,6 @@ int virLXCProcessStart(virLXCDriver * driver, struct virLXCProcessAutostartData { virLXCDriver *driver; - virConnectPtr conn; }; static int @@ -1576,21 +1575,11 @@ virLXCProcessAutostartDomain(virDomainObj *vm, void virLXCProcessAutostartAll(virLXCDriver *driver) { - /* XXX: Figure out a better way todo this. The domain - * startup code needs a connection handle in order - * to lookup the bridge associated with a virtual - * network - */ - virConnectPtr conn =3D virConnectOpen("lxc:///system"); - /* Ignoring NULL conn which is mostly harmless here */ - - struct virLXCProcessAutostartData data =3D { driver, conn }; + struct virLXCProcessAutostartData data =3D { driver }; virDomainObjListForEach(driver->domains, false, virLXCProcessAutostartDomain, &data); - - virObjectUnref(conn); } --=20 2.36.1