Okay, sorry for the delay. It took me sometime to review all SysV, Upstart scripts and Systemd unit files. What "linuxball" said is correct, we're missing rpcbind dependency for nfs-mountd.service.
Since the services run in parallel there is an window of opportunity for "nfs-mountd.service" to be started before "rpcbind.target".
Only problem is that rpcbind.target is for synchronization with SysV scripts:
rpcbind.target
The portmapper/rpcbind pulls in this target and orders itself before it, to indicate its availability. systemd automatically adds dependencies of type After= for this target unit to all SysV init script service units with an LSB header referring to the "$portmap" facility.
For all NFS daemons depending on rpcbind to be fully operational, since the systemd generators would take also care of SysV script dependencies (allegedly if rpcbind is started through SysV generator).
The thing is that, this upstream discussion has taken place:
I think I should move on and "cherry-pick" this change as well. Upstream "Linux NFS" changed the dependency from "target" to "service" - which makes perfectly sense based on the explanation from Neil Brown.
I'm providing a PPA soon and will ask for feedback and, at the same time, I'll attach this small fix as a debdiff proposal for sponsors team to upload it to -propose if your feedback is good. I'd like to ask you to reproduce the issue and to make sure issue is gone with the package I'll provide.
Sorry for the amount of time this bug was opened without a fix. I think it never gained much traction because the workaround as simple so people had stick with the workaround you guys provided.
Jeroen, if you want to understand how Ubuntu development works, specifically for fixes you can read this Wiki: https://wiki.ubuntu.com/StableReleaseUpdates.
Okay, sorry for the delay. It took me sometime to review all SysV, Upstart scripts and Systemd unit files. What "linuxball" said is correct, we're missing rpcbind dependency for nfs-mountd.service.
# nfs-server.service
[Unit]
...
Requires= network.target proc-fs-nfsd.mount rpcbind.target
Requires= nfs-mountd.service
Wants= nfs-idmapd.service
After= local-fs.target notify. service
After= network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.service
After= nfs-idmapd.service rpc-statd.service
Before= rpc-statd-
Wants=auth- rpcgss- module. service gssd.service rpc-svcgssd.service
After=rpc-
Before= remote- fs-pre. target
Wants=nfs- config. service config. service
After=nfs-
As it stands, "rpcbind.target is being put as a dependency and to run before "nfs-server. service" but not before "nfs-mountd. service" :
[Unit] proc-fs- nfsd.mount fs-nfsd. mount target local-fs.target nfs-server. service
...
Requires=
After=proc-
After=network.
BindsTo=
Wants=nfs- config. service config. service
After=nfs-
Since the services run in parallel there is an window of opportunity for "nfs-mountd. service" to be started before "rpcbind.target".
Only problem is that rpcbind.target is for synchronization with SysV scripts:
rpcbind.target
The portmapper/rpcbind pulls in this target and orders itself before it, to indicate its availability. systemd automatically adds dependencies of type After= for this target unit to all SysV init script service units with an LSB header referring to the "$portmap" facility.
Right now we have:
system/ nfs-server. service: Requires= ... rpcbind.target nfs-server. service: After= ... rpcbind.target ... rpc-statd. service: Requires= ... rpcbind.target rpc-statd. service: After= ... rpcbind.target
system/
system/
system/
So the correct fix would be:
Wants= ... rpcbind.target
After= ... rpcbind.target
For all NFS daemons depending on rpcbind to be fully operational, since the systemd generators would take also care of SysV script dependencies (allegedly if rpcbind is started through SysV generator).
The thing is that, this upstream discussion has taken place:
https:/ /patchwork. kernel. org/patch/ 8976701/
I think I should move on and "cherry-pick" this change as well. Upstream "Linux NFS" changed the dependency from "target" to "service" - which makes perfectly sense based on the explanation from Neil Brown.
I'm providing a PPA soon and will ask for feedback and, at the same time, I'll attach this small fix as a debdiff proposal for sponsors team to upload it to -propose if your feedback is good. I'd like to ask you to reproduce the issue and to make sure issue is gone with the package I'll provide.
Sorry for the amount of time this bug was opened without a fix. I think it never gained much traction because the workaround as simple so people had stick with the workaround you guys provided. /wiki.ubuntu. com/StableRelea seUpdates.
Jeroen, if you want to understand how Ubuntu development works, specifically for fixes you can read this Wiki: https:/
Will get back to this today.