Project

General

Profile

Feature #15491

Ability to turn off succeeded mountd requests for NFS service

Added by Dave F over 3 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Important
Assignee:
Vaibhav Chauhan
Category:
OS
Target version:
Estimated time:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Platform: Xeon E3-1220v3
Memory: 16GB, ECC


Description

When using Proxmox against a NFS mount on a FreeNAS server, it generates a ton of 'export request succeeded' events in the log making it very noisy and hard to troubleshoot other issues that may be present:

May 22 21:45:09 tardis mountd[14517]: export request succeeded from 192.168.32.10
May 22 21:45:20 tardis mountd[14517]: export request succeeded from 192.168.32.10
May 22 21:45:29 tardis mountd[14517]: export request succeeded from 192.168.32.10

I'd like to see a new feature in NFS service to turn off the 'succeeded mountd requests' logging to the syslog. These events are caused by using the -l parameter which can be found in /etc/rc.conf.local on line 554. Having the option to turn on/off log mountd requests would be great, or even an auxiliary field with -l pre-populated which can be removed by the end user to keep expected behavior in the future.

Reference: https://www.freebsd.org/cgi/man.cgi?query=mountd&sektion=8

local nonroot mountdflags="-l -rS" ip nfsips mountdport statdport lockdport

I can work around this for now by killing mountd and restarting it manually excluding the -l parameter, however this isn't an ideal solution.

History

#1 Updated by Dave F over 3 years ago

  • Hardware Configuration updated (diff)

Forgot to include that I am running the latest FreeNAS build: FreeNAS-9.10-STABLE-201605021851 (35c85f7)

#2 Updated by Josh Paetzel over 3 years ago

  • Status changed from Unscreened to Screened
  • Priority changed from No priority to Nice to have
  • Target version set to Unspecified

I'm going to add to this request, being able to control the debug level of statd and lockd would be nice as well.

all advanced mode checkboxes.

#3 Updated by Christian Jacobsen about 3 years ago

Josh Paetzel wrote:

I'm going to add to this request, being able to control the debug level of statd and lockd would be nice as well.

all advanced mode checkboxes.

There's an open thread in Proxmox forum related to this:
https://forum.proxmox.com/threads/constant-nfs-exports-requests.23893/

#4 Updated by Josh Paetzel about 3 years ago

  • Status changed from Screened to Investigation
  • Priority changed from Nice to have to Important

Ok, I've stood up a system to develop this feature on.

My plans are to have a checkbox which defaults to on under NFS advanced to log mount requests, and another checkbox that enables statd/lockd debugging, which defaults to off.

#5 Updated by Anonymous about 3 years ago

@Josh Paetzel: I have looked into the code, I am planning to make changes in /etc/rc.conf.local on line 554,
if checkbox "log mount requests" = "on", then mountdflags = "-l -rS"
else mountdflags = "-rS"
if checkbox "log statd and lockd requests" = "on" then statdflags = "-d" and lockdflags = ("I am not able to find a parameter to log lockd")
Can you please help me with this?
Also, is my approach correct?

#6 Updated by Anonymous about 3 years ago

@Josh Paetzel: I have made above changes, and for lockd also I am using parameter "-d".
But I am unsure if I can generate the above logs at my end.
Can you please share the steps to generate the mentioned logs?

#7 Updated by Anonymous about 3 years ago

  • Assignee changed from Josh Paetzel to Anonymous

#8 Updated by Anonymous about 3 years ago

Hi Josh, I made my changes and tested them. The logs that I am getting for statd and lockd are in daemon.log. Are these the logs that you are expecting?

/var/log/daemon.log:

May 30 06:23:41 freenas rpc.lockd: Starting, debug level 1
May 30 06:23:41 freenas rpc.statd: unmon_all for host: NFS NLM prog: 0 ver: 0 proc: 0

May 30 06:26:51 freenas notifier: Stopping lockd.
May 30 06:26:51 freenas notifier: Stopping statd.
May 30 06:26:51 freenas notifier: Stopping nfsd.
May 30 06:26:51 freenas notifier: Stopping mountd.
May 30 06:26:51 freenas notifier: nfsuserd not running?
May 30 06:26:52 freenas notifier: gssd not running? (check /var/run/gssd.pid).
May 30 06:26:52 freenas notifier: Stopping rpcbind.
May 30 06:26:52 freenas notifier: mountd not running? (check /var/run/mountd.pid).
May 30 06:26:52 freenas notifier: Starting rpcbind.
May 30 06:26:52 freenas notifier: Starting mountd.
May 30 06:26:52 freenas notifier: NFSv4 is disabled
May 30 06:26:52 freenas notifier: Starting nfsd.
May 30 06:26:52 freenas notifier: Starting statd.
May 30 06:26:52 freenas rpc.statd: Starting - debug enabled
May 30 06:26:52 freenas notifier: Starting lockd.
May 30 06:26:52 freenas rpc.lockd: Starting, debug level 1
May 30 06:26:52 freenas rpc.statd: unmon_all for host: NFS NLM prog: 0 ver: 0 proc: 0

May 30 06:28:02 freenas mountd11540: export request succeeded from 172.17.163.52
May 30 06:28:51 freenas mountd11540: mount request succeeded from 172.17.163.52 for /mnt/v1/f3

#9 Updated by Josh Paetzel about 3 years ago

Yes sir. If you uncheck the checkbox for logging mount requests do the lines such as:

May 30 06:28:51 freenas mountd11540: mount request succeeded from 172.17.163.52 for /mnt/v1/f3

stop getting logged?

#10 Updated by Anonymous about 3 years ago

Yes Josh, If I uncheck the checkbox the logs stop getting logged.

#11 Updated by Anonymous about 3 years ago

  • Status changed from Investigation to Fix In Progress

#12 Updated by Dave F about 3 years ago

Found a better workaround than killing mountd and running manually. Adding a tuneable type rc seems to work. Using variable name mountd_flags, I can force it to use -rS and drop -l when mountd starts.

#13 Updated by Anonymous about 3 years ago

I have done the similar thing, -rS are always used and when the checkbox is checked only then the parameter -l is included in the query.
@Josh: I have created a pull request and waiting to get it reviewed.

#14 Updated by Anonymous about 3 years ago

  • Status changed from Fix In Progress to 19

#15 Updated by Vaibhav Chauhan about 3 years ago

is this tested yet ?

#16 Updated by Dru Lavigne about 3 years ago

And where is the link to the commit?

#17 Updated by Anonymous about 3 years ago

#18 Updated by Dru Lavigne about 3 years ago

Will this be going into either TN-9.10.1 or FN-9.10.1-UI?

#19 Avatar?id=14398&size=24x24 Updated by Kris Moore about 3 years ago

  • Target version changed from Unspecified to 9.10.1-U1

#20 Updated by Dru Lavigne almost 3 years ago

This has already been doc'd. Is it ready to set to RFR?

#21 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

  • Target version changed from 9.10.1-U1 to 9.10.2

Feature, so 9.10.2

#22 Updated by Heather Ownby over 2 years ago

  • Assignee set to Kris Moore

#23 Avatar?id=14398&size=24x24 Updated by Kris Moore over 2 years ago

  • Assignee changed from Kris Moore to Vaibhav Chauhan

Over to VB, I think this is in, have you been able to confirm?

#24 Updated by Vaibhav Chauhan over 2 years ago

  • Status changed from 19 to Ready For Release

#25 Updated by Dru Lavigne over 1 year ago

  • Status changed from Ready For Release to Resolved

Also available in: Atom PDF