From patchwork Wed Jun 15 16:34:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 9178945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 824FA604DB for ; Wed, 15 Jun 2016 16:35:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7433E27D4A for ; Wed, 15 Jun 2016 16:35:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68DF127DF9; Wed, 15 Jun 2016 16:35:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF2F427D4A for ; Wed, 15 Jun 2016 16:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753160AbcFOQe6 (ORCPT ); Wed, 15 Jun 2016 12:34:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37924 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753117AbcFOQe6 (ORCPT ); Wed, 15 Jun 2016 12:34:58 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0A01C01AC56 for ; Wed, 15 Jun 2016 16:34:57 +0000 (UTC) Received: from steved.boston.devel.redhat.com.redhat.com (vpn-63-66.rdu2.redhat.com [10.10.63.66]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5FGYv0r016718 for ; Wed, 15 Jun 2016 12:34:57 -0400 From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH] systemd: Only start the rpc-gssd service when its enabled Date: Wed, 15 Jun 2016 12:34:56 -0400 Message-Id: <1466008496-9932-1-git-send-email-steved@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 15 Jun 2016 16:34:57 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When Kerberos is enabled, the /etc/krb5.keytab exists which causes the rpc-gssd to start, automatically. With rpc.gssd running, on all NFS mounts, an upcall is done to get GSS security context for SETCLIENTID procedure. When Kerberos is not configured for NFS, meaning there is no host/hostname@REALM principal in the key tab, those upcalls always fall causing the mount to hang for several seconds. This patch adds an [Install] section so the service can be enable and disable, so those errant upcalls can be stopped which eliminating the delay. Signed-off-by: Steve Dickson --- systemd/rpc-gssd.service | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/systemd/rpc-gssd.service b/systemd/rpc-gssd.service index d4a3819..df9f090 100644 --- a/systemd/rpc-gssd.service +++ b/systemd/rpc-gssd.service @@ -17,3 +17,9 @@ EnvironmentFile=-/run/sysconfig/nfs-utils Type=forking ExecStart=/usr/sbin/rpc.gssd $GSSDARGS + +# Only start if service is enabled +# and /etc/krb5.keytab exists +[Install] +WantedBy=multi-user.target +