From nobody Tue May 7 23:33:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1585234470; cv=none; d=zohomail.com; s=zohoarc; b=hRfupARjfwKM1RSJZsQAeGoQgm0X77ZUPcfptvRE269Zh3CsPNxpYA6GI4FiGhprgubUavzb7ccAcKti0Gvif9Ud4DNVZeMWeFs4scX/IjgXQBLkXe/l8LRgoV1Uxz0PKhh7kNxaPPvEeawM2q3QZW34U+HsGy45YSs/lz/AnCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585234470; 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=GhaxR4gFKxXUsITFWKp/qh43GV385Q6vZEOjhY8ErPU=; b=jZ8zRcw1DlcebDMVBXcHvCXhE5yAEGy5DWTsHiQSXbJFLg+8+7SftxEG540lOKRhWeiPMt5uKf1KovSYUEACaz7ElW9b82/S7laG5aQK4rTZGJ/EQRSD0GCO6IdSCcqEaA7gbapV7I2W/ev0Nc8f+SDZTjN6IzL/b67nv2oNVso= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.74]) by mx.zohomail.com with SMTPS id 1585234470062903.3441904926422; Thu, 26 Mar 2020 07:54:30 -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-184-FbwbYxefM8SA-FhLz5HAaA-1; Thu, 26 Mar 2020 10:54:26 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A12C100DFC0; Thu, 26 Mar 2020 14:54:20 +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 388A510027B9; Thu, 26 Mar 2020 14:54:20 +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 AE76A8A03E; Thu, 26 Mar 2020 14:54:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02QEsAwR028055 for ; Thu, 26 Mar 2020 10:54:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8D7CC7E311; Thu, 26 Mar 2020 14:54:10 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13B4192D5A for ; Thu, 26 Mar 2020 14:54:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585234468; 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=GhaxR4gFKxXUsITFWKp/qh43GV385Q6vZEOjhY8ErPU=; b=QwrKPbsPNkUNQrCjQTTLCVVuWnBtP2bdS5PcCJEsO/+iVPV0uoN4I6QLTSmw2dzykpVTvJ Nv9/p5X+PnSe2nc067u7qrTiPMmlYcEimMaXkwXYJPeNyNQbPOV86RnIVAYEKdSyq1deXA 2v9WnANwHax/vyWXSc8vEAHyGb0b39w= X-MC-Unique: FbwbYxefM8SA-FhLz5HAaA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/2] qemuCheckpointDelete: Check VM liveness first Date: Thu, 26 Mar 2020 15:54:04 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.84 on 10.5.11.22 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" Move the liveness check prior to the capability check. If the VM is offline the capabilities are not initialized and thus we'd report the wrong error. https://bugzilla.redhat.com/show_bug.cgi?id=3D1812531 Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_checkpoint.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index 76f10a701e..62b6e87b53 100644 --- a/src/qemu/qemu_checkpoint.c +++ b/src/qemu/qemu_checkpoint.c @@ -771,15 +771,15 @@ qemuCheckpointDelete(virDomainObjPtr vm, return -1; if (!metadata_only) { - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP))= { + if (!virDomainObjIsActive(vm)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("incremental backup is not supported yet")); + _("cannot delete checkpoint for inactive domain= ")); goto endjob; } - if (!virDomainObjIsActive(vm)) { + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP))= { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("cannot delete checkpoint for inactive domain= ")); + _("incremental backup is not supported yet")); goto endjob; } } --=20 2.24.1 From nobody Tue May 7 23:33:47 2024 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=1585234507; cv=none; d=zohomail.com; s=zohoarc; b=nZuT7yMWUdQgOO9Y77SiqtTWl8mKgJGJruPLXSq+jWzY18QAVPr9pU06R6hhXPzoa287hmS1feIAp2zr3GpunUZ2QEUx/QAnqM9FtbMvEi0IQzLobkkHo+pEO40oMCzL8ORx1lvDk2zV4INVe/H5q89lTDWOQv6SbG/zaHoTd2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585234507; 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=NE3Bv8LPtnBZRbn4Giyq0vbrjQOoM+GF6KRNazp5T5k=; b=L7YTrexdUova2pNZQgkcsHdP58QBcKFsjkns3bUhS2z4zapYd9s7Q5HOCVnJNHtvewz/R0kO6e9j0Q5kOHp73Y4hk3tzFN/RDFtHoJmnVcyj1buwfgTBhKHK1kEoS8K+va06lnhuLbHH6GKClvsytN9ncuXZR1w5hJBV1E0ga1g= 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 1585234507339262.0547008601617; Thu, 26 Mar 2020 07:55:07 -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-206-S6Jnh7FuMIefq21Srm4hYg-1; Thu, 26 Mar 2020 10:54:35 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 251401007277; Thu, 26 Mar 2020 14:54:27 +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 E62A41001920; Thu, 26 Mar 2020 14:54:26 +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 64C5D18089CF; Thu, 26 Mar 2020 14:54:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02QEsBPh028060 for ; Thu, 26 Mar 2020 10:54:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 617BC7E311; Thu, 26 Mar 2020 14:54:11 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBE8592F8E for ; Thu, 26 Mar 2020 14:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585234506; 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=NE3Bv8LPtnBZRbn4Giyq0vbrjQOoM+GF6KRNazp5T5k=; b=FnvrrGgBPhFj7fmNCev4bigSiKE2VRARhuh8J58nVH/pjkZgqpwq/RHABEoZsgcd3anPgi ffBZ9CI1iiTBs31Rz50oRGRaVUwsbIDebGOpHCbI3LsG61LuxkY+/3CqI7XMCzGWkiHXKZ 8eb3RqiCS5qSlsFMTN+1AGsIQ4Er5lI= X-MC-Unique: S6Jnh7FuMIefq21Srm4hYg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/2] qemuBackupBegin: Fix monitor access when rolling back due to failure Date: Thu, 26 Mar 2020 15:54:05 +0100 Message-Id: <2e577fb9c6a9e392834b0590e96c13fd43e18a52.1585234398.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.84 on 10.5.11.22 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" The code attempting to clean up after a failed pull mode backup job wrongly entered monitor but didn't clean up nor exit monitor due to a logic bug. Fix the condition. https://bugzilla.redhat.com/show_bug.cgi?id=3D1817327 Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index 8b66ee8d1f..9a056fa407 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -894,7 +894,7 @@ qemuBackupBegin(virDomainObjPtr vm, qemuCheckpointRollbackMetadata(vm, chk); if (!job_started && nbd_running && - qemuDomainObjEnterMonitorAsync(priv->driver, vm, QEMU_ASYNC_JOB_BA= CKUP) < 0) { + qemuDomainObjEnterMonitorAsync(priv->driver, vm, QEMU_ASYNC_JOB_BA= CKUP) =3D=3D 0) { ignore_value(qemuMonitorNBDServerStop(priv->mon)); ignore_value(qemuDomainObjExitMonitor(priv->driver, vm)); } --=20 2.24.1