Bug 325881 - snmpwalk of UCD-SNMP-MIB dskEntry causes bad data if "disks" mount point contain spaces
Summary: snmpwalk of UCD-SNMP-MIB dskEntry causes bad data if "disks" mount point cont...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: net-snmp
Version: 4.4
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Jan Safranek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 348681 400591
TreeView+ depends on / blocked
 
Reported: 2007-10-10 07:37 UTC by Jonathan Barber
Modified: 2008-07-24 19:50 UTC (History)
0 users

Fixed In Version: RHBA-2008-0700
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-24 19:50:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0700 0 normal SHIPPED_LIVE net-snmp bug fix update 2008-07-23 15:45:38 UTC

Description Jonathan Barber 2007-10-10 07:37:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070719 CentOS/1.5.0.12-3.el5.centos Firefox/1.5.0.12

Description of problem:
If a ext3 FS on a LVM2 LV has a mount point containing spaces, then snmpd returns bad data when queried.


Version-Release number of selected component (if applicable):
net-snmp-5.1.2-11.EL4.10.0.1

How reproducible:
Always


Steps to Reproduce:
1. Install net-snmp
2. Create mount point with a space in the path
# lvcreate -n really-really-really-long-name -l 1 general
# mkfs.ext3 /dev/mapper/general-really--really--really--long--name -L temp
# mount -L temp "/fc/stupid name"
3. Configure snmpd to report the disk stats of that disk
# cat >> /etc/snmp/snmpd.conf
disk "/fc/stupid name"
4. Query snmpd for the stats
# snmpwalk -v 2c -c secret 10.1.24.20 UCD-SNMP-MIB::dskPath
# snmpwalk -v 2c -c secret 10.1.24.20 UCD-SNMP-MIB::dskPercent

Actual Results:
No stats are seen for the disk:

# snmpwalk -v 2c -c secret 10.1.24.20 UCD-SNMP-MIB::dskPath
UCD-SNMP-MIB::dskPath.1 /
UCD-SNMP-MIB::dskPath.2 /fc/cjw
UCD-SNMP-MIB::dskPath.3 /fc/kgs
UCD-SNMP-MIB::dskPath.4 /fc/dava
UCD-SNMP-MIB::dskPath.5 /fc/slsit
UCD-SNMP-MIB::dskPath.6 /fc/general
UCD-SNMP-MIB::dskPath.7 /fc/em
UCD-SNMP-MIB::dskPath.8 /fc/cat
UCD-SNMP-MIB::dskPath.9 /fc/isn
UCD-SNMP-MIB::dskPath.10 /fc/mrc-new
UCD-SNMP-MIB::dskPath.11 /fc/prc
UCD-SNMP-MIB::dskPath.12 /fc/tpfs-common
UCD-SNMP-MIB::dskPath.13 /fc/stupid
# snmpwalk -v 2c -c secret 10.1.24.20 UCD-SNMP-MIB::dskdevice
UCD-SNMP-MIB::dskDevice.1 /dev/sda3
UCD-SNMP-MIB::dskDevice.2 /dev/mapper/cjw-lvol0
UCD-SNMP-MIB::dskDevice.3 /dev/mapper/kgs-lvol0
UCD-SNMP-MIB::dskDevice.4 /dev/mapper/DAVA-lvol0
UCD-SNMP-MIB::dskDevice.5 /dev/mapper/SLSIT-lvol0
UCD-SNMP-MIB::dskDevice.6 /dev/mapper/general-lvol0
UCD-SNMP-MIB::dskDevice.7 /dev/mapper/em-lvol0
UCD-SNMP-MIB::dskDevice.8 /dev/mapper/cat-lvol0
UCD-SNMP-MIB::dskDevice.9 /dev/mapper/isn-lvol0
UCD-SNMP-MIB::dskDevice.10 /dev/mapper/mrc-lvol0
UCD-SNMP-MIB::dskDevice.11 /dev/mapper/general-prc--common
UCD-SNMP-MIB::dskDevice.12 /dev/mapper/general-tpfs--common
UCD-SNMP-MIB::dskDevice.13 /dev/mapper/general-really--really--really--long--name
# snmpwalk -v 2c -c secret 10.1.24.20 UCD-SNMP-MIB::dskPercent
UCD-SNMP-MIB::dskPercent.1 34
UCD-SNMP-MIB::dskPercent.2 52
UCD-SNMP-MIB::dskPercent.3 24
UCD-SNMP-MIB::dskPercent.4 98
UCD-SNMP-MIB::dskPercent.5 98
UCD-SNMP-MIB::dskPercent.6 88
UCD-SNMP-MIB::dskPercent.7 100
UCD-SNMP-MIB::dskPercent.8 83
UCD-SNMP-MIB::dskPercent.9 11
UCD-SNMP-MIB::dskPercent.10 52
UCD-SNMP-MIB::dskPercent.11 16
UCD-SNMP-MIB::dskPercent.12 2

Note that dskPath doesn't have the full path for device 13, and that dskPercent only goes to item 12.

The later occurs for the following UCD-SNMP-MIB objects:
dskTotal
dskAvail
dskUsed
dskPercent
dskPercentNode
dskErrorFlag
dskErrorMsg

Expected Results:
Should have seen the stats for the disk as for the other disks.

Additional info:
snmpd reports via syslog:
Oct 10 08:27:48 modi net-snmp[3012]: Couldn't open device /dev/mapper/general-really--really--really--long--name
Oct 10 08:27:48 modi net-snmp[3012]: statvfs dev/disk: No such file or directory

But a simple program making the statvfs() call shows this is bogus.

Comment 2 RHEL Program Management 2007-11-29 03:57:05 UTC
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.

Comment 8 errata-xmlrpc 2008-07-24 19:50:11 UTC
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 therefore 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-2008-0700.html


Note You need to log in before you can comment on or make changes to this bug.