bad output from check_linux_raid with RAID0 and linear volumes

Bug #621380 reported by c.h.
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Nagios Plugins
Unknown
Unknown
nagios-plugins (Debian)
Fix Released
Unknown
nagios-plugins (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: nagios-plugins

The check_linux_raid script is slightly broken. If you do not pass an MD device, it should check all MD devices on the host. However, upon running the check, it outputs:

Use of uninitialized value within %status in pattern match (m//) at ./check_linux_raid line 82, <MDSTAT> line 11.
Use of uninitialized value within %status in pattern match (m//) at ./check_linux_raid line 91, <MDSTAT> line 11.
OK md0 status=[UUUU]. md1 status=[UUUU]. md2 active with no status information.

The first two lines are invalid output for a nagios script.

There is a bug in Debian's tracker (#579049), but I don't see one here. The fix is a simple patch (attached).

Tags: patch
Revision history for this message
c.h. (wryfi) wrote :
tags: added: patch
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Chris, thanks for reporting this bug and working with us to make Ubuntu even better!

I haven't been able to reproduce this. In fact, I happened to have a VM with a disk in recovery right now, so I ran it:

clint@lucid-i386-plus1:~$ /usr/lib/nagios/plugins/check_linux_raid
CRITICAL md0 status=[_U]. md1 status=[_U]. md2 status=[UU].
clint@lucid-i386-plus1:~$

Does this only happen in the embedded perl mode of nagios? Also what version of the nagios-plugins package do you have in stalled?

Setting to Incomplete, chris, when you've replied, you can set it back to new.

Thanks!

Also setting importance to Medium, as this will affect a fairly large amount of users.

Linking to Debian bug:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=579049

Changed in nagios-plugins (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
c.h. (wryfi) wrote : Re: [Bug 621380] Re: bad output from check_linux_raid

On 08/20/2010 05:10 PM, Clint Byrum wrote:
> Hi Chris, thanks for reporting this bug and working with us to make
> Ubuntu even better!
>
> I haven't been able to reproduce this.

> CRITICAL md0 status=[_U]. md1 status=[_U]. md2 status=[UU].

It appears to be specific to RAID0.

/proc/mdstat for RAID0 stripes doesn't bother to list the member devices
or their statuses, since if the stripe goes down,the whole thing is toast.

E.g.:

ch@vmserver1:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
[raid4] [raid10]
md2 : active raid0 sdf1[1] sde1[0]
      1952443392 blocks 64k chunks

md0 : active raid1 sda1[0] sdd1[3] sdc1[2] sdb1[1]
      995904 blocks [4/4] [UUUU]

md1 : active raid5 sdc2[2] sdd2[3] sda2[0] sdb2[1]
      1460549184 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

ch@vmserver1:~$ sudo /usr/lib/nagios/plugins/check_linux_raid
Use of uninitialized value within %status in pattern match (m//) at
/usr/lib/nagios/plugins/check_linux_raid line 82, <MDSTAT> line 11.
Use of uninitialized value within %status in pattern match (m//) at
/usr/lib/nagios/plugins/check_linux_raid line 91, <MDSTAT> line 11.
OK md0 status=[UUUU]. md1 status=[UUUU]. md2 active with no status
information.

> Does this only happen in the embedded perl mode of nagios? Also what
> version of the nagios-plugins package do you have in stalled?

I don't believe I'm using the embedded perl version.
nagios-plugins-1.4.14-1ubuntu1.

c.h. (wryfi)
Changed in nagios-plugins (Ubuntu):
status: Incomplete → New
summary: - bad output from check_linux_raid
+ bad output from check_linux_raid with RAID0 volumes
summary: - bad output from check_linux_raid with RAID0 volumes
+ bad output from check_linux_raid with RAID0 and linear volumes
Changed in nagios-plugins (Ubuntu):
status: New → Confirmed
status: Confirmed → Triaged
importance: Medium → Low
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Chris thanks for the quick response, that confirms the problem perfectly.

I went ahead and forwarded the bug upstream. Probably best to just wait a while for a patch from them.

Marking Triaged as it has been forwarded upstream. Lowering the importance to Low, as it will only affect users with raid0 and linear md's, not all users of the plugin.

Revision history for this message
Jan Wagner (waja) wrote :

Bug#579049: fixed in nagios-plugins 1.4.15-2 which was uploaded just some moments ago

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

cyco, thanks for the heads up.

Given the amount of delta and FinalFreeze status, I think this will have to wait for natty.

Changed in nagios-plugins (Debian):
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nagios-plugins - 1.4.15-2ubuntu1

---------------
nagios-plugins (1.4.15-2ubuntu1) natty; urgency=low

  * Merge from debian unstable. Remaining changes:
    - debian/control: keep on building with libradius1-dev to avoid pusing radiusclient-ng
      to main.
    - Don't depend on nagios-plugins-extra, we dont need qstat and fping in main.
    - debian/{control,rules}: add an enable hardened build for PIE.
      (Debian bug 542728).
    - Build with libmysqlclient-dev only.
    - debian/pluginconfig/nt.cfg: Fix syntax error. (LP: #595528)

nagios-plugins (1.4.15-2) unstable; urgency=low

  [ Alexander Wirt ]
  * Call ps with two "w" to ensure unlimited width of ps output
    (Closes: #596372)

  [ Jan Wagner ]
  * Add 05_check_linux_raid_fix_striped.dpatch to fix bad output from
    check_linux_raid with RAID0 and linear volumes, thanks to Thomas
    Guyot-Sionnest (Closes: #579049) - LP: #621380
  * Bump Standards-Version to 3.9.1, no changes needed

nagios-plugins (1.4.15-1) unstable; urgency=low

  * New upstream release (Closes: #588273, #522631)
  * Droped the following upstream integrated patches
     - 03_check_smtp_help.dpatch
     - 06_checkircd.dpatch
     - 18_check_game_cmdline.dpatch
     - 22_check_smb_hostaddress.dpatch
     - 32_check_ldap_pointer.dpatch
     - 33_fix_emb_check_disk_smb.dpatch
     - 34_fix_smbclient_check_disk_smb.dpatch
     - 35_check_http_date.dpatch
     - 36_check_ldap_empty_base.dpatch
     - 37_check_radius_nas-ip-address.dpatch
     - 39_check_ircd_fix_epn.dpatch
     - 40_check_http_proxy_auth.dpatch
     - 41_check_ping_detect_args.dpatch
     - 42_check_linux_raid_fix_r10.dpatch
     - 42_check_linux_raid_fix_rebuild.dpatch
     - 43_check_http_large_pages_mleak.dpatch
     - 44_check_snmp_perfdata.dpatch
     - 45_check_http_sni_optional.dpatch
  * Rename 13_subst.in_again.dpatch to 01_subst.in.dpatch
  * Fix ssh_disk and make ssh_disk* better readable, thanks
    Paul Slootman (Closes: #582272)
 -- Chuck Short <email address hidden> Mon, 27 Sep 2010 00:49:25 +0100

Changed in nagios-plugins (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.