From nobody Sat Apr 27 04:10:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1600275973; cv=none; d=zohomail.com; s=zohoarc; b=NbEymx+Z4vL68URzF9xnfMiyAL2SQMbCFyr0qL/g6Tym3fQm2ShTKYI+3wbKhrqnb0uK2RkWq1eb9lsGQs5y5NnpRcH13TvCtmepmRcArbZSMvdSLFjL9ms1nxSBv5WLKQwWVfI+wMSNZ+I3O3tDuf0h9rpeSPMu9lNXi+axXIA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600275973; 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=bPWuaup/2wSNtSRiupaySGosvmBTWz636rO+fJax2H0=; b=Fb/RlmPP458zxBpXOfQX6QSzbMV9/MFNhrgicy17RlNjDoBFy0kxJnLChlJTitiQln4C1rHQRQL1ejdapTVJrhzYm7PdxabrQAJaHh3Br6NwCk91qc8RKh717dzFpxrGBSXIJQ7ET5H3/qnPuPwl/cVWGeJhq9UMWxj8t5R7iv4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1600275973945659.6903317634299; Wed, 16 Sep 2020 10:06:13 -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-246-fSZrZQF0M_uI9-Px37j0Iw-1; Wed, 16 Sep 2020 13:06:08 -0400 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 9474D1018722; Wed, 16 Sep 2020 17:06:02 +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 6A6B660BFA; Wed, 16 Sep 2020 17:06:02 +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 2CC6144A6A; Wed, 16 Sep 2020 17:06:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08GH60pn001829 for ; Wed, 16 Sep 2020 13:06:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 215E419D6C; Wed, 16 Sep 2020 17:06:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-113-248.ams2.redhat.com [10.36.113.248]) by smtp.corp.redhat.com (Postfix) with ESMTP id 373C719D61; Wed, 16 Sep 2020 17:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600275972; 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=bPWuaup/2wSNtSRiupaySGosvmBTWz636rO+fJax2H0=; b=Cw+9+bGNzmeB4E0GCSSN2HMK0Hfh2CsNX/3SPJZr8hODxJxnuxFnP6Qfouv853Gek9iRgL L3J2IiF2fZ1ws2vLSi4nXYHnEngl/S6ZZk9ttAEE6n3S9a4JYZQDAZu4skdkt/bAL3/Lx7 0Bz66AEYMtEtnlrqV1IRGy5cjCw6qo4= X-MC-Unique: fSZrZQF0M_uI9-Px37j0Iw-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] remote: slightly improve debugging of socket selection Date: Wed, 16 Sep 2020 18:05:55 +0100 Message-Id: <20200916170555.1564950-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The current debug message reports the "mode" after selection has completed, however, the "mode" value can be changed by the selection logic. It is thus beneficial to report most values upfront, and only report newly changed values at the end. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Andrea Bolognani --- src/remote/remote_sockets.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/remote/remote_sockets.c b/src/remote/remote_sockets.c index 7c69ed9e7f..478c78edc2 100644 --- a/src/remote/remote_sockets.c +++ b/src/remote/remote_sockets.c @@ -145,6 +145,11 @@ remoteGetUNIXSocket(remoteDriverTransport transport, g_autofree char *direct_sock_name =3D NULL; g_autofree char *legacy_sock_name =3D NULL; =20 + VIR_DEBUG("Choosing remote socket for transport=3D%s mode=3D%s driver= =3D%s ro=3D%d session=3D%d", + remoteDriverTransportTypeToString(transport), + remoteDriverModeTypeToString(mode), + driver, ro, session); + if (driver) direct_daemon =3D g_strdup_printf("virt%sd", driver); =20 @@ -208,12 +213,9 @@ remoteGetUNIXSocket(remoteDriverTransport transport, return NULL; } =20 - VIR_DEBUG("Chosen UNIX sockname=3D%s daemon=3D%s " - "for mode=3D%s transport=3D%s ro=3D%d session=3D%d", + VIR_DEBUG("Chosen UNIX sockname=3D%s daemon=3D%s with mode=3D%s", sock_name, NULLSTR(*daemon), - remoteDriverModeTypeToString(mode), - remoteDriverTransportTypeToString(transport), - ro, session); + remoteDriverModeTypeToString(mode)); return sock_name; } =20 --=20 2.26.2