[Bug 1428961] Re: idmapd not started when booting under systemd
ganrald
ganrald at gmail.com
Sun Dec 13 21:59:04 UTC 2015
It looks like the current set-up in Ubuntu 15.10 where rpc.idmapd daemon
is started on the server only may be correct/intentional after all. I
did not find conclusive information, however this BSD idmapd man page
http://man7.org/linux/man-pages/man8/idmapd.8.html states:
"Note that on more recent kernels only the NFSv4 server uses rpc.idmapd.
The NFSv4 client instead uses nfsidmap(8), and only falls back to
rpc.idmapd if there was a problem running the nfsidmap(8) program."
Which seems to be intended solution in Ubuntu. In any case current
systemd configuration is a bit confusing. There are two idmap unit
files:
$ systemctl -a list-unit-files *idmap*
UNIT FILE STATE
idmapd.service masked
nfs-idmapd.service static
Normally one would expect that: idmapd.service starts rpc.idmapd
(instead this file is masked) and nfs-idmapd.service starts nfsidmap
(instead it starts rpc.idmapd). Of course the latter only before
realizing that nfsidmap is not a daemon and it does not need a unit
file.
I was able to get NFS4 to correctly map user names in Ubuntu 15.10 after updating /etc/idmapd.conf to explicitly define Domain parameter. Assuming my computer FQDN is nfsclient.lan I had to set:
# set your own domain here, if id differs from FQDN minus hostname
Domain = lan
In case one has a correctly configured DNS server this should apparently work out of the box with an implicit default setting; idmapd.conf man page states:
Domain The local NFSv4 domain name. An NFSv4 domain is a namespace with a unique username<->UID and group‐
name<->GID mapping. (Default: Host's fully-qualified DNS domain name)
Most likely it does not as the /etc/hosts contains an entry for the current machine without the domain name, as in:
127.0.0.1 localhost
127.0.1.1 nfsclient
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1428961
Title:
idmapd not started when booting under systemd
Status in nfs-utils package in Ubuntu:
Fix Released
Bug description:
Sorry for not getting a chance to test this before upload, but now
that nfs-utils has support for systemd in the archive, I've rebooted
and tested it on a system that uses nfs.
I find that the idmapd service is not being started on boot when
booting with systemd.
$ pidof rpc.idmapd
$ systemctl status nfs-idmapd -l
● nfs-idmapd.service - NFSv4 ID-name mapping service
Loaded: loaded (/lib/systemd/system/nfs-idmapd.service; static; vendor preset: enabled)
Active: inactive (dead)
Mar 05 22:31:24 virgil systemd[1]: Starting NFSv4 ID-name mapping service...
Mar 05 22:31:24 virgil systemd[1]: Started NFSv4 ID-name mapping service.
Mar 05 22:31:24 virgil systemd[1]: Unit nfs-idmapd.service is bound to inactive unit. Stopping, too.
Mar 05 22:31:24 virgil systemd[1]: Stopping NFSv4 ID-name mapping service...
Mar 05 22:31:24 virgil systemd[1]: Stopped NFSv4 ID-name mapping service.
$
Under upstart, it is started unconditionally, which is correct.
idmapd is used on both clients and servers, and should be started
whenever the nfs-common package is installed.
I'm not sure where the bug lies; I don't completely understand the
contents of /lib/systemd/system/nfs-idmapd.service. The 'BindsTo=nfs-
server.service' appears to be imply that it will only be started when
nfs-server is started, and stopped when nfs-server is stopped, which
is certainly incorrect.
gssd is client-side only; idmapd and statd are used on both client and
server and should be started unconditionally in nfs-common, AIUI.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: nfs-common 1:1.2.8-9ubuntu4
ProcVersionSignature: Ubuntu 3.19.0-7.7-generic 3.19.0
Uname: Linux 3.19.0-7-generic x86_64
ApportVersion: 2.16.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Mar 5 22:36:57 2015
InstallationDate: Installed on 2010-09-24 (1624 days ago)
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
SourcePackage: nfs-utils
UpgradeStatus: Upgraded to vivid on 2014-12-06 (90 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1428961/+subscriptions
More information about the foundations-bugs
mailing list