> Can I add that the problem also exists on my machine, with nfs-common and
> autofs as the
> dependent services?
>
> My home directories are automounted from an NFS server, but lately I have to
> manually
> restart rpcbind and nfs-common before my NFS client finally connects. Reading
> the
> output of systemctl status nfs-common shows that nfs-common fails to
> correctly start
> because rpcbind isn't running, and just restarting nfs-common does nothing
> for rpcbind.
On my machine I discovered this in the logs:
Jan 26 14:40:14 xx systemd[1]: nfs-common.service: Found ordering cycle on
nfs-common.service/start
Jan 26 14:40:14 xx systemd[1]: nfs-common.service: Found dependency on
rpcbind.target/start
Jan 26 14:40:14 xx systemd[1]: nfs-common.service: Found dependency on
rpcbind.service/start
Jan 26 14:40:14 xx systemd[1]: nfs-common.service: Found dependency on
rpcbind.socket/start
Jan 26 14:40:14 xx systemd[1]: nfs-common.service: Found dependency on
sysinit.target/start
Jan 26 14:40:14 xx systemd[1]: nfs-common.service: Found dependency on
nfs-common.service/start
Jan 26 14:40:14 xx systemd[1]: nfs-common.service: Breaking ordering cycle
by deleting job rpcbind.target/start
Jan 26 14:40:14 xx systemd[1]: rpcbind.target: Job rpcbind.target/start
deleted to break ordering cycle starting with nfs-comm
Since DefaultDependencies is not disabled, rpcbind.socket ends up
depending on sysinit.target. From the above one can see a cycle forming,
which is (correctly) solved by throwing out one of the offending units.
DefaultDependencies should be set to 'no' for early boot, as is the case
for the provided rpcbind.service file. Also rpcbind.socket needs to be
updated with these, i.e. by modifying the following lines in its unit
section:
[Unit]
DefaultDependencies=no
Conflicts=shutdown.target
Before=shutdown.target
After=systemd-tmpfiles-setup.service
The easiest way of applying the modification is to add the above lines
to a .conf file in the /etc/systemd/system/rpcbind.socket.d/ directory.
This solved my problem of unmounted krb5p secured NFS /home and other
directories on bootup.
HTH.