Bug 199165
| Summary: | snmptrap does not search for mibs in default mib directory | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 4 | Reporter: | Brian Reichert <brian.reichert> | ||||
| Component: | net-snmp | Assignee: | Jan Safranek <jsafrane> | ||||
| Status: | CLOSED ERRATA | QA Contact: | |||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.0 | ||||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | i386 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | RHBA-2007-0738 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2007-11-15 16:00:11 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 244783, 244784 | ||||||
| Attachments: |
|
||||||
Still reproducible with RHEL 4.5, RHEL 5.0 and Fedora Core 6. I'll contact upstream... Created attachment 156979 [details]
patch resolving this issue
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2007-0738.html |
Description of problem: We publish our own MIB, in a separate directory. According to snmpcmd(1), I should be able to use this command to use our MIB, in addition to the default ones: env - snmptrap -M +/our/mib/dir ... However, the errors I get make it clear the default MIBs are not being read: Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none) Version-Release number of selected component (if applicable): net-snmp-utils-5.1.2-11.EL4.6.i386.rpm How reproducible: Steps to Reproduce: 1. (see below) 2. 3. Actual results: env - snmptrap -M +/our/mib/dir ... However, the errors I get make it clear the default MIBs are not being read: Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none) ... Expected results: (no errors.) Additional info: The manpage says, in part: -M DIRLIST Specifies a colon separated list of directories to search for MIBs. This overrides the environment variable MIBDIRS. ... If DIRLIST has a leading â+â, then the given directories are added to the list of MIB directories. ... If no value is specified for the environment variable MIBDIRS, then the command will still search a default mib directory .... The default directory is /usr/share/snmp/mibs. Using strace shows that the default directory is never looked at. Augmenting my invokation thusly gives me the result I want: env - snmptrap -M /usr/share/snmp/mibs:/our/mib/dir ...