Mishandling of error messages in /usr/share/initramfs-tools/scripts/local-top/dmraid

Bug #415280 reported by Max Bowsher
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dmraid (Debian)
Fix Released
Unknown
dmraid (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: dmraid

/usr/share/initramfs-tools/scripts/local-top/dmraid calls dmraid -r -c and then uses the output without checking what it is.

The output can be a list of raid devices, or it can be an error message.

On one of my machines where I have installed dmraid to learn about it and haven't created any devices yet, I get a lot of error messages during bootup, as the script attempts to call dmraid-activate individually on each word of an error message, like "no block devices found" or "no raid disks".

ProblemType: Bug
Architecture: i386
Date: Tue Aug 18 10:38:00 2009
DistroRelease: Ubuntu 9.10
Package: dmraid 1.0.0.rc15-10build1 [modified: usr/share/initramfs-tools/scripts/local-top/dmraid sbin/dmraid-activate]
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-6.25-generic
SourcePackage: dmraid
Uname: Linux 2.6.31-6-generic i686

Related branches

Revision history for this message
Max Bowsher (maxb) wrote :
Revision history for this message
Tormod Volden (tormodvolden) wrote :

It is not really a duplicate, since this happens in the initrd scripts and on non-dmraid systems. The patch in bug 376792 does not fix the initrd script AFAICS. This issue is only seen in that bug report and is not its topic.

Here is a plain patch (not a packaging patch or debdiff). I can make a bzr branch if that can help.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Of course, the dmraid binary should be fixed to not print error messages on stdout but on stderr... But until then, the above patch will do.

Changed in dmraid (Ubuntu):
status: New → Confirmed
Revision history for this message
Tormod Volden (tormodvolden) wrote :

I sent a git patch to Debian instead, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542256.

Changed in dmraid (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dmraid - 1.0.0.rc15-11build1

---------------
dmraid (1.0.0.rc15-11build1) karmic; urgency=low

  * Fakesync from Debian

dmraid (1.0.0.rc15-11) unstable; urgency=low

  * [ce4e2dc] 15_activate_multiple_raid_sets.patch: Continue onto all
    raid sets instead of returning after processing the first. (LP: #401713)
  * [58a1426] debian/initramfs/dmraid.initramfs-local-top/dmraid: Check
    the exit code before parsing output, thanks to Tormod Volden.
    (Closes: #542256) (LP: #415280, #376792)
  * [91d2b67] Updated to standards version 3.8.3 (No changes needed)

 -- Luke Yelavich <email address hidden> Thu, 27 Aug 2009 08:29:15 +1000

Changed in dmraid (Ubuntu):
status: Confirmed → Fix Released
Changed in dmraid (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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