[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
This bug was fixed in the package net-snmp - 5.7.3+dfsg-1.8ubuntu3 --- net-snmp (5.7.3+dfsg-1.8ubuntu3) bionic; urgency=medium * d/p/0001-swinst_apt.c-Fix-indexing-of-hrSWInstalledTable-to-s.patch: set first hrSWInstalledIndex to 1 to follow RFC 2790 (LP: #1314760) -- Christian Ehrhardt Tue, 20 Feb 2018 15:24:41 +0100 ** Changed in: net-snmp (Ubuntu) Status: Incomplete => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
Needed some help in proposed migration, but it is ready now. Yet it is blocked behind the perl migration - once that succeeds it will get into bionic-release as well. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
I agree to "I've worked around this for a few years now; it would be nice to see an upstream fix merged.". If the upstream policy on releasing would not be that bad Debian and Ubuntu would also have that for years already. Anyway no time to complain ... with your suggestions I got a repro case: On any Bionic system: $ apt install snmpd snmp snmp-mibs-downloader # Add to /etc/snmp/snmpd.conf view systemonly included .1.3.6.1.2.1.25 rocommunity public localhost $ systemctl restart snmpd $ snmpbulkget -v2c -c public -Cn1 -Cr1 -Os localhost HOST-RESOURCES-MIB::hrSWInstalledTable hrSWInstalledIndex.0 = INTEGER: 0 Installed from the ppa: $ snmpbulkget -v2c -c public -Cn1 -Cr1 -Os localhost HOST-RESOURCES-MIB::hrSWInstalledTable hrSWInstalledIndex.1 = INTEGER: 1 Also the upgrade was smooth, with all that in place (MP, Test, ...) ready to upload. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
Attaching a rough pysnmp (4.2.5) test $ python ./hrSwInstall.py centos6_srv.example.com 161 v2comm HOST-RESOURCES-MIB::hrSWInstalledIndex."1" 1 HOST-RESOURCES-MIB::hrSWInstalledIndex."2" 2 HOST-RESOURCES-MIB::hrSWInstalledIndex."3" 3 HOST-RESOURCES-MIB::hrSWInstalledIndex."4" 4 HOST-RESOURCES-MIB::hrSWInstalledIndex."5" 5 $ python ./hrSwInstall.py ubuntu_srv.example.com 161 v2comm Failed: ConstraintsIntersection(ConstraintsIntersection(ConstraintsIntersection(), ValueRangeConstraint(-2147483648, 2147483647)), ValueRangeConstraint(1, 2147483647)) failed at: "ValueRangeConstraint(1, 2147483647) failed at: "0"" at Integer32 Hope these resources help with testing. I've worked around this for a few years now; it would be nice to see an upstream fix merged. ** Attachment added: "hrSwInstall.py" https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+attachment/5063904/+files/hrSwInstall.py -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
@paelzer Check your snmpd.conf, make sure the OID you are searching for (.1.3.6.1.2.1.25.6) is included in the view for the community you are using. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
Download attached dockerfile and build a docker image $ docker build -t snmptest:latest . Start snmpd container: $ docker run --name snmpd --rm -it snmptest:latest Run the snmpbulkget in another ephemeral container: $ docker run --network="container:snmpd" --rm -it snmptest:latest \ snmpbulkget -v2c -c public -Cn1 -Cr1 -Os localhost HOST-RESOURCES-MIB::hrSWInstalledTable Result: hrSWInstalledIndex.0 = INTEGER: 0 If these steps are not good enough for your processes I can try to reproduce it from a 17.10 virtual machine. ** Attachment added: "Dockerfile" https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+attachment/5063685/+files/Dockerfile -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
Happy to help. Sorry my current testing environment is not suited for this, I hope docker is OK enough. Attaching snmpd.conf, steps to follow. ** Attachment added: "snmpd.conf" https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+attachment/5063675/+files/snmpd.conf -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
I thought I found it. 1. get extra MIBs (I had that already before) $ apt install snmp-mibs-downloader # modify to actually load all of them $ cat /etc/snmp/snmp.conf mibs +ALL # restart the daemon $ systemctl restart snmpd But this exposes maybe another bug: Bad operator (INTEGER): At line 73 in /usr/share/snmp/mibs/ietf/SNMPv2-PDU But does not give me populated entries where I need them. Even though it shows up in snmptranslate -Tp now at least :-/ Hmm - actually is this RPM only, no there are dpkg-query commands in there ... Waiting for an snmp experienced user to tell me how to test this :-/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
Hmm, this is unfortunate. We really have everything together for a fix to be pushed, except valid steps to reproduce. And I'm not snmp'ish enough to fix it up (in the constraint of my patience) it seems. The initially reported command always gives me: .1.3.6.1.2.1.25.6.3 = No more variables left in this MIB View (It is past the end of the MIB tree) I tried to modify the command, installed extra MIB libraries, ... Nothing worked so far :-/ I can get up to uptime .1.3.6.1.2.1.25.1.1.0 But nothing else in .1.3.6.1.2.1.25 seems populated. # snmpwalk -v2c -c public localhost 1.3.6.1.2.1.25 iso.3.6.1.2.1.25.1.1.0 = Timeticks: (143971700) 16 days, 15:55:17.00 iso.3.6.1.2.1.25.1.2.0 = Hex-STRING: 07 E2 02 17 07 03 3B 00 2B 00 00 iso.3.6.1.2.1.25.1.3.0 = INTEGER: 393216 iso.3.6.1.2.1.25.1.4.0 = STRING: "BOOT_IMAGE=/boot/vmlinuz-4.4.0-109-generic.efi.signed root=UUID=7da7e070-6e58-4b1b-ad8b-11ddb9c46992 ro quiet splash crashkernel" iso.3.6.1.2.1.25.1.5.0 = Gauge32: 0 iso.3.6.1.2.1.25.1.6.0 = Gauge32: 75 iso.3.6.1.2.1.25.1.7.0 = INTEGER: 0 iso.3.6.1.2.1.25.1.7.0 = No more variables left in this MIB View (It is past the end of the MIB tree) I think we should be able to test this before pushing I have to ask the reporter (or anyone else) if you'd know how to prepare that? Not giving up yet ... ** Changed in: net-snmp (Ubuntu) Status: In Progress => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
** Changed in: net-snmp (Ubuntu) Assignee: (unassigned) => ChristianEhrhardt (paelzer) ** Changed in: net-snmp (Ubuntu) Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
PPA to test is at https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3167 MP: https://code.launchpad.net/~paelzer/ubuntu/+source/net-snmp/+git/net-snmp/+merge/338099 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
** Merge proposal linked: https://code.launchpad.net/~paelzer/ubuntu/+source/net-snmp/+git/net-snmp/+merge/338099 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
** Tags added: server-next -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
The attachment "The upstream fix for the bug" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team. [This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.] ** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
The upstream has a bugfix (yet to be released), which I am attaching here. Please consider locally applying it for the time being. ** Patch added: "The upstream fix for the bug" https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+attachment/4974338/+files/0001-swinst_apt.c-Fix-indexing-of-hrSWInstalledTable-to-s.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: net-snmp (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
** Changed in: net-snmp (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1314760] Re: first hrSWInstalledIndex is 0, should be 1
apport information ** Tags added: apport-collected saucy ** Description changed: According to RFC 2790 the hrSWInstalledIndex should start at 1: hrSWInstalledIndex OBJECT-TYPE SYNTAX Integer32 (1..2147483647) MAX-ACCESS read-only STATUS current DESCRIPTION "A unique value for each piece of software installed on the host. This value shall be in the range from 1 to the number of pieces of software installed on the host." ::= { hrSWInstalledEntry 1 } However, when grabbing the hrSWInstalledTable, my first entry is at index 0. Example: $ snmpbulkget -v2c -c public -Cn1 -Cr1 -ObentU localhost 1.3.6.1.2.1.25.6.3 .1.3.6.1.2.1.25.6.3.1.1.0 = INTEGER: 0 For a CentOS 6 host the behavior is according to spec: $ snmpbulkget -v2c -c public -Cn1 -Cr1 -ObentU centos6_srv.example.com 1.3.6.1.2.1.25.6.3 .1.3.6.1.2.1.25.6.3.1.1.1 = INTEGER: 1 I found this issue while trying to read HOST-RESOURCES-MIB::hrSWRunPerfTable with pysnmp, but kept getting an exception: ConstraintsIntersection(ConstraintsIntersection(ConstraintsIntersection(), ValueRangeConstraint(-2147483648, 2147483647)), ValueRangeConstraint(1, 2147483647)) failed at: "ValueRangeConstraint(1, 2147483647) failed at: "0"" at Integer32 + --- + ApportVersion: 2.12.5-0ubuntu2.2 + Architecture: amd64 + DistroRelease: Ubuntu 13.10 + InstallationDate: Installed on 2011-04-30 (1095 days ago) + InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1) + MarkForUpload: True + Package: net-snmp (not installed) + ProcVersionSignature: Ubuntu 3.11.0-19.33-generic 3.11.10.5 + Tags: saucy + Uname: Linux 3.11.0-19-generic x86_64 + UpgradeStatus: Upgraded to saucy on 2013-10-18 (194 days ago) + UserGroups: adm admin cdrom dialout libvirtd lpadmin netdev plugdev sambashare wireshark ** Attachment added: "ProcEnviron.txt" https://bugs.launchpad.net/bugs/1314760/+attachment/4101742/+files/ProcEnviron.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1314760 Title: first hrSWInstalledIndex is 0, should be 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1314760/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs