From nobody Thu May 2 22:40:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=nutanix.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1641462600390106.40444548516916; Thu, 6 Jan 2022 01:50:00 -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-175-YZLzYlEUO_-kpGo9J0c87Q-1; Thu, 06 Jan 2022 04:49:55 -0500 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 346593487A; Thu, 6 Jan 2022 09:49:50 +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 B2AB9106A026; Thu, 6 Jan 2022 09:49:49 +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 CCF201802E2C; Thu, 6 Jan 2022 09:49:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 2061XRIo007300 for ; Wed, 5 Jan 2022 20:33:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id A63A11400E73; Thu, 6 Jan 2022 01:33:27 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A07AE1402409 for ; Thu, 6 Jan 2022 01:33:27 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 86A73811E76 for ; Thu, 6 Jan 2022 01:33:27 +0000 (UTC) Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com [148.163.151.68]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-531-n7BRbMOaMFSsbMr1NF2FpA-1; Wed, 05 Jan 2022 20:33:25 -0500 Received: from pps.filterd (m0127837.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 205N5fHP019188 for ; Wed, 5 Jan 2022 17:33:24 -0800 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3ddmq006dq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 05 Jan 2022 17:33:24 -0800 Received: from BL3PR02MB7938.namprd02.prod.outlook.com (2603:10b6:208:355::20) by BL0PR02MB4675.namprd02.prod.outlook.com (2603:10b6:208:5c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.15; Thu, 6 Jan 2022 01:33:22 +0000 Received: from BL3PR02MB7938.namprd02.prod.outlook.com ([fe80::3c2f:b2dd:a0b5:74da]) by BL3PR02MB7938.namprd02.prod.outlook.com ([fe80::3c2f:b2dd:a0b5:74da%6]) with mapi id 15.20.4867.009; Thu, 6 Jan 2022 01:33:22 +0000 X-MC-Unique: YZLzYlEUO_-kpGo9J0c87Q-1 X-MC-Unique: n7BRbMOaMFSsbMr1NF2FpA-1 From: Raphael Norwitz To: "libvir-list@redhat.com" Subject: [RFC] qemu_migration: Fix virConnectOpenAuth error code Thread-Topic: [RFC] qemu_migration: Fix virConnectOpenAuth error code Thread-Index: AQHYAp1krR/0AUZuUk2fn/nvzHQi+A== Date: Thu, 6 Jan 2022 01:33:22 +0000 Message-ID: <20220106013316.18264-1-raphael.norwitz@nutanix.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8cdde702-8c7b-40e4-b000-08d9d0b4870c x-ms-traffictypediagnostic: BL0PR02MB4675:EE_ x-microsoft-antispam-prvs: x-proofpoint-crosstenant: true x-ms-oob-tlc-oobclassifiers: OLM:119 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0 x-microsoft-antispam-message-info: z8D+qnBeSnRPosiINeQj+qNuKkVvNe9PO6FPK6V9582nf7bFi6U1kip+0VQsGQGKzLS7q0jWDBVKofDQKO4HTWDu+ZZsoqVwoqjNRWylnbD0spf142WEXgpSAMe7doWwRB+ZPFIBBkYxB6qQnhJT9J4vO6AsCyaOpGJtC9Hton06xBt5230Qm3qkfDlPthiZKIlxLVoDuUH1TnXu6fnyT/MCdem5wk6IJcXM/jvlsDZFYaD6eO2WGkXw+G4r1II4bRXp3hvSnpTT8Ci/f1VBshoOE7GJF+yphK1FD0RR4owctzPfirugWvtVlkhp375fenMtNUka5EBfPV3sF/Pf2sgjdxaw0J4NKLnc5IMJvo+y6KbKpl7n9YgHRVdtx1kPVqgkFgmhop0WYgRJPJP9hQsGHSbE8NKZWZXQBs6Tuf2tSXP9bNbjxUP6gwfdURfWkml2f+8QarfY1HQv5iufgtZXyUvY6RgXAndCgX6Z/c5j+bh9gVNKkXmHP3fmzpczPquBYigqdlhAEPVJYoWcnVP5Ws0YI3Zq0piqaaxnbCfhSGS4cBILLeQJioNMz24UcoHZpw1iAGebCLcFxlH2efAD+g5Jty865KcJoqzNc81VOw58O1Etl9JetUjD17vzz/rZerf2gm/DKKSdREw1dYfmlhjecCaTvqSf6KUUtLiZpHq04uLaH3ig8+8w1awnu/OEdfhtXnLw19Ziy0hFdvaUm5qVhaM/qVugEJQqur0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL3PR02MB7938.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(1076003)(6916009)(38100700002)(54906003)(2906002)(316002)(6512007)(6486002)(8936002)(38070700005)(8676002)(122000001)(4326008)(508600001)(36756003)(107886003)(5660300002)(91956017)(66446008)(66556008)(71200400001)(66476007)(83380400001)(186003)(26005)(6506007)(2616005)(86362001)(4744005)(44832011)(66946007)(64756008)(76116006)(145543001); DIR:OUT; SFP:1102 x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?ZmxM6PSF6SG7Cf40c2XGkU8l9IiepIiV35WmUy07aGGLZRTAXtd7J/0JwL?= =?iso-8859-1?Q?YXOBbyK7a0apdXw2uFlOfutkJc6y0QzecW4DqZP5GOMVe0KmLf1XLOjx2/?= =?iso-8859-1?Q?PMnZDzj6xF0x0LPiCN538fVIKvmYpDZ7pI3X6nBccXK4+ADL/Qqg4dMJ4X?= =?iso-8859-1?Q?uh09p/CiZvU1BaANfq8zl1XCx5SPWgugkWHltaJLL2nnOO3nS0bNN/8uD7?= =?iso-8859-1?Q?Iv3Q61QLTxKBUkurYi8FnYjdKyrhex6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iso-8859-1?Q?wZ6bLqK3YDQkb3inQ1wDXqDMNdbD95kRS1bkUUCM/kU/31H8gwIPlKyoLR?= =?iso-8859-1?Q?Zbo44eK3RZR+Z0sYS645goH1uruUwKyHweWAqKpBF8R93NKJUqkJzJXhWx?= =?iso-8859-1?Q?bcXpYNUzOLngBBLQltzpvJlctqpl+KRId1f/rUi3wPpfBPnFLh2lybnvCm?= =?iso-8859-1?Q?dOlxfjXF5Krry68bHj3JMcKkgfRkijUpB4yUHfEllZDgnT+PBJ7igtS5Ym?= =?iso-8859-1?Q?xErnDZX4Y07rVIPYq6467cikAFAM+omu2wL1b0qeHvwx+ty7k2cDkTZykz?= =?iso-8859-1?Q?pWIQX+QpBQFnxhV691mM+xeAbZvC25FlN9N6CxNavoIAUtwjF3LdkF9Q2U?= =?iso-8859-1?Q?x+EEmTqxrTdMUu4vx/DZNTh6/+ngXxNoOUfgj/n6oe9QD9NLzeXN/NmA/x?= =?iso-8859-1?Q?mO7+hx6hzoMdqdmGDckj3ecPR+ewzpeGxAovcHXBhxT2GXYWDqD76O47IA?= =?iso-8859-1?Q?IJ234XsTa0yZahdGo9mBLIMfU2e7TxJjR0Scf2RViqSOac9XnWUpZAbBVf?= =?iso-8859-1?Q?m3irJnBod4DmzgzWh9V7FLf+uyQJWlH28RdEW2G/mpXzn9DBY9BIEyGs7C?= =?iso-8859-1?Q?DFrZSJSje0PeBZDyfU9NJ5WpI=3D?= MIME-Version: 1.0 X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL3PR02MB7938.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cdde702-8c7b-40e4-b000-08d9d0b4870c X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jan 2022 01:33:22.7144 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: P1ikm948IYI+52ibFtQaUw0vi5hOWt+gBDg/+6TEsJHKA/yQ/BCKcuafE2kL2tD7cI4aneuKeoiGBz/iFQg7Lhy5kL+UNYRuNIjIrGClERI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB4675 X-Proofpoint-GUID: ISwLKe3P_Tczm-u29g5YfEzlfXJpWJxA X-Proofpoint-ORIG-GUID: ISwLKe3P_Tczm-u29g5YfEzlfXJpWJxA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205, Aquarius:18.0.790, Hydra:6.0.425, FMLib:17.11.62.513 definitions=2022-01-05_08,2022-01-04_01,2021-12-02_01 X-Proofpoint-Spam-Reason: safe 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.85 on 10.11.54.7 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 2061XRIo007300 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Thu, 06 Jan 2022 04:49:47 -0500 Cc: John Levon , Bhuvnesh Jain , Raphael Norwitz 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 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-Language: en-US Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1641462602192100003 Content-Type: text/plain; charset="utf-8" Today if virConnectOpenAuth fails, qemuMigrationSrcPerformPeer2Peer() returns VIR_ERR_OPERATION_FAILED. This change switches that error code to VIR_ERR_NO_CONNECT, which is more accurate. This should help libvirt consumers more intellegently retry migrations on intermittent connection failures. CC: Bhuvnesh Jain Suggested-by: John Levon Signed-off-by: Raphael Norwitz --- src/qemu/qemu_migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index b9d7d582f5..f7ced209a4 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -5145,7 +5145,7 @@ qemuMigrationSrcPerformPeer2Peer(virQEMUDriver *drive= r, goto cleanup; =20 if (dconn =3D=3D NULL) { - virReportError(VIR_ERR_OPERATION_FAILED, + virReportError(VIR_ERR_NO_CONNECT, _("Failed to connect to remote libvirt URI %s: %s"), dconnuri, virGetLastErrorMessage()); return -1; --=20 2.20.1