]> xenbits.xensource.com Git - libvirt.git/commitdiff
do not report generic OPERATION_FAILED error when calling virConnectOpenAuth()
authorAni Sinha <ani@anisinha.ca>
Thu, 6 Jan 2022 17:07:06 +0000 (22:37 +0530)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 7 Jan 2022 15:58:25 +0000 (16:58 +0100)
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 more
specific errors can be caught and processed.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/libxl/libxl_migration.c
src/qemu/qemu_migration.c

index 6d0ab4ee2870c92297b99720a701fa9f0308223e..bc2b5401dacfc32f88ed0479d888a07be2fee7cf 100644 (file)
@@ -1134,9 +1134,6 @@ libxlDomainMigrationSrcPerformP2P(libxlDriverPrivate *driver,
     virObjectLock(vm);
 
     if (dconn == NULL) {
-        virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("Failed to connect to remote libvirt URI %s: %s"),
-                       dconnuri, virGetLastErrorMessage());
         return ret;
     }
 
index b9d7d582f572b7c07aa75837a34d64bcb8bc3eac..2635ef11624dab873a4705e9cf14a510e4c5d181 100644 (file)
@@ -5145,9 +5145,6 @@ qemuMigrationSrcPerformPeer2Peer(virQEMUDriver *driver,
         goto cleanup;
 
     if (dconn == NULL) {
-        virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("Failed to connect to remote libvirt URI %s: %s"),
-                       dconnuri, virGetLastErrorMessage());
         return -1;
     }