From nobody Wed Nov 27 06:51:29 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1554921016; cv=none; d=zoho.com; s=zohoarc; b=WngMbtNTrfl7Z02zkyrG3bZ4ed0dQ9tNDjkNvTqJ1nf3GDa2vFdb3S8Vj3j3DlMEQ9CI+mbneYBbVngTgyiFQU32IOrq7zD8N9Fsfofu1f695gInqQR+LMo4rB9oBokGMaxXW3nqcgTIudQOEcaahnlyjJ9lhqn3lfK6VBQW65E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554921016; 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:ARC-Authentication-Results; bh=2Vx/GXJu6COG5ObIPc0RDt31i4xbcijEDds2V63tNRQ=; b=ogFmO2OCYONQqVjcs17l/iEmSroBwJKDAxJvfzOpgS/CCYstYNc4FDnmguAYgqVGHpHdNV4S0XVOwOp1BvmZxgJWWuGTVxLa8Tq3rdJByTGHpzViGnEuUrJOkR7/0LQ8rALmIA3Kq/zYXpXloEeSo1Pze8IcHxvErBLk+IaU8Ag= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554921016033899.419848759265; Wed, 10 Apr 2019 11:30:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B16288AAD; Wed, 10 Apr 2019 18:30:13 +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 2554D19814; Wed, 10 Apr 2019 18:30:13 +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 84FEB181AC8F; Wed, 10 Apr 2019 18:30:12 +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 x3AITm7w002713 for ; Wed, 10 Apr 2019 14:29:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1D3FF1A915; Wed, 10 Apr 2019 18:29:48 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-123-233.rdu2.redhat.com [10.10.123.233]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8F1F19C6F; Wed, 10 Apr 2019 18:29:47 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 10 Apr 2019 14:29:37 -0400 Message-Id: <894724dd2d3f282f41cbc828dfbb7aa5d0812599.1554919494.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] qemu: monitor: check for common 'Error: ' string 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: , 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 10 Apr 2019 18:30:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" qemu 4.0.0 will prefix most errors with 'Error: ', so consider any string instance of that an error. This fixes savevm failure detection when migration is blocked due to usage of nested VMX https://bugzilla.redhat.com/show_bug.cgi?id=3D1697997 Signed-off-by: Cole Robinson --- src/qemu/qemu_monitor_text.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index 76095674ab..280cc58840 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -182,6 +182,7 @@ qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon, if (strstr(reply, "Error while creating snapshot") || strstr(reply, "Could not open VM state file") || strstr(reply, "State blocked by non-migratable device") || + strstr(reply, "Error: ") || (strstr(reply, "Error") && strstr(reply, "while writing VM"))) { virReportError(VIR_ERR_OPERATION_FAILED, _("Failed to take snapshot: %s"), reply); @@ -229,6 +230,7 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, con= st char *name) _("Failed to load snapshot: %s"), reply); goto cleanup; } else if (strstr(reply, "Could not open VM state file") || + strstr(reply, "Error: ") || (strstr(reply, "Error") && (strstr(reply, "while loading VM state") || strstr(reply, "while activating snapshot on")))) { @@ -266,8 +268,9 @@ int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, c= onst char *name) } else if (strstr(reply, "Snapshots not supported on device")) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", reply); goto cleanup; - } else if (strstr(reply, "Error") && - strstr(reply, "while deleting snapshot")) { + } else if (strstr(reply, "Error: ") || + (strstr(reply, "Error") && + strstr(reply, "while deleting snapshot"))) { virReportError(VIR_ERR_OPERATION_FAILED, _("Failed to delete snapshot: %s"), reply); goto cleanup; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list