That's a good question. I don't use DBUS to shutdown, I use SIGTERM,
which takes a few seconds depending on what debugging I have enabled.
However, the dbus command just calls the same function (admin_halt())
that the signal handler calls, so it should behave the same.
You can turn on debug logging, and look at the logs from the time that
the "NFS EXIT: stopping NFS service" message appears until it's killed.
All the log messages have timestamps, so that should help.
Daniel
On 4/24/20 7:46 PM, Todd Pfaff wrote:
Aha, I just learned about this:
systemctl show node.service -p TimeoutStopUSec
TimeoutStopUSec=1min 30s
That explains where the 90 seconds is coming from.
The next question is: why isn't the dbus-send causing my nfs-ganesha
process to shutdown quickly, long before the systemd TimeoutStopUSec
expires?
Thanks,
Todd
On Fri, 24 Apr 2020, Todd Pfaff wrote:
> I'm looking at this again since my situation hasn't changed - a simple
> nfs-ganesha shutdown with the command:
>
> systemctl stop nfs-ganesha
>
> takes 90 seconds to return. I'm not sure how best to debug this but
> looking at the systemctl unit I see this:
>
> ExecStop=/bin/dbus-send --system --dest=org.ganesha.nfsd
> --type=method_call /org/ganesha/nfsd/admin
> org.ganesha.nfsd.admin.shutdown
>
> If I run that dbus-send manually, it returns immediately. If I then
> wait 90 seconds, nothing changes, the nfs-ganesha process is still
> running. A kill command with default TERM signal does nothing to the
> process. A kill
> -9 is required.
>
> If I instead do 'time systemctl stop nfs-ganesha', after 90 seconds
> the nfs-ganesha process ends and the time command returns.
>
> It appears to me as if the dbus command is having no impact, and
> systemd waits 90 seconds and then stops the nfs-ganesha process with
> KILL signal.
>
> Anyone have any ideas about why I'm seeing this behaviour?
>
> Any ideas about how to debug this further?
>
> Thanks,
> Todd
>
>
> On Thu, 16 Apr 2020, Daniel Gryniewicz wrote:
>
>> 90 seconds is definitely wrong. Shutdown for me takes ~2-5 seconds,
>> tops. This should be fixed.
>>
>> Daniel
>>
>> On 4/15/20 12:54 PM, Todd Pfaff wrote:
>>> My environment:
>>>
>>> # nfs-ganesha-2.8.3-4.el7.x86_64
>>> # CentOS Linux release 7.7.1908 (Core)
>>>
>>>
>>> In light of the stability problems that I've reported here
>>> recently, and
>>> given that I really do want to continue to use nfs-ganesha, I'm
>>> considering mitigating problems by either periodic or on-demand
>>> restarts
>>> of the nfs-ganesha service.
>>>
>>> A complete nfs-ganesha restart, until an nfs client is successfully
>>> accessing the server again, consistently takes:
>>>
>>> ~ 90 seconds for the nfs-ganesha stop
>>> ~ 2 seconds for the nfs-ganesha start
>>> ~ 60 seconds for an nfs client to resume
>>>
>>> for a total of about 2.5 minutes.
>>>
>>> Do these times indicate a problem or is this normal behaviour for
>>> nfs-ganesha?
>>>
>>> If these times are normal and not the result of some problem, is there
>>> any way to safely decrease this restart time?
>>>
>>> Thanks,
>>> Todd
>>> _______________________________________________
>>> Support mailing list -- support(a)lists.nfs-ganesha.org
>>> To unsubscribe send an email to support-leave(a)lists.nfs-ganesha.org
>> _______________________________________________
>> Support mailing list -- support(a)lists.nfs-ganesha.org
>> To unsubscribe send an email to support-leave(a)lists.nfs-ganesha.org
>>
>
>
>