From nobody Sun Feb 8 19:43:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) client-ip=216.205.24.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 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=1584531649; cv=none; d=zohomail.com; s=zohoarc; b=fEhJ7dP2hWHdUWViP5N8qLY961wav2yOY0YHv5tn8lEb/mSb1/WP9l/kZdGm1uuxa/6A1sgjb+mBbqPqj3fI3A5eyK8lWGnwTg4VPyQHiNDqtk8efREGe5w6vaQsuL307lY5uKpF4FPXxWzzTzU6eYcPd6H2EaINVv7cVJKLqDs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584531649; 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=97MvqunGu2+tf4A4vkJLH5kScFg+DOwMDNkppVeS84E=; b=FEcQ0eosKunpBqUsVuQN0tKrrnG7MpSR7G1zU/RadyDMl+q0pV9ozjKnhTEfM5M0Q2oKEi1Ml9EtBdWVIY9BnoiX3o+0KwYSjoCtVImf7qcBAE6QE4JXUAIkUGd/2x3ELHUFJ0j8v2AUyTUKQQYtSMXpBffSdYldk4RFNnqoZxs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by mx.zohomail.com with SMTPS id 1584531649618523.0374474554282; Wed, 18 Mar 2020 04:40:49 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-191-DLAwx-E4P3uhzr9aIww9IA-1; Wed, 18 Mar 2020 07:40:46 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 53C65477; Wed, 18 Mar 2020 11:40:40 +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 BB16A94951; Wed, 18 Mar 2020 11:40:39 +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 7AD411803C37; Wed, 18 Mar 2020 11:40:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02IBeZ4E010598 for ; Wed, 18 Mar 2020 07:40:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id CEA8594956; Wed, 18 Mar 2020 11:40:35 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 563D99494D for ; Wed, 18 Mar 2020 11:40:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584531648; 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=97MvqunGu2+tf4A4vkJLH5kScFg+DOwMDNkppVeS84E=; b=iNltJxLHxZ5kepgIUg9QIN0tZfiVdPu6Gf82mABnQ+PNmF5cusp8H3ngaXx0kspRzE6Jn7 dIka2W3DdLUrR5W3v6Mdl0XvCyT9AAEJmL0oAcipbrvBO7Iz7prO1IqHuvidC8tKhPdXKp xvdbGb2FpsMk4l3U06JHIW7WvjxIzmg= X-MC-Unique: DLAwx-E4P3uhzr9aIww9IA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/5] qemuDomainChangeEjectableMedia: Don't always remove managed PR daemon Date: Wed, 18 Mar 2020 12:40:26 +0100 Message-Id: <20615384186b6fabcfa97d5207fcf8effa9788c2.1584531508.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When changing media we'd attempt to remove the managed pr daemon even if neither of the images involved in the media change used it. This caused libvirtd to log a spurious error: 2020-03-18 01:41:19.832+0000: 643207: error : qemuMonitorJSONCheckError:412= : internal error: unable to execute QEMU command 'object-del': object 'pr-= helper0' not found With this patch we completely avoid calling the deletion code. https://bugzilla.redhat.com/show_bug.cgi?id=3D1814486 Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 47069be900..1cab12fb2b 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -590,6 +590,8 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver, virStorageSourcePtr oldsrc =3D disk->src; qemuDomainDiskPrivatePtr diskPriv =3D QEMU_DOMAIN_DISK_PRIVATE(disk); bool sharedAdded =3D false; + bool managedpr =3D virStorageSourceChainHasManagedPR(oldsrc) || + virStorageSourceChainHasManagedPR(newsrc); int ret =3D -1; int rc; @@ -653,7 +655,8 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver, } /* remove PR manager object if unneeded */ - ignore_value(qemuHotplugRemoveManagedPR(driver, vm, QEMU_ASYNC_JOB_NON= E)); + if (managedpr) + ignore_value(qemuHotplugRemoveManagedPR(driver, vm, QEMU_ASYNC_JOB= _NONE)); /* revert old image do the disk definition */ if (oldsrc) --=20 2.24.1