From nobody Sat May 18 23:44:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1641488947105907.2103461027897; Thu, 6 Jan 2022 09:09:07 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-28-EfvUWk1eML2oG1rA11rGnQ-1; Thu, 06 Jan 2022 12:09:04 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CFBA81006AA5; Thu, 6 Jan 2022 17:08:59 +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 AE5B37F80D; Thu, 6 Jan 2022 17:08:59 +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 AB6CD1806D1D; Thu, 6 Jan 2022 17:08:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 206H7L6v006914 for ; Thu, 6 Jan 2022 12:07:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2B16840CFD33; Thu, 6 Jan 2022 17:07:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 262E340CFD12 for ; Thu, 6 Jan 2022 17:07:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0DC821064E6A for ; Thu, 6 Jan 2022 17:07:21 +0000 (UTC) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-cc7J5EHNMw2w56OFSztioQ-1; Thu, 06 Jan 2022 12:07:18 -0500 Received: by mail-pj1-f51.google.com with SMTP id oa15so2123676pjb.4 for ; Thu, 06 Jan 2022 09:07:18 -0800 (PST) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.196.144]) by smtp.googlemail.com with ESMTPSA id ls6sm7403733pjb.33.2022.01.06.09.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 09:07:16 -0800 (PST) X-MC-Unique: EfvUWk1eML2oG1rA11rGnQ-1 X-MC-Unique: cc7J5EHNMw2w56OFSztioQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jC4aD/TiH9QOo6i/ia3b711hSg+uLoMOEBqWgG1rOCM=; b=upeLPX03UiIHbuhg+MbEBejCTLdJkGJBi3Pue6iRxfvkLyUGJsrLDARKlw78gph3zQ z87B8ePJ6RspPrCuuZ3+AamaZTGjhCbq10HQ3EIp+1OEUBZf98I6UHIxKi53Chv4jSEh wvREvh8wyyMUz5U3CxfwCGQVjdVdcv7DNGvNfNcrnXZ8q7APWWzvDA2Ovr1UGjWO/jX9 u9jQ4sreW7K2wiqix+KxVTJjuAOIgO79a6IKwk9LlYgsXdONrIN6NkHY8P2pQQL1TYpT whGe6GKbfCic335kIqUHriBJE1EAU5JV/Uqer16pjOx7uMheJ2YyxYNl1nvOfPafzPKN fOpg== X-Gm-Message-State: AOAM530pDWM4BEQbwvDQxnZKHqYjpD9XoiBoQmsxUJl4BcxNyyZx7Qv9 sIPjjYtgwCFUHoyMhASlBMw32f8TEtLyYK4H X-Google-Smtp-Source: ABdhPJxZb8uxb/Z0QAmu6LU3auxQ+qTIFwoJVyadJWIGokMDxCup7WEw8LqSxS5PrNkkOnifggKlKg== X-Received: by 2002:a17:902:6bc7:b0:149:9004:ca04 with SMTP id m7-20020a1709026bc700b001499004ca04mr41767354plt.43.1641488836678; Thu, 06 Jan 2022 09:07:16 -0800 (PST) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH] do not report generic OPERATION_FAILED error when calling virConnectOpenAuth() Date: Thu, 6 Jan 2022 22:37:06 +0530 Message-Id: <20220106170706.185692-1-ani@anisinha.ca> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-loop: libvir-list@redhat.com Cc: Ani Sinha 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.12 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-ZM-MESSAGEID: 1641488949015100001 Content-Type: text/plain; charset="utf-8" virConnectOpenAuth() calls virConnectOpenInternal(). This later function generates fine grained errors arising from various failure conditions that = are more accurate than a "catch all" broader VIR_ERR_OPERATION_FAILED error that the callers of this function generates. Remove the broader error so that mo= re specific errors can be caught and processed. Signed-off-by: Ani Sinha Reviewed-by: Michal Privoznik --- src/libxl/libxl_migration.c | 3 --- src/qemu/qemu_migration.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 6d0ab4ee28..bc2b5401da 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -1134,9 +1134,6 @@ libxlDomainMigrationSrcPerformP2P(libxlDriverPrivate = *driver, virObjectLock(vm); =20 if (dconn =3D=3D NULL) { - virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to connect to remote libvirt URI %s: %s"), - dconnuri, virGetLastErrorMessage()); return ret; } =20 diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index b9d7d582f5..2635ef1162 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -5145,9 +5145,6 @@ qemuMigrationSrcPerformPeer2Peer(virQEMUDriver *drive= r, goto cleanup; =20 if (dconn =3D=3D NULL) { - virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to connect to remote libvirt URI %s: %s"), - dconnuri, virGetLastErrorMessage()); return -1; } =20 --=20 2.25.1