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 AD6021389E3 for ; Tue, 28 Oct 2014 02:49:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D10C1E090B; Tue, 28 Oct 2014 02:49:17 +0000 (UTC) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 80B20E08F9 for ; Tue, 28 Oct 2014 02:49:16 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id l4so1730512lbv.4 for ; Mon, 27 Oct 2014 19:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=0Va7DCR4pRi4EgOWG2IpFRFCClaOuno9BvmhpZtwX5A=; b=qGiXyT9sbrgEabszKLKqIrME2Q1uwz800el8s72PMaoTg0uWU96myvhO4S0Dfg2i7o XyP59BL+Q0bCQ1EmD3b9Fz2tbKgr7H+/DtuUdj/is6BTCpdB+WOCrOx39FAA/bh3YHl6 VcOouivYfU1ZZyIbAWLvs53z4ewuUA8Aos7IM52oVsh3FE5jVCa0gfQxSGo1Ek/LhSeX Oq08DumoEVyvUxI/+Pc2HgJhRvo3eNsVt0ZF9nRTvKicjnEH8MiwQiWvjOMRaLWQK5tO Xh+mIsVJ+AaSAnpjZeO2ZrAO00yESWG5wJb7K7yrAo2JxCnBQ44mGerhRPI6lPYe84Xy ljXA== 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 X-Received: by 10.112.141.104 with SMTP id rn8mr344124lbb.87.1414464554479; Mon, 27 Oct 2014 19:49:14 -0700 (PDT) Received: by 10.152.22.168 with HTTP; Mon, 27 Oct 2014 19:49:14 -0700 (PDT) In-Reply-To: References: Date: Mon, 27 Oct 2014 22:49:14 -0400 Message-ID: Subject: Re: [gentoo-user] Re: [~amd64] NFS server broken again :( From: Tom H To: Gentoo User Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 1d171e8e-e6f0-4835-a6c2-bb193433fff4 X-Archives-Hash: 361800f0fdd9d691ba210cce85a1fd69 On Mon, Oct 27, 2014 at 7:46 PM, walt wrote: > On 10/27/2014 12:56 PM, Canek Pel=C3=A1ez Vald=C3=A9s wrote: >> On Mon, Oct 27, 2014 at 1:38 PM, walt wrote: >>> >>> Last night when I powered off my machines NFS was working perfectly. T= oday >>> it's broken again for the nth time: >>> >>> #systemctl status nfs-server >>> =E2=97=8F nfs-server.service - NFS server and services >>> Loaded: loaded (/usr/lib64/systemd/system/nfs-server.service; enable= d) >>> Active: failed (Result: exit-code) since Mon 2014-10-27 11:50:38 PDT= ; 25min ago >>> Process: 896 ExecStopPost=3D/usr/sbin/exportfs -f (code=3Dexited, sta= tus=3D0/SUCCESS) >>> Process: 893 ExecStopPost=3D/usr/sbin/exportfs -au (code=3Dexited, st= atus=3D0/SUCCESS) >>> Process: 939 ExecStart=3D/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=3Dexit= ed, status=3D1/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 bu= g > in /usr/lib64/systemd/system/nfs-server.service. > > Here's why the bug showed up just this morning: way back at the beginnin= g > of systemd I stole some .service files from RedHat Fedora, including one > named 'nfs.service'. Both RH and Gentoo have now adopted the upstream systemd units, which don't include "nfs.service". But RH creates an "nfs.service" alias to "nfs-server.service" so as not to upset RHEL sysadmin muscle memory and scripts. > 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). Does rpcbind.target exist? Does rpcbind.service have a "Requires" or "Wants" for rpcbind.target? Is rpcbind.service enabled? > #cat nfs-server.service > [Unit] > Description=3DNFS server and services > Requires=3D network.target proc-fs-nfsd.mount rpcbind.target > Requires=3D nfs-mountd.service > Wants=3Drpc-statd.service nfs-idmapd.service rpc-gssd.service rpc-svcgssd= .service > Wants=3Drpc-statd-notify.service > > After=3D network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.serv= ice > After=3D nfs-idmapd.service rpc-statd.service > After=3D rpc-gssd.service rpc-svcgssd.service > Before=3D rpc-statd-notify.service > > [Service] > EnvironmentFile=3D/etc/conf.d/nfs > > Type=3Doneshot > RemainAfterExit=3Dyes > ExecStartPre=3D/usr/sbin/exportfs -r > ExecStart=3D/usr/sbin/rpc.nfsd $RPCNFSDARGS > ExecStop=3D/usr/sbin/rpc.nfsd 0 > ExecStopPost=3D/usr/sbin/exportfs -au > ExecStopPost=3D/usr/sbin/exportfs -f > > ExecReload=3D/usr/sbin/exportfs -r > > [Install] > WantedBy=3Dmulti-user.target > > I can see that rpcbind.target is Required, but NOT rpcbind.service. AFAIC= T > 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?): I don't have access to a Gentoo box with nfs at the moment in order to check this but IIRC Gentoo used to use OPTS_RPC_NFSD, OPTS_RPC_MOUNTD, OPTS_RPC_STATD but it's now using upstream's RPCNFSDARGS, RPCMOUNTDARGS, STATDARGS, at least in its systemd units. Again IIRC the ebuild only changes the upstream "EnvironmentFile=3D" value and deep-sixes nfs-config.service. > #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=3D"rpc.idmapd" > > # Number of servers to be started up by default > OPTS_RPC_NFSD=3D"8" > > # Options to pass to rpc.mountd > # ex. OPTS_RPC_MOUNTD=3D"-p 32767" > OPTS_RPC_MOUNTD=3D"" > > # Options to pass to rpc.statd > # ex. OPTS_RPC_STATD=3D"-p 32765 -o 32766" > OPTS_RPC_STATD=3D"" > > # Options to pass to rpc.idmapd > OPTS_RPC_IDMAPD=3D"" > > # Options to pass to rpc.gssd > OPTS_RPC_GSSD=3D"" > > # Options to pass to rpc.svcgssd > OPTS_RPC_SVCGSSD=3D"" > > # Options to pass to rpc.rquotad (requires sys-fs/quota) > OPTS_RPC_RQUOTAD=3D"" > > # Timeout (in seconds) for exportfs > EXPORTFS_TIMEOUT=3D30 > > # Options to set in the nfsd filesystem (/proc/fs/nfsd/). > # Format is