From nobody Tue May 14 00:19:57 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=1658227555; cv=none; d=zohomail.com; s=zohoarc; b=BQbDiBvbqSNpHQbcEUPQPGKaujVd/tTiUdlu1RI7hGBvgFshoTxqfkEDaitsX/AgXNuNPvLfqrwlO1NTt47CzmLavaKCJ5Mk9JL81XpLnMLGphcROhWUwrY406GX/dkhtBqZghdB6n6Y6qFBoLKBOIMPudiLZnFBw8JImY3Wxuo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658227555; 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=Q7GgsFgdsIjRhOFKA+ir8yj6gtNGACrRXJPvRR9Th1c=; b=TD+KUgSP2u+FNrgwdDO0PJSZZnZA7zgGu7v2FzZbdAmeP8a0CUqQw66iNst2+kHwX9T9oQFYPBzTT9zl3TD6OMoVR5oRfyK0qgb/NPNjqdMvlnyLT3LI1+EVNJv+mPA3i6pcdhG1tUf+24uoyBZSTlpPFXkMkUKPGjBa3qzss+s= 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 1658227555028288.6939882485593; Tue, 19 Jul 2022 03:45:55 -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-167-VKQUY3bXN9-1WXVPk9GoKQ-1; Tue, 19 Jul 2022 06:45:42 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 19FD23C025C1; Tue, 19 Jul 2022 10:45:40 +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 02E5F140EBE3; Tue, 19 Jul 2022 10:45:40 +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 AAA5A1947070; Tue, 19 Jul 2022 10:45:39 +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 647ED1947074 for ; Tue, 19 Jul 2022 10:45:37 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 29DAE492CA5; Tue, 19 Jul 2022 10:45:37 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id B603A492C3B for ; Tue, 19 Jul 2022 10:45:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658227553; 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=Q7GgsFgdsIjRhOFKA+ir8yj6gtNGACrRXJPvRR9Th1c=; b=UhkWOWeVc1PNzEU8u9oSBzvZX8dRnGi90WHKoJX2Pzh86wILd/ftmHH8ZZKWeCtDsNH4zl DW+5LkzAmN+xNVczrkBNZEB25VsenEaA8Y1iOPbmbBvVraf2NwdeuwhASCcd0ryLU+QY0L Vrc+nI/Wawu/oqnJfpL1EeRocYltKOs= X-MC-Unique: VKQUY3bXN9-1WXVPk9GoKQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/7] virLXCProcessStop: Add 'cleanupFlags' parameter Date: Tue, 19 Jul 2022 12:45:23 +0200 Message-Id: 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.85 on 10.11.54.7 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: 1658227555727100010 Content-Type: text/plain; charset="utf-8" Add possibility for the caller to set the flags for the call to 'virLXCProcessCleanup'. Signed-off-by: Peter Krempa Reviewed-by: Tim Wiederhake --- src/lxc/lxc_driver.c | 2 +- src/lxc/lxc_process.c | 17 +++++++++-------- src/lxc/lxc_process.h | 3 ++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 0d8cdcebfd..456d2fbae9 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -1354,7 +1354,7 @@ lxcDomainDestroyFlags(virDomainPtr dom, goto endjob; priv =3D vm->privateData; - ret =3D virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_DESTROYED); + ret =3D virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_DESTROYED, 0); event =3D virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED, VIR_DOMAIN_EVENT_STOPPED_DESTROYED); diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 9dc7d9d0d8..587ba1d3c1 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -67,7 +67,7 @@ lxcProcessAutoDestroy(virDomainObj *dom, VIR_DEBUG("driver=3D%p dom=3D%s conn=3D%p", driver, dom->def->name, co= nn); VIR_DEBUG("Killing domain"); - virLXCProcessStop(driver, dom, VIR_DOMAIN_SHUTOFF_DESTROYED); + virLXCProcessStop(driver, dom, VIR_DOMAIN_SHUTOFF_DESTROYED, 0); virDomainAuditStop(dom, "destroyed"); event =3D virDomainEventLifecycleNewFromObj(dom, VIR_DOMAIN_EVENT_STOPPED, @@ -108,7 +108,7 @@ virLXCProcessReboot(virLXCDriver *driver, * So temporarily hide the newDef and then reinstate it */ savedDef =3D g_steal_pointer(&vm->newDef); - virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN); + virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN, 0); vm->newDef =3D savedDef; if (virLXCProcessStart(conn, driver, vm, 0, NULL, autodestroy, reason) < 0) { @@ -687,9 +687,9 @@ static void virLXCProcessMonitorEOFNotify(virLXCMonitor= *mon, virObjectLock(vm); priv =3D vm->privateData; - virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN); + virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN, 0); if (!priv->wantReboot) { - virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN); + virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN, 0); if (!priv->doneStopEvent) { event =3D virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED, @@ -841,7 +841,8 @@ static virLXCMonitor *virLXCProcessConnectMonitor(virLX= CDriver *driver, int virLXCProcessStop(virLXCDriver *driver, virDomainObj *vm, - virDomainShutoffReason reason) + virDomainShutoffReason reason, + unsigned int cleanupFlags) { int rc; virLXCDomainObjPrivate *priv; @@ -899,7 +900,7 @@ int virLXCProcessStop(virLXCDriver *driver, } cleanup: - virLXCProcessCleanup(driver, vm, reason, 0); + virLXCProcessCleanup(driver, vm, reason, cleanupFlags); return 0; } @@ -1535,7 +1536,7 @@ int virLXCProcessStart(virConnectPtr conn, if (rc !=3D 0) { virErrorPreserveLast(&err); if (virDomainObjIsActive(vm)) { - virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED); + virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, 0); } else { /* virLXCProcessStop() is NOP if the container is not active. * If there was a failure whilst creating it, cleanup manually= . */ @@ -1723,7 +1724,7 @@ virLXCProcessReconnectDomain(virDomainObj *vm, return ret; error: - virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED); + virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, 0); virDomainAuditStop(vm, "failed"); goto cleanup; } diff --git a/src/lxc/lxc_process.h b/src/lxc/lxc_process.h index 33ff334b74..1bce57809c 100644 --- a/src/lxc/lxc_process.h +++ b/src/lxc/lxc_process.h @@ -31,7 +31,8 @@ int virLXCProcessStart(virConnectPtr conn, virDomainRunningReason reason); int virLXCProcessStop(virLXCDriver *driver, virDomainObj *vm, - virDomainShutoffReason reason); + virDomainShutoffReason reason, + unsigned int cleanupFlags); void virLXCProcessAutoDestroyRun(virLXCDriver *driver, virConnectPtr conn); --=20 2.36.1 From nobody Tue May 14 00:19:57 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=1658227549; cv=none; d=zohomail.com; s=zohoarc; b=lET11LoMESnIBDx4CpRkunxmkBD6VPNYjPu9vl9l8PAp/exr615FDsqxxlyJ4824huDS9GQsNzWpmFTrcF+CcRKXv90Z7uqhFC7xBDacseRgRzvVDBwhzzyq4AgdhlnF6R1Kiu90g9Qqn6m7c5TQioGL4qcQ9HPai8V0TkA86Kw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658227549; 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=FmwqJxfX3voc+TzYLtxscQkPnMfM0pzQe9kC42tn3EQ=; b=ckVli1svCLG+qJNAhFVQjzfUDB9T2WE1k+NAfaaDmaywmbKzDKmK7Ex894LA2z0rs3nLFdyp7NOzvATMoPGDZxzEwJ6mPKFRje8KZlL/D5p+4n0uJrB3PcndJUBko9Z8x4sgt47H/WLuP66SdzNTiutcnJSM53L2NGFC1b2Y9EY= 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 165822754975929.660771082368683; Tue, 19 Jul 2022 03:45:49 -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-196-JhfIXiUiMXq4SzyyVBTdUQ-1; Tue, 19 Jul 2022 06:45:43 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A76051C04B55; Tue, 19 Jul 2022 10:45:41 +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 93EB818EA8; Tue, 19 Jul 2022 10:45:41 +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 40B421947070; Tue, 19 Jul 2022 10:45:41 +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 6D35C1945DA7 for ; Tue, 19 Jul 2022 10:45:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 58176492CA5; Tue, 19 Jul 2022 10:45:39 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3544F492CA4 for ; Tue, 19 Jul 2022 10:45:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658227548; 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=FmwqJxfX3voc+TzYLtxscQkPnMfM0pzQe9kC42tn3EQ=; b=EVqQfWA5eTR2UNQOl7hyP48gF8LXuIQM/ApGg4Ik59rXDO+6+zrotpte92x8L1oDP5JkRK T1nbBHeEyzQ+RRq/Tdj15li+3dMbHJ0Zgzpa7YLb5WK7494p/G3tzQbbvrDTTQtY1Cgv3y 5vdrU/eBurvYBLmGL0Zi0Iieh5lDtMw= X-MC-Unique: JhfIXiUiMXq4SzyyVBTdUQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/7] virLXCProcessStart: Pass in virConnect object only when registering autodestroy Date: Tue, 19 Jul 2022 12:45:24 +0200 Message-Id: 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.79 on 10.11.54.5 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: 1658227551778100001 Content-Type: text/plain; charset="utf-8" The function doesn't really need the connect object for anything besides registering the autodestroy callback for it. If we merge it certain callers can be simplified. Signed-off-by: Peter Krempa Reviewed-by: Tim Wiederhake --- src/lxc/lxc_driver.c | 15 +++++++++------ src/lxc/lxc_process.c | 31 ++++++++++--------------------- src/lxc/lxc_process.h | 5 ++--- 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 456d2fbae9..6b2f721178 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -964,9 +964,13 @@ static int lxcDomainCreateWithFiles(virDomainPtr dom, virObjectEvent *event =3D NULL; int ret =3D -1; g_autoptr(virLXCDriverConfig) cfg =3D virLXCDriverGetConfig(driver); + virConnect *autoDestroyConn =3D NULL; virCheckFlags(VIR_DOMAIN_START_AUTODESTROY, -1); + if (flags & VIR_DOMAIN_START_AUTODESTROY) + autoDestroyConn =3D dom->conn; + if (!(vm =3D lxcDomObjFromDomain(dom))) goto cleanup; @@ -988,9 +992,7 @@ static int lxcDomainCreateWithFiles(virDomainPtr dom, goto endjob; } - ret =3D virLXCProcessStart(dom->conn, driver, vm, - nfiles, files, - (flags & VIR_DOMAIN_START_AUTODESTROY), + ret =3D virLXCProcessStart(driver, vm, nfiles, files, autoDestroyConn, VIR_DOMAIN_RUNNING_BOOTED); if (ret =3D=3D 0) { @@ -1065,10 +1067,13 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn, g_autoptr(virLXCDriverConfig) cfg =3D virLXCDriverGetConfig(driver); g_autoptr(virCaps) caps =3D NULL; unsigned int parse_flags =3D VIR_DOMAIN_DEF_PARSE_INACTIVE; + virConnect *autoDestroyConn =3D NULL; virCheckFlags(VIR_DOMAIN_START_AUTODESTROY | VIR_DOMAIN_START_VALIDATE, NULL); + if (flags & VIR_DOMAIN_START_AUTODESTROY) + autoDestroyConn =3D conn; if (flags & VIR_DOMAIN_START_VALIDATE) parse_flags |=3D VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA; @@ -1106,9 +1111,7 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn, goto cleanup; } - if (virLXCProcessStart(conn, driver, vm, - nfiles, files, - (flags & VIR_DOMAIN_START_AUTODESTROY), + if (virLXCProcessStart(driver, vm, nfiles, files, autoDestroyConn, VIR_DOMAIN_RUNNING_BOOTED) < 0) { virDomainAuditStart(vm, "booted", false); virLXCDomainObjEndJob(driver, vm); diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 587ba1d3c1..4934a96e0c 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -87,21 +87,15 @@ static int virLXCProcessReboot(virLXCDriver *driver, virDomainObj *vm) { - virConnectPtr conn =3D virCloseCallbacksGetConn(driver->closeCallbacks= , vm); + g_autoptr(virConnect) autoDestroyConn =3D virCloseCallbacksGetConn(dri= ver->closeCallbacks, vm); int reason =3D vm->state.reason; - bool autodestroy =3D false; int ret =3D -1; virDomainDef *savedDef; VIR_DEBUG("Faking reboot"); - if (conn) { - virObjectRef(conn); - autodestroy =3D true; - } else { - conn =3D virConnectOpen("lxc:///system"); - /* Ignoring NULL conn which is mostly harmless here */ - } + if (autoDestroyConn) + virObjectRef(autoDestroyConn); /* In a reboot scenario, we need to make sure we continue * to use the current 'def', and not switch to 'newDef'. @@ -110,8 +104,7 @@ virLXCProcessReboot(virLXCDriver *driver, savedDef =3D g_steal_pointer(&vm->newDef); virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN, 0); vm->newDef =3D savedDef; - if (virLXCProcessStart(conn, driver, vm, - 0, NULL, autodestroy, reason) < 0) { + if (virLXCProcessStart(driver, vm, 0, NULL, autoDestroyConn, reason) <= 0) { VIR_WARN("Unable to handle reboot of vm %s", vm->def->name); goto cleanup; @@ -120,7 +113,6 @@ virLXCProcessReboot(virLXCDriver *driver, ret =3D 0; cleanup: - virObjectUnref(conn); return ret; } @@ -1146,21 +1138,19 @@ virLXCProcessEnsureRootFS(virDomainObj *vm) /** * virLXCProcessStart: - * @conn: pointer to connection * @driver: pointer to driver structure * @vm: pointer to virtual machine structure - * @autoDestroy: mark the domain for auto destruction + * @autoDestroyConn: mark the domain for auto destruction for the passed c= onnection object * @reason: reason for switching vm to running state * * Starts a vm * * Returns 0 on success or -1 in case of error */ -int virLXCProcessStart(virConnectPtr conn, - virLXCDriver * driver, +int virLXCProcessStart(virLXCDriver * driver, virDomainObj *vm, unsigned int nfiles, int *files, - bool autoDestroy, + virConnectPtr autoDestroyConn, virDomainRunningReason reason) { int rc =3D -1, r; @@ -1505,9 +1495,9 @@ int virLXCProcessStart(virConnectPtr conn, goto cleanup; } - if (autoDestroy && + if (autoDestroyConn && virCloseCallbacksSet(driver->closeCallbacks, vm, - conn, lxcProcessAutoDestroy) < 0) + autoDestroyConn, lxcProcessAutoDestroy) < 0) goto cleanup; /* We don't need the temporary NIC names anymore, clear them */ @@ -1568,8 +1558,7 @@ virLXCProcessAutostartDomain(virDomainObj *vm, virObjectLock(vm); if (vm->autostart && !virDomainObjIsActive(vm)) { - ret =3D virLXCProcessStart(data->conn, data->driver, vm, - 0, NULL, false, + ret =3D virLXCProcessStart(data->driver, vm, 0, NULL, NULL, VIR_DOMAIN_RUNNING_BOOTED); virDomainAuditStart(vm, "booted", ret >=3D 0); if (ret < 0) { diff --git a/src/lxc/lxc_process.h b/src/lxc/lxc_process.h index 1bce57809c..4b84e31fef 100644 --- a/src/lxc/lxc_process.h +++ b/src/lxc/lxc_process.h @@ -23,11 +23,10 @@ #include "lxc_conf.h" -int virLXCProcessStart(virConnectPtr conn, - virLXCDriver * driver, +int virLXCProcessStart(virLXCDriver * driver, virDomainObj *vm, unsigned int nfiles, int *files, - bool autoDestroy, + virConnectPtr autoDestroyConn, virDomainRunningReason reason); int virLXCProcessStop(virLXCDriver *driver, virDomainObj *vm, --=20 2.36.1 From nobody Tue May 14 00:19:57 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=1658227552; cv=none; d=zohomail.com; s=zohoarc; b=HpkvgLYH7hLsHJXjXIwDhO1Q1niPwVjOIo57k5yvz9OlFWDKJmoSFqxs65jlpBz2cEda0kHWcx/1V8+pCWgDXzZZZOJvDA6A02ZRwXX/BTUa56Jfv/r8/B11U+vyYTVxtHQlSgJ6tSlPqqf+vVzzYJ8F/ziSzDIZ7XqfT8h2pt0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658227552; 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=RpRrS/WVVXXz9XBZ0XxSCeauaO7Qf+jy1wsQC7W0Dnk=; b=km2gOXcII7I9G5eTQlDOog8I9xAbCaCxvPW8pVBroe3LAofPoOCGbTPDeDoAIoZHS/KtGyEejGS/FFUQPZ8Znd8+SdvfF9eD1QsvQoPpzFVL3DdEiTXahGT9z7az8b4UQ/kKlDCKlvBoaSHcxxu/KZhVw8qzQp9PIFlc+qZtHz8= 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 1658227552864852.7426925139931; Tue, 19 Jul 2022 03:45:52 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-515-oMC4cIzXOiaH93_F8Avt0w-1; Tue, 19 Jul 2022 06:45:45 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6C65B85A585; 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 56CEB492C3B; 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 0A94E1947070; 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 5DAAD194707E for ; Tue, 19 Jul 2022 10:45:41 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3870B492CA4; Tue, 19 Jul 2022 10:45:41 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DAA7492C3B for ; Tue, 19 Jul 2022 10:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658227551; 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=RpRrS/WVVXXz9XBZ0XxSCeauaO7Qf+jy1wsQC7W0Dnk=; b=BhWjEvvHJNB8UUVJJgxr2aagKtSTDr+EOVzApX5Ho6urGpcxEMOq5QrscbY/DM37Fo78bH CQKeYttkSizsOzLaTR/VwHONjDpzIdoOBHaO+LU460gqth2AY251xaUj99KOJ3dEh4FhaT at4ro/4XfN0mTma2Z4az9TvWEcSjPK0= X-MC-Unique: oMC4cIzXOiaH93_F8Avt0w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/7] virLXCProcessReboot: Simplify cleanup Date: Tue, 19 Jul 2022 12:45:25 +0200 Message-Id: <501726510e8c2a5ca9c0a0b15a4e6c9c663808d5.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.85 on 10.11.54.10 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: 1658227553733100004 Content-Type: text/plain; charset="utf-8" Remove the pointless 'cleanup' section and 'ret' variable. Signed-off-by: Peter Krempa Reviewed-by: Tim Wiederhake --- src/lxc/lxc_process.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 4934a96e0c..130c16aa04 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -89,7 +89,6 @@ virLXCProcessReboot(virLXCDriver *driver, { g_autoptr(virConnect) autoDestroyConn =3D virCloseCallbacksGetConn(dri= ver->closeCallbacks, vm); int reason =3D vm->state.reason; - int ret =3D -1; virDomainDef *savedDef; VIR_DEBUG("Faking reboot"); @@ -105,15 +104,11 @@ virLXCProcessReboot(virLXCDriver *driver, virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN, 0); vm->newDef =3D savedDef; if (virLXCProcessStart(driver, vm, 0, NULL, autoDestroyConn, reason) <= 0) { - VIR_WARN("Unable to handle reboot of vm %s", - vm->def->name); - goto cleanup; + VIR_WARN("Unable to handle reboot of vm %s", vm->def->name); + return -1; } - ret =3D 0; - - cleanup: - return ret; + return 0; } --=20 2.36.1 From nobody Tue May 14 00:19:57 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=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 Reviewed-by: Tim Wiederhake --- 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 From nobody Tue May 14 00:19:57 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=1658227552; cv=none; d=zohomail.com; s=zohoarc; b=IuzAPKj2jX054LUQU02Il2xZxuvkGWrOIhtTnFyegwYHzUmxIK3SBl6qR186xeHT9yUUhwaaCCUeoi0uD9kqU4hzXnHciqZwOflJMKjwdQvuRRBIMdhor8vLHgf/bmk+tgKEGU1Bmhd3lYJzg8zFYqbJSQBfYZo0wYgftVSnPz0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658227552; 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=m04JCtQdOSTYUl/k2EEb4S+k5op/yhWPeQCy/M8VF20=; b=PFE9UVWXA1BBZWP44jVKkojqYxbD5pgurvhtSyzuSwJDJsGnZidnQQZ2GmzEsPH0Zj9mB3tiK+EYsXgCiNPJWlA4IG3MCzf+22wbktKy24cqH48R+OSTL2v8VMbY8AgOLHz6z9xqDbGLmaTPCDr6QCBEDnwxzV1VbdOPnsDNdF0= 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 1658227552063514.7648857706897; Tue, 19 Jul 2022 03:45:52 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-581-BBi02X9cPiWTwnER6mnhXQ-1; Tue, 19 Jul 2022 06:45:47 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 698F01881438; Tue, 19 Jul 2022 10:45:45 +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 446AC492C3B; Tue, 19 Jul 2022 10:45:45 +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 74A28194F4BF; Tue, 19 Jul 2022 10:45:44 +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 623EE19451EF for ; Tue, 19 Jul 2022 10:45:43 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 44003492CA4; Tue, 19 Jul 2022 10:45:43 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9B87492C3B for ; Tue, 19 Jul 2022 10:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658227551; 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=m04JCtQdOSTYUl/k2EEb4S+k5op/yhWPeQCy/M8VF20=; b=NqT4vpy516eUpXBsGA/FiNF18ACHsw4GhFCKlw36BlHJFJJbW22fCTE9nVnbcU51EjFcEw 0rsZXfdpJSUFJeY4KRtA6DCu7ybRyLUyEwKTp+7aY/s421PDMv9lpmnMKBGTzP3kuCalJZ CRMhDjqZOqZQKMKNrTbDdKxkFd2H6Hg= X-MC-Unique: BBi02X9cPiWTwnER6mnhXQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 5/7] virLXCProcessAutostartDomain: Refactor control flow and variable use Date: Tue, 19 Jul 2022 12:45:27 +0200 Message-Id: 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.85 on 10.11.54.10 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: 1658227553752100005 Content-Type: text/plain; charset="utf-8" Use automatic unlocking of the 'vm' object, so that we can return early when no autostart is needed and avoid passing of the 'driver' object which is already present in 'vm's' private data. Signed-off-by: Peter Krempa Reviewed-by: Tim Wiederhake --- src/lxc/lxc_process.c | 55 ++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index a733f146f4..753e9e0b9a 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -1538,48 +1538,43 @@ int virLXCProcessStart(virLXCDriver * driver, return rc; } -struct virLXCProcessAutostartData { - virLXCDriver *driver; -}; static int virLXCProcessAutostartDomain(virDomainObj *vm, - void *opaque) + void *opaque G_GNUC_UNUSED) { - const struct virLXCProcessAutostartData *data =3D opaque; - int ret =3D 0; + VIR_LOCK_GUARD lock =3D virObjectLockGuard(vm); + virLXCDomainObjPrivate *priv =3D vm->privateData; + virObjectEvent *event; + int rc =3D 0; - virObjectLock(vm); - if (vm->autostart && - !virDomainObjIsActive(vm)) { - ret =3D virLXCProcessStart(data->driver, vm, 0, NULL, NULL, - VIR_DOMAIN_RUNNING_BOOTED); - virDomainAuditStart(vm, "booted", ret >=3D 0); - if (ret < 0) { - VIR_ERROR(_("Failed to autostart VM '%s': %s"), - vm->def->name, - virGetLastErrorMessage()); - } else { - virObjectEvent *event =3D - virDomainEventLifecycleNewFromObj(vm, - VIR_DOMAIN_EVENT_STARTED, - VIR_DOMAIN_EVENT_STARTED_BOOTED); - virObjectEventStateQueue(data->driver->domainEventState, event= ); - } + if (!vm->autostart || + virDomainObjIsActive(vm)) + return 0; + + rc =3D virLXCProcessStart(priv->driver, vm, 0, NULL, NULL, VIR_DOMAIN_= RUNNING_BOOTED); + virDomainAuditStart(vm, "booted", rc >=3D 0); + + if (rc < 0) { + VIR_ERROR(_("Failed to autostart VM '%s': %s"), + vm->def->name, + virGetLastErrorMessage()); + return -1; } - virObjectUnlock(vm); - return ret; + + event =3D virDomainEventLifecycleNewFromObj(vm, + VIR_DOMAIN_EVENT_STARTED, + VIR_DOMAIN_EVENT_STARTED_BOO= TED); + virObjectEventStateQueue(priv->driver->domainEventState, event); + + return 0; } void virLXCProcessAutostartAll(virLXCDriver *driver) { - struct virLXCProcessAutostartData data =3D { driver }; - - virDomainObjListForEach(driver->domains, false, - virLXCProcessAutostartDomain, - &data); + virDomainObjListForEach(driver->domains, false, virLXCProcessAutostart= Domain, NULL); } --=20 2.36.1 From nobody Tue May 14 00:19:57 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=1658227578; cv=none; d=zohomail.com; s=zohoarc; b=g3YoGN4TRrMk0i3ZDqty4k+Ao/zBZLHBiBGEcPHN3WSIkss8RK+jbmSBV1G+nXqMYRSI3m0xVbwA/+f5EE1nH/JDomIFqUIV3N15Ue22Xf5wEpbQPVX9RJoWCXNV9y+yvN6O8+uHsygFPeAca4aB9qyGrXiACHKls7kKfNr7sYc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658227578; 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=p+QwlTkrzPqoXHi/NbsaH6HjgG+3imImKrR5vB0i0DY=; b=Jdi556QcgORuNGEbSTmgYkUmyKTUDBUoZ4lRk9KxUYgbpC4QhvMkVnookyMVAN/fHBZ5MwRMZH13FjjJocknYfa7Nvn7LS+/YHWPeSlfMpWHxFqJ3zY02y7JYg+u7RcZoc6QNnJP0yH0iiujWP7LFEyJLTBmsNzED4xbZ3BzJp0= 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 1658227578967661.7567189515014; Tue, 19 Jul 2022 03:46:18 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-638-HRaxSY1hP96bQ3RNuHMVjA-1; Tue, 19 Jul 2022 06:45:53 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 878DC801585; Tue, 19 Jul 2022 10:45:51 +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 710C62026D07; Tue, 19 Jul 2022 10:45:51 +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 51F2A1947074; Tue, 19 Jul 2022 10:45:51 +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 3B3B3194B94A for ; Tue, 19 Jul 2022 10:45:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2DD20492CA5; Tue, 19 Jul 2022 10:45:44 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 957B9492CA4 for ; Tue, 19 Jul 2022 10:45:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658227578; 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=p+QwlTkrzPqoXHi/NbsaH6HjgG+3imImKrR5vB0i0DY=; b=Ute31VuHdqjCcgve21app1pwbcHeWNOiW5M6uRVlzPoDk0yPMfKQ5hxFJHZlMwCknHfGtg J6N0Z2nKhv1T91fu1/mM8KX/+txgbKA/x0XvRheNcW9oqozXXLRM6nWBTd74WZC7D+p4iJ hmZuqzMV6g0t5mfhUOq7yz7r0RhYfCM= X-MC-Unique: HRaxSY1hP96bQ3RNuHMVjA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 6/7] virLXCProcessReboot: Remove the need to re-register autodestroy callback Date: Tue, 19 Jul 2022 12:45:28 +0200 Message-Id: <343e9af05e99c0eb1645b67d1360ba4135f096dd.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.78 on 10.11.54.4 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: 1658227579831100001 Content-Type: text/plain; charset="utf-8" Add a new flag VIR_LXC_PROCESS_CLEANUP_AUTODESTROY to virLXCProcessCleanupFlags for skipping removal of the autodestroy callback so that fake reboot of the container doesn't need to fetch the connection and re-register it. Since virLXCProcessReboot is defined before virLXCProcessCleanupFlags, this patch also moves the flag enum typedef to the beginning of the file. Signed-off-by: Peter Krempa Reviewed-by: Tim Wiederhake --- src/lxc/lxc_process.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 753e9e0b9a..f9854ac138 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -56,6 +56,13 @@ VIR_LOG_INIT("lxc.lxc_process"); #define START_POSTFIX ": starting up\n" +typedef enum { + VIR_LXC_PROCESS_CLEANUP_RELEASE_SECLABEL =3D (1 << 0), + VIR_LXC_PROCESS_CLEANUP_RESTORE_SECLABEL =3D (1 << 1), + VIR_LXC_PROCESS_CLEANUP_REMOVE_TRANSIENT =3D (1 << 2), + VIR_LXC_PROCESS_CLEANUP_AUTODESTROY =3D (1 << 3), +} virLXCProcessCleanupFlags; + static void lxcProcessAutoDestroy(virDomainObj *dom, virConnectPtr conn) @@ -87,23 +94,21 @@ static int virLXCProcessReboot(virLXCDriver *driver, virDomainObj *vm) { - g_autoptr(virConnect) autoDestroyConn =3D virCloseCallbacksGetConn(dri= ver->closeCallbacks, vm); + /* we want to keep the autodestroy callback registered */ + unsigned int stopFlags =3D ~(VIR_LXC_PROCESS_CLEANUP_AUTODESTROY); int reason =3D vm->state.reason; virDomainDef *savedDef; VIR_DEBUG("Faking reboot"); - if (autoDestroyConn) - virObjectRef(autoDestroyConn); - /* In a reboot scenario, we need to make sure we continue * to use the current 'def', and not switch to 'newDef'. * So temporarily hide the newDef and then reinstate it */ savedDef =3D g_steal_pointer(&vm->newDef); - virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN, 0); + virLXCProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN, stopFlags); vm->newDef =3D savedDef; - if (virLXCProcessStart(driver, vm, 0, NULL, autoDestroyConn, reason) <= 0) { + if (virLXCProcessStart(driver, vm, 0, NULL, NULL, reason) < 0) { VIR_WARN("Unable to handle reboot of vm %s", vm->def->name); return -1; } @@ -126,12 +131,6 @@ lxcProcessRemoveDomainStatus(virLXCDriverConfig *cfg, } -typedef enum { - VIR_LXC_PROCESS_CLEANUP_RELEASE_SECLABEL =3D (1 << 0), - VIR_LXC_PROCESS_CLEANUP_RESTORE_SECLABEL =3D (1 << 1), - VIR_LXC_PROCESS_CLEANUP_REMOVE_TRANSIENT =3D (1 << 2), -} virLXCProcessCleanupFlags; - /** * virLXCProcessCleanup: * @driver: pointer to driver structure @@ -188,8 +187,9 @@ static void virLXCProcessCleanup(virLXCDriver *driver, } /* Stop autodestroy in case guest is restarted */ - virCloseCallbacksUnset(driver->closeCallbacks, vm, - lxcProcessAutoDestroy); + if (flags & VIR_LXC_PROCESS_CLEANUP_AUTODESTROY) { + virCloseCallbacksUnset(driver->closeCallbacks, vm, lxcProcessAutoD= estroy); + } if (priv->monitor) { virLXCMonitorClose(priv->monitor); --=20 2.36.1 From nobody Tue May 14 00:19:57 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=1658227553; cv=none; d=zohomail.com; s=zohoarc; b=duusic16Nfcp8fF/udVTL+OGh3cCldgXf24w5av0r0JpTNVQlFjHgcCsKK3TJnqa2n70ZA4XqkydhCIN/3jD5OZOyM9pMNQPhO7rWCpSNWE2pRgfMsBk+IZMhkqR3BRocA6YGhcUIv5M6N+2T2wZFIY5E38WKtEU/naGl+83gtE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658227553; 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=JSnG+um4SqiuSkGIPIdtJUILOjdjCiR8UMo+Uk/emh4=; b=EcQe96N9FDQH4g7bp+k8aqZw4fJDauNRybDKEyK5jHYuVIw4qRTU4IhGIp7lQ/kL/qulFkg06tZNw7lNICiFPF4Z0UZn+xARe6aN/Z2F6tAB3mC+9T+eYQPWU94u69lf71JKgNjhAMb2gkj6kgaZ5rFjb+fyiYpIqLlOZ5whhkw= 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 1658227553988735.0319345430369; Tue, 19 Jul 2022 03:45:53 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-591-TtaoqCxGMj6YUcdvwDZsww-1; Tue, 19 Jul 2022 06:45:48 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B3BB9188B2BA; Tue, 19 Jul 2022 10:45:45 +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 9E095140240F; Tue, 19 Jul 2022 10:45:45 +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 78156194707C; Tue, 19 Jul 2022 10:45:45 +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 39EF319451EC for ; Tue, 19 Jul 2022 10:45:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1A438492CA6; Tue, 19 Jul 2022 10:45:45 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9CF0B492CA5 for ; Tue, 19 Jul 2022 10:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658227553; 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=JSnG+um4SqiuSkGIPIdtJUILOjdjCiR8UMo+Uk/emh4=; b=E00rIL9vRK8+1/5WQhmjjv0REKfnrtw+hiCRrqqtTci18XCaaYtiHS1pAnDoWp5wCxsRFk 0iljBQfNb14UnA1LzvTYiTzm7ZU4hiWDJo9mSE8lo5hGXKiLMeXjXs8pyv1Ha+zU/JlfeQ i4e6JsIgm3VDcLMHKpnB1vfjahQ6b7Q= X-MC-Unique: TtaoqCxGMj6YUcdvwDZsww-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 7/7] virclosecallbacks: Remove unused virCloseCallbacksGetConn Date: Tue, 19 Jul 2022 12:45:29 +0200 Message-Id: <2a7f7598e8ed4f3980f9312385b7afe6a0a13b32.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.85 on 10.11.54.7 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: 1658227555719100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Tim Wiederhake --- src/hypervisor/virclosecallbacks.c | 24 ------------------------ src/hypervisor/virclosecallbacks.h | 3 --- src/libvirt_private.syms | 1 - 3 files changed, 28 deletions(-) diff --git a/src/hypervisor/virclosecallbacks.c b/src/hypervisor/vircloseca= llbacks.c index c533e695f1..a08464438a 100644 --- a/src/hypervisor/virclosecallbacks.c +++ b/src/hypervisor/virclosecallbacks.c @@ -195,30 +195,6 @@ virCloseCallbacksGet(virCloseCallbacks *closeCallbacks, return cb; } -virConnectPtr -virCloseCallbacksGetConn(virCloseCallbacks *closeCallbacks, - virDomainObj *vm) -{ - char uuidstr[VIR_UUID_STRING_BUFLEN]; - virDriverCloseDef *closeDef; - virConnectPtr conn =3D NULL; - - virUUIDFormat(vm->def->uuid, uuidstr); - VIR_DEBUG("vm=3D%s, uuid=3D%s", vm->def->name, uuidstr); - - virObjectLock(closeCallbacks); - - closeDef =3D virHashLookup(closeCallbacks->list, uuidstr); - if (closeDef) - conn =3D closeDef->conn; - - virObjectUnlock(closeCallbacks); - - VIR_DEBUG("conn=3D%p", conn); - return conn; -} - - typedef struct _virCloseCallbacksListEntry virCloseCallbacksListEntry; struct _virCloseCallbacksListEntry { unsigned char uuid[VIR_UUID_BUFLEN]; diff --git a/src/hypervisor/virclosecallbacks.h b/src/hypervisor/vircloseca= llbacks.h index 5a56dea292..7afb0e5640 100644 --- a/src/hypervisor/virclosecallbacks.h +++ b/src/hypervisor/virclosecallbacks.h @@ -44,9 +44,6 @@ virCloseCallback virCloseCallbacksGet(virCloseCallbacks *closeCallbacks, virDomainObj *vm, virConnectPtr conn); -virConnectPtr -virCloseCallbacksGetConn(virCloseCallbacks *closeCallbacks, - virDomainObj *vm); void virCloseCallbacksRun(virCloseCallbacks *closeCallbacks, diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index f4732f1742..1dd611e697 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1594,7 +1594,6 @@ virDomainJobTypeToString; # hypervisor/virclosecallbacks.h virCloseCallbacksGet; -virCloseCallbacksGetConn; virCloseCallbacksNew; virCloseCallbacksRun; virCloseCallbacksSet; --=20 2.36.1