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.
Along with Ionna's patch. The following is also needed : https://github.com/net-snmp/net-snmp/pull/5 https://github.com/net-snmp/net-snmp/commit/71e487212bd65839e7454df9701524d08cf0d74f Regression bug in Ubuntu: https://bugs.launchpad.net/ubuntu/bionic/+source/net-snmp/+bug/1843036 Regards, Eric
Rectification from my previous update: https://github.com/net-snmp/net-snmp/commit/71e487212bd65839e7454df9701524d08cf0d74f https://github.com/net-snmp/net-snmp/commit/bcb1a6b8afc444bbcd099a195e08f0b01cbc8f6b References: https://bugs.launchpad.net/ubuntu/bionic/+source/net-snmp/+bug/1843036 https://sourceforge.net/p/net-snmp/patches/1350/ Regards, Eric
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
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