From nobody Mon Feb 9 17:08:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1605188709; cv=none; d=zohomail.com; s=zohoarc; b=hDHpS95QZNKgzFTPCzchE+gref4YvujfI8nWpTKkqlV+RFaNaZVQQ+NvRgww655hIwmR1zvKwtwcX6ySfkFworW6wayDG/blragONzDI1ePwWN9rpPDSGJrHnpQ3T8zFzCq9tv2w1URWbgQ1Va74MoKVAIoFvxyYXQ6F+xF80AA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605188709; 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=ofnKfqtrpTSf7cx9dz74tTSEX9OQEometgPANbB202Y=; b=ZxPnQaFgotAzg8PWgsIcpswiJGClzAuMTpVlxK3j6JZsMmtddH6bP0sKCUwX3emcO7XQNqEV3MxVLZcc/xdPPxVLvR80FU27eGUXuJgTLh/7ria3agvR6o1XZBwqhKN8LJjEKzeULhZSA7t6QDNrJK2baPpf3xpeaed5JYGgrUQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1605188709917473.9519981703314; Thu, 12 Nov 2020 05:45:09 -0800 (PST) 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-207-WvaUlJ-VMVuDWBytoplojw-1; Thu, 12 Nov 2020 08:43:48 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86AF3AF069; Thu, 12 Nov 2020 13:43:40 +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 5AD975C1A3; Thu, 12 Nov 2020 13:43:40 +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 236509982; Thu, 12 Nov 2020 13:43:40 +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 0ACDhdVX012412 for ; Thu, 12 Nov 2020 08:43:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1476275139; Thu, 12 Nov 2020 13:43:39 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7294855766 for ; Thu, 12 Nov 2020 13:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605188708; 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=ofnKfqtrpTSf7cx9dz74tTSEX9OQEometgPANbB202Y=; b=HzlUhUxxRPFN6ivjL4vXAt1DBpU/GTTON6WHOj/YALalAoYE0hRVjwpd46pGEHZEmog404 UbEZhIphcTRiIWyAVffQiI5xk4JyaDYdcJqh8d6Rgi2UkWSgWDIkBmrqlLQmnaSx7rPZ2j d5zo1kIcW7oAYdcGn2r9kJkq6NcZK6U= X-MC-Unique: WvaUlJ-VMVuDWBytoplojw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 8/8] tools: virsh: Reset error when keepalive registration fails Date: Thu, 12 Nov 2020 14:43:05 +0100 Message-Id: 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.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" We try to enable keepalive oportunistically. If it's not supported by the connection driver and it was not explicitly requested we keep the error object set and can report it in some cases accidentally: --- stdout --- TEST: /home/pipo/libvirt/tests/virsh-self-test ! 1 FAILED --- stderr --- error: parameter 'target' of command 'attach-disk' must be listed before op= tional parameters error: this function is not supported by the connection driver: virConnectS= etKeepAlive ------- Clear the stored libvirt error. Signed-off-by: Peter Krempa --- tools/virsh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh.c b/tools/virsh.c index 954778b626..a6bfbbbb87 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -176,6 +176,7 @@ virshConnect(vshControl *ctl, const char *uri, bool rea= donly) } vshDebug(ctl, VSH_ERR_INFO, "%s", _("Failed to setup keepalive on connection\n")); + vshResetLibvirtError(); } cleanup: --=20 2.28.0