Bug 1121362 - dracut doesn't return error rc if given --add / --force-add modules fail
Summary: dracut doesn't return error rc if given --add / --force-add modules fail
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dracut
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: dracut-maint
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1170368
TreeView+ depends on / blocked
 
Reported: 2014-07-19 20:29 UTC by Frank Ch. Eigler
Modified: 2015-03-05 08:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: dracut does not return with an error code, if some required components given could not be found. Consequence: Other than reading the log of dracut, there was no way to figure out, that some required components were not installed in the initramfs. Fix: dracut returns with an error code now, if dracut modules, which were specified to be added in the initramfs, were not actually installed. Result: The process of initramfs now fails and it can be reacted upon it immediately.
Clone Of:
Environment:
Last Closed: 2015-03-05 08:21:09 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0375 normal SHIPPED_LIVE dracut bug fix and enhancement update 2015-03-05 12:50:34 UTC

Description Frank Ch. Eigler 2014-07-19 20:29:50 UTC
Some tools invoke dracut, with a few extra module activation parameters,
expecting that if dracut returned rc=0, all is well.  But not so:

# /sbin/dracut --force-add FOOBAR --force /boot/soijsdf `uname -r`
dracut module 'FOOBAR' cannot be found or installed.
dracut module 'FOOBAR' cannot be found or installed.
# echo $?
0
# rpm -q dracut
dracut-033-161.el7.x86_64

(Same for "--add".)

This means that that the invoking tool has no way of knowing that
the dracut rebuild actually failed.

Comment 10 Jan Stodola 2015-01-06 12:27:42 UTC
[root@localhost ~]# rpm -q dracut
dracut-033-227.el7.x86_64
[root@localhost ~]# /sbin/dracut --force-add FOOBAR --force /boot/soijsdf `uname -r`
dracut module 'FOOBAR' cannot be found or installed.
[root@localhost ~]# echo $?
1
[root@localhost ~]# /sbin/dracut --add FOOBAR --force /boot/soijsdf `uname -r`
dracut module 'FOOBAR' cannot be found or installed.
[root@localhost ~]# echo $?
1
[root@localhost ~]#

Moving to VERIFIED.

Comment 12 errata-xmlrpc 2015-03-05 08:21:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0375.html


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