From nobody Mon Feb 9 01:21:58 2026 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1538741683332366.6816357579527; Fri, 5 Oct 2018 05:14:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 78E203081254; Fri, 5 Oct 2018 12:14:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30DB55D9C8; Fri, 5 Oct 2018 12:14:41 +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 D20A4EF0A; Fri, 5 Oct 2018 12:14:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w95CEK2G017521 for ; Fri, 5 Oct 2018 08:14:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3CC842E19A; Fri, 5 Oct 2018 12:14:20 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8672C341E1; Fri, 5 Oct 2018 12:14:19 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 5 Oct 2018 14:14:02 +0200 Message-Id: <2a73c3bb4f1795e2b3206107dbb220a164f9779b.1538741517.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 03/12] qemu: hotplug: Don't pretend that we support secrets for media change 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: , MIME-Version: 1.0 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 05 Oct 2018 12:14:42 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Old media changing code does not bother setting up the secrets for new media or actually removing/adding of the corresponding objects. Additionally it uses secrets setup for the old image to be removed as the secret for the new image which is wrong. Remove the support for secrets while changing media for the legacy approach. The only reasonable way to fix it is when using blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 86afda636e..ad7023c085 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -210,8 +210,6 @@ qemuDomainChangeMediaLegacy(virQEMUDriverPtr driver, char *driveAlias =3D NULL; qemuDomainObjPrivatePtr priv =3D vm->privateData; qemuDomainDiskPrivatePtr diskPriv =3D QEMU_DOMAIN_DISK_PRIVATE(disk); - qemuDomainStorageSourcePrivatePtr srcPriv =3D QEMU_DOMAIN_STORAGE_SOUR= CE_PRIVATE(disk->src); - qemuDomainSecretInfoPtr secinfo =3D NULL; const char *format =3D NULL; char *sourcestr =3D NULL; @@ -221,9 +219,6 @@ qemuDomainChangeMediaLegacy(virQEMUDriverPtr driver, goto cleanup; } - if (srcPriv) - secinfo =3D srcPriv->secinfo; - if (!(driveAlias =3D qemuAliasDiskDriveFromDisk(disk))) goto cleanup; @@ -252,7 +247,7 @@ qemuDomainChangeMediaLegacy(virQEMUDriverPtr driver, } if (!virStorageSourceIsEmpty(newsrc)) { - if (qemuGetDriveSourceString(newsrc, secinfo, &sourcestr) < 0) + if (qemuGetDriveSourceString(newsrc, NULL, &sourcestr) < 0) goto cleanup; if (virStorageSourceGetActualType(newsrc) !=3D VIR_STORAGE_TYPE_DI= R) { --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list