Comment 19 for bug 1843036

Chris Newcomer (cnewcomer) wrote :

I also tested the test package, 5.7.3+dfsg-1.8ubuntu3.2+testpkg20190906b3, in a direct-mapped autofs environment that was the basis for the fix that caused this regression.

The test package does fix the original autofs "mount everything" issue and allows for snmpwalk to monitor the mounted disks as well.

I even tested it with a single autofs directory mounted and it worked with that as well.

root@test1:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 989468 0 989468 0% /dev
tmpfs 204136 672 203464 1% /run
/dev/vda1 10254592 3972248 5742084 41% /
tmpfs 1020664 0 1020664 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 1020664 0 1020664 0% /sys/fs/cgroup
tmpfs 204132 0 204132 0% /run/user/1000
root@test1:~# patch /etc/snmp/snmpd.conf < /var/tmp/snmpd.conf.patch
patching file /etc/snmp/snmpd.conf
root@test1:~# systemctl restart snmpd
root@test1:~# snmpwalk -v2c -cpublic localhost 1.3.6.1.2.1.25.2.3.1.3
iso.3.6.1.2.1.25.2.3.1.3.1 = STRING: "Physical memory"
iso.3.6.1.2.1.25.2.3.1.3.3 = STRING: "Virtual memory"
iso.3.6.1.2.1.25.2.3.1.3.6 = STRING: "Memory buffers"
iso.3.6.1.2.1.25.2.3.1.3.7 = STRING: "Cached memory"
iso.3.6.1.2.1.25.2.3.1.3.8 = STRING: "Shared memory"
iso.3.6.1.2.1.25.2.3.1.3.10 = STRING: "Swap space"
iso.3.6.1.2.1.25.2.3.1.3.31 = STRING: "/"
iso.3.6.1.2.1.25.2.3.1.3.37 = STRING: "/run"
iso.3.6.1.2.1.25.2.3.1.3.39 = STRING: "/dev/shm"
iso.3.6.1.2.1.25.2.3.1.3.40 = STRING: "/run/lock"
iso.3.6.1.2.1.25.2.3.1.3.41 = STRING: "/sys/fs/cgroup"
iso.3.6.1.2.1.25.2.3.1.3.63 = STRING: "/run/user/1000"
iso.3.6.1.2.1.25.2.3.1.3.63 = No more variables left in this MIB View (It is past the end of the MIB tree)
root@test1:~# dpkg -l | grep snmpd
ii snmpd 5.7.3+dfsg-1.8ubuntu3.2+testpkg20190906b3 amd64 SNMP (Simple Network Management Protocol) agents

### WITH 1 AUTOFS DIRECTORY MOUNTED: /media/test100 ###
root@test1:~# ls /media/test100
root@test1:~# snmpwalk -v2c -cpublic localhost 1.3.6.1.2.1.25.2.3.1.3
iso.3.6.1.2.1.25.2.3.1.3.1 = STRING: "Physical memory"
iso.3.6.1.2.1.25.2.3.1.3.3 = STRING: "Virtual memory"
iso.3.6.1.2.1.25.2.3.1.3.6 = STRING: "Memory buffers"
iso.3.6.1.2.1.25.2.3.1.3.7 = STRING: "Cached memory"
iso.3.6.1.2.1.25.2.3.1.3.8 = STRING: "Shared memory"
iso.3.6.1.2.1.25.2.3.1.3.10 = STRING: "Swap space"
iso.3.6.1.2.1.25.2.3.1.3.31 = STRING: "/"
iso.3.6.1.2.1.25.2.3.1.3.37 = STRING: "/run"
iso.3.6.1.2.1.25.2.3.1.3.39 = STRING: "/dev/shm"
iso.3.6.1.2.1.25.2.3.1.3.40 = STRING: "/run/lock"
iso.3.6.1.2.1.25.2.3.1.3.41 = STRING: "/sys/fs/cgroup"
iso.3.6.1.2.1.25.2.3.1.3.63 = STRING: "/run/user/1000"
iso.3.6.1.2.1.25.2.3.1.3.162 = STRING: "/media/test100"
iso.3.6.1.2.1.25.2.3.1.3.162 = No more variables left in this MIB View (It is past the end of the MIB tree)