Subject: bug#39708: nfs-service-type broken: rpc.mountd respawns too quickly

From: Maxim Cournoyer <[email-masked]>
Date: Sun, 08 Mar 2020 13:29:34 -0400

Hello Ricardo!

Ricardo Wurmus <[email-masked]> writes:

> Ludovic Courtès <[email-masked]> writes:
>
>> Maxim Cournoyer <[email-masked]> skribis:
>>
>>>> So that means that rpc.mountd “daemonizes”.  Thus, shepherd shouldn’t
>>>> look at the PID of the process it spawns, but rather at what
>>>> rpc.mountd’s PID file contains (I assume it creates a PID file,
>>>> right?).  IOW, we need to pass #:pid-file to ‘make-forkexec-constructor’.
>>>
>>> That process doesn't create a PID file, so that doesn't work.
>>
>> OK, so ‘--foreground’ was the right thing.  Thanks for explaining!
>
> Does this affect the system test at all?  When I added nfs-service-type
> I also added a system test, which passed.  Did I miss something?

As I mentioned in an earlier message in this thread;

> Even with 'herd status rpc.mountd' reporting that it is stopped and
> disabled, and 'pidof rpc.mountd' showing 6 processes, the NFS service
> manages to work, at least for the very limited testing I've done.

So, the test validating that files written to the mounted NFS share
appear in the exported file system would pass, but if you view the
output of 'herd status nfs' on a system configured before the fix you'd
see rpc.mountd reported as stopped and disabled (with something like 6
processes running :-)).

Maxim