Summary: | net-fs/nfs-utils-1.3.1-r5 ships systemd service files with invalid references to environment variables | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Łukasz Stelmach <stlman> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | aklhfex, alex3255, leho, maxime.deroucy, systemd |
Priority: | Normal | Keywords: | PATCH |
Version: | 10.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Edit environment variable names to march conf.d/nfs |
Description
Łukasz Stelmach
2015-03-28 16:10:31 UTC
Created attachment 399964 [details, diff]
Edit environment variable names to march conf.d/nfs
*** Bug 538780 has been marked as a duplicate of this bug. *** This is definitely real and the patch is correct. I'm running my nfs server with the updated env variables for several months now. (In reply to Leho Kraav (:macmaN @lkraav) from comment #3) > This is definitely real and the patch is correct. I'm running my nfs server > with the updated env variables for several months now. Yeah, same things here, variables in /etc/conf.d/nfs are irrelevant to those actually passed to the systemd service file. Also it seems like there are missing one crucial dependency, during nfs-server.service activation rpc_pipefs should be mounted, so I suggest to also add to the nfs-server.service file next lines: Requires=var-lib-nfs-rpc_pipefs.mount After=var-lib-nfs-rpc_pipefs.mount Using /etc/conf.d/nfs is not an option. That's a step backward and violates our policy. We should instead set a reasonable default for RPCNFSDARGS in a systemd drop-in file. I agree This won't make /etc/conf.d/nfs relevant on systems with systemd anyway. Any progress on this ? Maybe use something like this as an drop-in replacement for systemd: /etc/systemd/system/nfs-server.service.d/00gentoo.conf: [Service] Environment="RPCNFSDARGS=-v" Environment="RPCIDMAPDARGS=-v" Environment="SVCGSSDARGS=-v" Environment="RPCMOUNTDARGS=-v" Environment="STATDARGS -v" Environment="GSSDARGS -v" And change the EnvironmentFile=/etc/conf.d/nfs in all nfs-related unit files to EnvironmentFile=/etc/systemd/system/nfs-server.service.d/00gentoo.conf Sorry i forgot to add '=' in the last 2 Environment= lines. It seems like nfs-utils-2.3.1-r3 added the possibility to specify certain options for most of the rpc.* daemons in a central (distribution-independent) /etc/nfs.conf file. Here's an excerpt from man rpc.nfsd: <-- excerpt ..... CONFIGURATION FILE Many of the options that can be set on the command line can also be controlled through values set in the [nfsd] section of the /etc/nfs.conf configuration file. Values recognized include: threads The number of threads to start. host A host name, or comma separated list of host names, that rpc.nfsd will listen on. Use of the --host option replaces all host names listed here. ...... ...... --> excerpt AFAICS, rpc.gssd, rpc.mountd rpc.svcgssd rpc.idmapd options can all be set in /etc/nfs.conf. Check your manpages ! Tyvm Chris. After 1hr of head-scratching and finally arriving at your message, I was able to migrate my custom port configuration over from `/etc/conf.d/nfs -> /etc/nfs.conf` ``` leho@gusto /etc $ cat nfs.conf [mountd] port = 32767 [statd] port = 32765 outgoing-port = 32766 ``` |