From nobody Fri May 3 11:27:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1498231582225556.0127713222706; Fri, 23 Jun 2017 08:26:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB47A14286C; Fri, 23 Jun 2017 15:26:16 +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 5B9B96F9C1; Fri, 23 Jun 2017 15:26:16 +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 3E161260; Fri, 23 Jun 2017 15:26:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v5NFMi9w006901 for ; Fri, 23 Jun 2017 11:22:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 21F4353C43; Fri, 23 Jun 2017 15:22:44 +0000 (UTC) Received: from t460.redhat.com (ovpn-117-186.ams2.redhat.com [10.36.117.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id DDDEA53C69; Fri, 23 Jun 2017 15:22:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AB47A14286C Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AB47A14286C From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Fri, 23 Jun 2017 16:22:39 +0100 Message-Id: <20170623152239.17730-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] Improve logging of shutdown inhibitor 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 23 Jun 2017 15:26:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The log category for virnetdaemon.c was mistakenly set to rpc.netserver. Some useful info about the inhibitor file descriptor was also never logged. Signed-off-by: Daniel P. Berrange --- src/rpc/virnetdaemon.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c index 782417e..905cecc 100644 --- a/src/rpc/virnetdaemon.c +++ b/src/rpc/virnetdaemon.c @@ -47,7 +47,7 @@ =20 #define VIR_FROM_THIS VIR_FROM_RPC =20 -VIR_LOG_INIT("rpc.netserver"); +VIR_LOG_INIT("rpc.netdaemon"); =20 typedef struct _virNetDaemonSignal virNetDaemonSignal; typedef virNetDaemonSignal *virNetDaemonSignalPtr; @@ -460,9 +460,11 @@ virNetDaemonGotInhibitReply(DBusPendingCall *pending, DBUS_TYPE_INVALID)) { if (dmn->autoShutdownInhibitions) { dmn->autoShutdownInhibitFd =3D fd; + VIR_DEBUG("Got inhibit FD %d", fd); } else { /* We stopped the last VM since we made the inhibit call */ VIR_FORCE_CLOSE(fd); + VIR_DEBUG("Closing inhibit FD %d", fd); } } virDBusMessageUnref(reply); @@ -550,8 +552,10 @@ virNetDaemonRemoveShutdownInhibition(virNetDaemonPtr d= mn) =20 VIR_DEBUG("dmn=3D%p inhibitions=3D%zu", dmn, dmn->autoShutdownInhibiti= ons); =20 - if (dmn->autoShutdownInhibitions =3D=3D 0) + if (dmn->autoShutdownInhibitions =3D=3D 0) { + VIR_DEBUG("Closing inhibit FD %d", dmn->autoShutdownInhibitFd); VIR_FORCE_CLOSE(dmn->autoShutdownInhibitFd); + } =20 virObjectUnlock(dmn); } --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list