From nobody Sat May 4 12:10:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1594971045; cv=none; d=zohomail.com; s=zohoarc; b=P7gw0NGmiIHyQP7I4ZKEVyD4NEqorDP//Bh7GVPaFOo50UhzTiXZkdhPPG4GANDt6eb414vgRJlpsEv+WbPpI1HRI0o5BO8s2KkVFXtxhV3J85cStGb1VJNsE9Y0Rt5mGpxoq+r3xPYUMCNi7DT8Bf2SfnTyrK+7SBxzo/aPXIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594971045; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=EpZomD4Sm9E+CkKs0zBMMs1KeMeMR9ABt4ML3VTS51Q=; b=SrsqsjXOq+Yy1gAeZUDWzAE2iaekcJ4JvoIJiyWF0M3llvj48RSrBiVCzOMxdqqwxn/rWyG5Qmy7qb/pOFe3IE+58UPKQJ8xUtJeSZY81uUJFMDIsTgOy4UshZZIXITLtS2KsnmDTamQYbqsjlAzkFWdCfMg0vlt4TyimTRDVyA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 15949710454941021.1750251607766; Fri, 17 Jul 2020 00:30:45 -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-263-knZ0q1cnO4qJ_uqfNVxJCQ-1; Fri, 17 Jul 2020 03:30:42 -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 9119B19057C5; Fri, 17 Jul 2020 07:30:36 +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 27FDA100238C; Fri, 17 Jul 2020 07:30:35 +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 AB9B296247; Fri, 17 Jul 2020 07:30:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06H7RxX9019397 for ; Fri, 17 Jul 2020 03:27:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 713C25C1BB; Fri, 17 Jul 2020 07:27:59 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id E55D45C240 for ; Fri, 17 Jul 2020 07:27:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594971044; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=EpZomD4Sm9E+CkKs0zBMMs1KeMeMR9ABt4ML3VTS51Q=; b=M9L8KvmPi4hPkQPDfDrxC+AiN2b4Cxpx2ZW+Man6kiCy1xkJyiiHATUHYtok5IjEboCl+m flI+rLP40nU6hrHFgzsDKSI/qmYfklx/HUMZLa8J1/uG0k6Ox5dXHzPslxWyjV37AhvhJc Ug6hQqAx87zqvDMvNeRSuG4ubPZQCoI= X-MC-Unique: knZ0q1cnO4qJ_uqfNVxJCQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] qemuDomainPostParseDataAlloc: Don't reset error if looking up caps fails Date: Fri, 17 Jul 2020 09:27:54 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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" When starting the QEMU driver we load all domain XMLs. This means, that post parse callbacks are run for each XML, but they are allowed to fail because we will run them again when starting a domain. In the case I am fixing, we were unable to look up QEMU capabilities (in both post parse runs) and reported appropriate error, sort of. It can be found in the logs, but the caller doesn't get it because after 5331c4804f4 it is reset. Therefore, as reported here [1], if we are unable to start QEMU for caps probing the following will happen: virsh start fedora error: Failed to start domain fedora error: An error occurred, but the cause is unknown 1: https://www.redhat.com/archives/libvir-list/2020-July/msg00673.html Fixes: 5331c4804f4 Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c365d92ae0..f31690c50a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5307,7 +5307,6 @@ qemuDomainPostParseDataAlloc(const virDomainDef *def, =20 if (!(*parseOpaque =3D virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator))) { - virResetLastError(); return 1; } =20 --=20 2.26.2