group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #32270
[Bug 1835818] Re: snmpd causes autofs mount points to be mounted on service start/restart
Hello Ioanna, or anyone else affected,
Accepted net-snmp into bionic-proposed. The package will build now and
be available at https://launchpad.net/ubuntu/+source/net-
snmp/5.7.3+dfsg-1.8ubuntu3.3 in a few hours, and then in the -proposed
repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-bionic to verification-done-bionic. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-bionic. In either case, without details of
your testing we will not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: net-snmp (Ubuntu Bionic)
Status: Fix Released => Fix Committed
** Tags removed: verification-done-bionic
** Tags added: verification-needed-bionic
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1835818
Title:
snmpd causes autofs mount points to be mounted on service
start/restart
Status in net-snmp package in Ubuntu:
Fix Released
Status in net-snmp source package in Xenial:
Fix Released
Status in net-snmp source package in Bionic:
Fix Committed
Status in net-snmp source package in Cosmic:
Won't Fix
Status in net-snmp source package in Disco:
Fix Committed
Status in net-snmp source package in Eoan:
Fix Released
Status in net-snmp package in Debian:
New
Bug description:
[Impact]
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.
However this happens only if autofs service is started before snmpd.
If snmpd stars first /etc/mtab is not yet populated with autofs mounts and therefore
are not mounted.
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.
This also delays the system shutdown time since everything needs to be unmounted.
[Test Case]
*** Test Case 1 - During boot:
The user that brought this issue to our attention would observe all autofs mounts
be mounted at boot, because in their environment autofs would start first.
In my environment snmpd starts first so to reproduce I had to add a small delay in
snmpd init script.
In /etc/init.d/snmp :
@@ -36,6 +36,8 @@ cd /
case "$1" in
start)
+ # Delay snmp start
+ sleep 2
log_daemon_msg "Starting SNMP services:"
# remove old symlink with previous version
if [ -L /var/run/agentx ]; then
$cat /etc/auto.master
/- /etc/auto.nfs --timeout=30
$cat /etc/auto.nfs
/home/test1 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test1
/home/test2 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test2
Reboot vm, syslog entries :
# Autofs starts
Jul 11 11:04:16 xenial-vm3 autofs[1295]: * Starting automount...
Jul 11 11:04:16 xenial-vm3 automount[1357]: Starting automounter version 5.1.1, master map /etc/auto.master
Jul 11 11:04:16 xenial-vm3 automount[1357]: using kernel protocol version 5.02
# Mount triggers, now visible in mtab
Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test1 with timeout 300, freq 75 seconds
Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test2 with timeout 300, freq 75 seconds
Jul 11 11:04:16 xenial-vm3 autofs[1295]: ...done.
...
# SNMP starts
Jul 11 11:04:18 xenial-vm3 snmpd[1294]: * Starting SNMP services:
Jul 11 11:04:18 xenial-vm3 systemd[1]: proc-sys-fs-binfmt_misc.automount: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 1394 (snmpd)
Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounting Arbitrary Executable File Formats File System...
Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounted Arbitrary Executable File Formats File System.
Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <==========
Jul 11 11:04:18 xenial-vm3 kernel: [ 8.880685] FS-Cache: Loaded
Jul 11 11:04:18 xenial-vm3 kernel: [ 8.889318] FS-Cache: Netfs 'nfs' registered for caching
Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902672] NFS: Registering the id_resolver key type
Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902680] Key type id_resolver registered
Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902682] Key type id_legacy registered
Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test1 <==========
Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <==========
Jul 11 11:04:18 xenial-vm3 kernel: [ 9.163011] random: nonblocking pool is initialized
Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test2 <===========
*** Test Case 2 - Restart snmpd :
To reproduce this case, autofs mounts should not be mounted to begin with.
(restart autofs or let it expire)
#systemctl restart snmpd.service
Syslog entries :
Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopping LSB: SNMP agents...
Jul 11 11:15:40 xenial-vm3 snmpd[1668]: * Stopping SNMP services:
Jul 11 11:15:40 xenial-vm3 snmpd[1434]: Received TERM or STOP signal... shutting down...
Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopped LSB: SNMP agents.
Jul 11 11:15:40 xenial-vm3 systemd[1]: Starting LSB: SNMP agents...
Jul 11 11:15:42 xenial-vm3 snmpd[1677]: * Starting SNMP services:
Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <===========
Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test1 <===========
Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <===========
Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test2 <===========
Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 145: Warning: Unknown token: defaultMonitors.
Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 147: Warning: Unknown token: linkUpDownNotifications.
Jul 11 11:15:42 xenial-vm3 snmpd[1684]: Turning on AgentX master support.
Jul 11 11:15:42 xenial-vm3 systemd[1]: Started LSB: SNMP agents.
Jul 11 11:15:42 xenial-vm3 snmpd[1708]: NET-SNMP version 5.7.3
[Regression Potential]
The regression potential of these patch is low.
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.
Therefore, any regression that may be caused by this patch will be autofs related.
[Other]
Upstream bug : https://sourceforge.net/p/net-snmp/bugs/2968/
Upstream patches :
https://sourceforge.net/p/net-snmp/patches/1350/
https://sourceforge.net/p/net-snmp/code/ci/a0df31c18c513a0d79f4d526b1af7fad48748e57/
Debian Bug : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935325
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1835818/+subscriptions