Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508284 - net-fs/nfs-utils-1.2.9-r2 - rpc-mountd.service does not use /etc/conf.d/nfs
Summary: net-fs/nfs-utils-1.2.9-r2 - rpc-mountd.service does not use /etc/conf.d/nfs
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-20 22:44 UTC by Xake
Modified: 2014-06-24 22:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2014-04-20 22:44:27 UTC
With nfs-utils-1.2.9-r2 the rpc-* does not answer to my tries to set the ports for the different rpc/nfs-daemons.

If I take a look at the service-files I can see that at least some services have had support for this:
--- rpc-mountd.service  2013-07-13 14:05:51.000000000 +0200
+++ rpc-mountd.service-r1       2014-02-01 20:01:36.000000000 +0100
@@ -4,9 +4,7 @@
 Requires=rpcbind.service nfsd.service

 [Service]
-Type=forking
-EnvironmentFile=/etc/conf.d/nfs
-ExecStart=/usr/sbin/rpc.mountd $OPTS_RPC_MOUNTD
+ExecStart=/usr/sbin/rpc.mountd -F

 [Install]
 WantedBy=multi-user.target


Why was these options removed? The ChangeLog mentions only two bugs as "improve unit files", and they are only referencing arch-linux and fedora, both distros who has the corresponding EnvironmentFile and $opst_* specified, nothing about that/why these options should be removed.

Please correct, and add
EnvironmentFile=-/etc/conf.d/nfs

along with the proper $OPTS_RPC_* for the different service files.
Comment 1 Alex Xu (Hello71) 2014-04-21 23:20:09 UTC
The recommended manner for configuring systemd units is with /etc/systemd/system.

Create a rpc-mountd.service file there or a rpc-mountd.service.d directory.
Comment 2 Xake 2014-04-22 21:14:22 UTC
(In reply to Alex Xu (Hello71) from comment #1)
> The recommended manner for configuring systemd units is with
> /etc/systemd/system.
> 
> Create a rpc-mountd.service file there or a rpc-mountd.service.d directory.

I know you can do it by creating a rpc-mountd.service or rpc-mountd.service.d to override things defined in /usr/lib/systemd/system.

However I have not seen anywhere that it is recommended to override instead of configure. Can you please point me towards that documentation?

That no other distribution does this, but uses EnvironmentFile instead for nfs-utils makes me less then convinced.

The only thing I can find that point towards your point is suggestions to not use /etc/sysconfig, /etc/conf.d or any other distribution specific place, nor any command flags in favor of having the daemons own configuration file setting this up, but since the nfs binaries does not have any configuration like that, and this only can be set by flags for the process, it does not seem to apply here.
Comment 3 Xake 2014-04-22 21:17:16 UTC
Also worth noting:

http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=9c85f3ee4ebbfef7fb10a964f26934e671517f00

The rpc-mountd.service added upstream seems to prefer env before overriding.
Comment 4 SpanKY gentoo-dev 2014-04-28 00:49:04 UTC
/etc/conf.d/ is for openrc only really, not systemd
Comment 5 Xake 2014-04-29 10:28:15 UTC
(In reply to SpanKY from comment #4)
> /etc/conf.d/ is for openrc only really, not systemd

First, is there a policy set for this? Is it documented anywhere with a preffered paths so I can file bugs against git-daemon@.service and apache2.service, two services that uses this? Is there a policy for how to handle start-parameters that you really want to be the same no matter what init-system you are using?


Secondly, about the question on how to add start-parameters to the daemon (which this really is about), will Gentoo use the upstream servicefiles (with or without /usr/lib/systemd/scripts/nfs-utils_env.sh [1]) or will you continue distribute our own? This question since:

(In reply to Alex Xu (Hello71) from comment #1)
> The recommended manner for configuring systemd units is with
> /etc/systemd/system.

And if the first case, from which file do you intend to pick up the start-parameters from?

[1] http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=blob;f=systemd/README
Comment 6 SpanKY gentoo-dev 2014-06-24 22:55:48 UTC
(In reply to Xake from comment #5)

nothing is really documented

with 1.3.0, the systemd services come from upstream nfs-utils.  maybe this is fixed, maybe it isn't.  not really sure.