From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9B02C4727E for ; Wed, 23 Sep 2020 14:41:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6601F206FB for ; Wed, 23 Sep 2020 14:41:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fieldses.org header.i=@fieldses.org header.b="hiHp4vDx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726825AbgIWOlC (ORCPT ); Wed, 23 Sep 2020 10:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726755AbgIWOk5 (ORCPT ); Wed, 23 Sep 2020 10:40:57 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AB5EC0613CE for ; Wed, 23 Sep 2020 07:40:57 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id C0B7B425E; Wed, 23 Sep 2020 10:40:56 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org C0B7B425E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1600872056; bh=wQ3ySGQ3qI9b/NbrCMX0I7wrhr4hVkVvhoRW64zTCYc=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=hiHp4vDxF3twvp3DyhDbGy2GB3DAp9U/YBNBtVREk2jruYG8VxaXAusSXU51Yc5QR 0qHQFZ2WhyV9G78I4ttIgzSTHvX7pZcLYDaptcEganQ+jBVO1QUbSNM05siL0uVatY tMgKf7Vw3ZP4fGj9rlEroWXWLuxSEZj86Pgqrc/8= Date: Wed, 23 Sep 2020 10:40:56 -0400 To: Chris Hall Cc: linux-nfs@vger.kernel.org Subject: Re: mount.nfs4 and logging Message-ID: <20200923144056.GB4691@fieldses.org> References: <20200919163353.GA15785@fieldses.org> <20200919164020.GB15785@fieldses.org> <12298172-f830-4f22-8612-dfbbc74b8a40@gmch.uk> <20200920193245.GC28449@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Sep 21, 2020 at 03:40:01PM +0100, Chris Hall wrote: > On 20/09/2020 20:32, J. Bruce Fields wrote: > >On Sun, Sep 20, 2020 at 10:56:28AM +0100, Chris Hall wrote: > ... > >>Where nfsdcld, rpc.idmapd and rpc.mountd have indeed been started > >>but are not bound to any ports. > > >That looks good. (And rpc.mountd does still serve a purpose in the > >NFSv4 case, answering requests from the kernel for information related > >to exported filesystems.) > > >>But rpc.statd and rpcbind have also been started, and various ports > >>have been opened, including port 111 which is bound to systemd. Is > >>there a way to inhibit that for nfs4 only ? > > >Unlike rpc.mountd, there's no reason for those to be running at all. > >You can mask thoe corresponding systemd units. > > I tried masking all of: rpcbind.socket, rpcbind.service, > statd.service and statd-notify.service. systemctl start > nfs-server.service (eventually) gives, according to the logging: > > nfs-mountd.service: start operation timed out. Terminating. > nfs-mountd.service: State 'stop-sigterm' timed out. Killing. > nfs-mountd.service: Killing process x (rpc.mountd) with signal SIGKILL. > nfs-mountd.service: Control process exited, code=killed, status=9/KILL Huh, that suggests rpc.mountd is trying to contact rpcbind, but if you've got v2/v3 turned off in the configuration files, it shouldn't be trying to register anything. Looking at the code.... I wonder if the problem is the unregistration added by 849b7072a049 "mountd: Clear mountd registrations at start up"? > If I unmask rpcbind.service, I can start nfs-server. It no longer > starts rpc.statd. But I still have rpcbind running and port 111 > open. > > >It'd be nice if there was a way to make that happen automatically if v2 > >and v3 are configured out in the configuration files, but I don't know > >how to make that happen. > > It would and me neither. I suppose they could check the configuration and exit on startup if they see they're not needed. Will systemd notice they died and try to restart them or something? --b.