#935325 net-snmp: snmpd causes autofs mount points to be mounted on service start/restart

Package:
net-snmp
Source:
net-snmp
Submitter:
Ioanna Alifieraki
Date:
2022-06-11 04:36:05 UTC
Severity:
normal
Tags:
#935325#5
Date:
2019-08-21 15:53:00 UTC
From:
To:
Dear Maintainer,

Autofs direct map triggers are visible in /etc/mtab.
On boot, when snmpd starts, it iterates over the entries in /etc/mtab and
performs statfs() on them.
This trigger automount to mount autofs mounts even if the user does not
explicitly  access them.
To reproduce this behaviour the autofs has to be started before snmpd
service.

When there a few autofs mount points the impact is insignificant.
However when there are thousands of them, this causes unnecessary overhead on
operations such as df.

For more information please refer to :
https://launchpad.net/bugs/1835818

In Ubuntu, the attached patch was applied to achieve the following:

The patch essentially adds support for autofs mounts in order to detect them
and treat them separately when calling stafs; autofs entries are skipped to
prevent them from being mounting every time snmpd is restarted.

  * Skip autofs entries when calling statfs to prevent autofs being mounted on
    snmpd startup (LP: #1835818):
    - d/p/autofs-skip-autofs-entries.patch
    - d/p/autofs-fix-a-recently-introduced-bug.patch


Thanks for considering the patch.

#935325#10
Date:
2019-09-06 22:28:07 UTC
From:
To:
#935325#20
Date:
2020-03-30 10:21:55 UTC
From:
To:
Hi Ioanna,
  It looks like this part of the code in version 5.8 is a radically
different version 5.7.3.  I can't see how the patch would cleanly apply and
it looks like autofs is handled like NFS. I'm not sure if this the correct
way or not.

If there still is an issue, is there an updated patch?

 - Craig

#935325#29
Date:
2022-06-11 04:26:20 UTC
From:
To:
The 5.8 net-snmp code did the way of handling filesystems differently this
means:
 * The bug looks like it is probably fixed, even if it was a side-effect
 * The patch won't apply

I was after more information 2 years ago but got none, so closing the bug.

 - Craig