Page MenuHomeFreeBSD

fix mountcritremote so that the NFSv4 callback daemon will start before NFS mounts are done
ClosedPublic

Authored by rmacklem on Dec 8 2020, 2:01 AM.

Details

Summary

Although it is not often needed, the nfscbd(8) should be running when
NFSv4 mounts are done if callback functionality is required.
Callback functionality is required for the NFSv4 server to issue
delegations or pNFS layouts.

This patch adds nfscbd to the mountcritremote's REQUIRED line
to ensure it is started before NFS mounts specified in /etc/fstab
are done.

Test Plan

Tested using a NFSv4.2 mount entry in /etc/fstab.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Hmm, so this functionality broken at the moment and this patch fixes it?

Well, the nfscbd should definitely be done before mountcritremote.
I have not seen evidence that this does not happen, but nothing I
know of forces the ordering.

I'll admit I have no idea what determines the ordering of when rc.d
scripts get done when there is no :REQUIRED" constraints.
(Just the order the names are returned by readdir()?)

Well, the nfscbd should definitely be done before mountcritremote.
I have not seen evidence that this does not happen, but nothing I
know of forces the ordering.

If that's the case let's commit!

I'll admit I have no idea what determines the ordering of when rc.d
scripts get done when there is no :REQUIRED" constraints.
(Just the order the names are returned by readdir()?)

So, let's take a look:

$ rcorder -p * | grep -E 'mountcritremote|nfscbd'
mountcritremote kdc iscsid nfsuserd kfd pppoed
virecover gptboot kpasswdd newsyslog tmp accounting hostapd motd ipropd_master ipropd_slave kadmind devfs os-release archdep wpa_supplicant dmesg mdconfig2 iscsictl nfscbd

it looks like nfscbd is scheduled after mountcritremote remote thanks to some third dependency relation; I've got no idea what it is. Take a look at the image generated with cd /etc/rc.d && rcorder -pg * | dot -Tjpg > ~/Desktop/rc-dependency-graph.jpg. It will give you an idea of the current scheduling situation (you may want to omit the -p flag as it is not being used by default at the moment AFAIR).

This revision is now accepted and ready to land.Dec 13 2020, 11:02 PM
This revision was automatically updated to reflect the committed changes.