From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1DB0B1389E0 for ; Mon, 27 Oct 2014 23:48:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 34570E090B; Mon, 27 Oct 2014 23:48:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 18783E0883 for ; Mon, 27 Oct 2014 23:48:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 12190340584 for ; Mon, 27 Oct 2014 23:48:04 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: 0.207 X-Spam-Level: X-Spam-Status: No, score=0.207 tagged_above=-999 required=5.5 tests=[AWL=1.293, BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_NUMERIC_HELO=1.164, RP_MATCHES_RCVD=-0.56, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_FSL_HELO_BARE_IP_2=0.01] autolearn=no Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W9RJqYoCUJoi for ; Mon, 27 Oct 2014 23:47:58 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4D5B1340581 for ; Mon, 27 Oct 2014 23:47:57 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xitzv-0003xW-Mz for gentoo-user@gentoo.org; Tue, 28 Oct 2014 00:46:51 +0100 Received: from 64.69.39.116 ([64.69.39.116]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 00:46:51 +0100 Received: from w41ter by 64.69.39.116 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 00:46:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: walt Subject: [gentoo-user] Re: [~amd64] NFS server broken again :( Date: Mon, 27 Oct 2014 16:46:30 -0700 Message-ID: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 64.69.39.116 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: X-Archives-Salt: 15bb5e02-36eb-4eba-8c44-577d82c807d5 X-Archives-Hash: 445f4e08a3bf8d4121cc702b3f35c69f On 10/27/2014 12:56 PM, Canek Peláez Valdés wrote: > On Mon, Oct 27, 2014 at 1:38 PM, walt wrote: >> Last night when I powered off my machines NFS was working perfectly. Today >> it's broken again for the nth time: >> >> #systemctl status nfs-server >> ● nfs-server.service - NFS server and services >> Loaded: loaded (/usr/lib64/systemd/system/nfs-server.service; enabled) >> Active: failed (Result: exit-code) since Mon 2014-10-27 11:50:38 PDT; 25min ago >> Process: 896 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS) >> Process: 893 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS) >> Process: 939 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=1/FAILURE) > I think I know the answer. Some days ago you moved /etc/conf.d for > NetworkManager to work, right? Where does the environment variable > RPCNFSDARGS is defined? I'm willing to bet that is in a /etc/conf.d > file. > > Could you please post here the contents of nfs-server.service, and if > it exists, the files inside /etc/systemd/system/nfs-server.service.d > and their contents? Bingo again :) Your question led me to the answer, which I think is a bug in /usr/lib64/systemd/system/nfs-server.service. Here's why the bug showed up just this morning: way back at the beginning of systemd I stole some .service files from RedHat Fedora, including one named 'nfs.service'. Turns out the foreign RedHat file was starting rpcbind for me all those months and, when I deleted it last night, rpcbind didn't get started this morning by nfs-server.service from gentoo (which I think is a bug). #cat nfs-server.service [Unit] Description=NFS server and services Requires= network.target proc-fs-nfsd.mount rpcbind.target Requires= nfs-mountd.service Wants=rpc-statd.service nfs-idmapd.service rpc-gssd.service rpc-svcgssd.service Wants=rpc-statd-notify.service After= network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.service After= nfs-idmapd.service rpc-statd.service After= rpc-gssd.service rpc-svcgssd.service Before= rpc-statd-notify.service [Service] EnvironmentFile=/etc/conf.d/nfs Type=oneshot RemainAfterExit=yes ExecStartPre=/usr/sbin/exportfs -r ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ExecStop=/usr/sbin/rpc.nfsd 0 ExecStopPost=/usr/sbin/exportfs -au ExecStopPost=/usr/sbin/exportfs -f ExecReload=/usr/sbin/exportfs -r [Install] WantedBy=multi-user.target I can see that rpcbind.target is Required, but NOT rpcbind.service. AFAICT rpc.target does nothing (please explain if I'm wrong about that). BTW, /etc/conf.d/nfs doesn't define RPCNFSDARGS because it is intended for use by openrc (another bug?): #cat /etc/conf.d/nfs # /etc/conf.d/nfs # If you wish to set the port numbers for lockd, # please see /etc/sysctl.conf # Optional services to include in default `/etc/init.d/nfs start` # For NFSv4 users, you'll want to add "rpc.idmapd" here. NFS_NEEDED_SERVICES="rpc.idmapd" # Number of servers to be started up by default OPTS_RPC_NFSD="8" # Options to pass to rpc.mountd # ex. OPTS_RPC_MOUNTD="-p 32767" OPTS_RPC_MOUNTD="" # Options to pass to rpc.statd # ex. OPTS_RPC_STATD="-p 32765 -o 32766" OPTS_RPC_STATD="" # Options to pass to rpc.idmapd OPTS_RPC_IDMAPD="" # Options to pass to rpc.gssd OPTS_RPC_GSSD="" # Options to pass to rpc.svcgssd OPTS_RPC_SVCGSSD="" # Options to pass to rpc.rquotad (requires sys-fs/quota) OPTS_RPC_RQUOTAD="" # Timeout (in seconds) for exportfs EXPORTFS_TIMEOUT=30 # Options to set in the nfsd filesystem (/proc/fs/nfsd/). # Format is