Bug 922991

Summary: dracut hook pre-pivot runs before mount hook
Product: [Fedora] Fedora Reporter: Brian Lane <bcl>
Component: dracutAssignee: dracut-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 19CC: awilliam, dracut-maint, harald, jonathan, jreznik, robatino, satellitgo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dracut-026-62.git20130319 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-20 19:47:36 UTC Type: Bug
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: 834084    

Description Brian Lane 2013-03-18 23:52:12 UTC
Trying to apply an update image to anaconda-19.11 doesn't work, mount doesn't call /usr/bin/mount it calls an internal dracut function instead.

rd.debug output:

3195 dracut-pre-pivot[505]: ///lib/dracut/hooks/pre-pivot/20-apply-live-updates.sh@3(source): '[' -b /dev/mapper/live-rw ']'^M^M
3196 dracut-pre-pivot[505]: ///lib/dracut/hooks/pre-pivot/20-apply-live-updates.sh@3(source): '[' -d /updates ']'^M^M
3197 dracut-pre-pivot[505]: ///lib/dracut/hooks/pre-pivot/20-apply-live-updates.sh@4(source): info 'Applying updates to live image...'^M^M
3198 dracut-pre-pivot[505]: //lib/dracut-lib.sh@426(info): echo 'Applying updates to live image...'^M^M
3199 dracut-pre-pivot[505]: ///lib/dracut/hooks/pre-pivot/20-apply-live-updates.sh@5(source): mount -o bind /run /sysroot/run^M^M
3200 dracut-mount[506]: //lib/dracut-lib.sh@352(): hookdir=/lib/dracut/hooks^M^M
3201 dracut-mount[506]: //lib/dracut-lib.sh@353(): export hookdir^M^M
3202 dracut-mount[506]: //lib/dracut-lib.sh@404(): '[' -z 1 ']'^M^M
3203 dracut-mount[506]: //lib/dracut-lib.sh@509(): command -v findmnt^M^M
3204 dracut-mount[506]: //lib/dracut-lib.sh@1035(): setmemdebug^M^M
3205 dracut-mount[506]: //lib/dracut-lib.sh@1030(setmemdebug): '[' -z 0 ']'^M^M
3206 dracut-mount[506]: /bin/dracut-mount@10(): source_conf /etc/conf.d^M^M


This can be fixed by calling /usr/bin/mount explicitly, but that doesn't seem like the best solution -- people writing hooks are going to expect the path to be searched for binaries and won't always know what dracut is naming things.

Comment 1 Adam Williamson 2013-03-19 00:00:39 UTC
Proposing as an Alpha blocker. New-style criterion:

"The installer must be able to download and use an installer update image from an HTTP server."

Comment 2 Harald Hoyer 2013-03-19 11:32:29 UTC
(In reply to comment #0)
> Trying to apply an update image to anaconda-19.11 doesn't work, mount
> doesn't call /usr/bin/mount it calls an internal dracut function instead.
> 
> rd.debug output:
> 
> 3195 dracut-pre-pivot[505]:
> ///lib/dracut/hooks/pre-pivot/20-apply-live-updates.sh@3(source): '[' -b
> /dev/mapper/live-rw ']'^M^M
> 3196 dracut-pre-pivot[505]:
> ///lib/dracut/hooks/pre-pivot/20-apply-live-updates.sh@3(source): '[' -d
> /updates ']'^M^M
> 3197 dracut-pre-pivot[505]:
> ///lib/dracut/hooks/pre-pivot/20-apply-live-updates.sh@4(source): info
> 'Applying updates to live image...'^M^M
> 3198 dracut-pre-pivot[505]: //lib/dracut-lib.sh@426(info): echo 'Applying
> updates to live image...'^M^M
> 3199 dracut-pre-pivot[505]:
> ///lib/dracut/hooks/pre-pivot/20-apply-live-updates.sh@5(source): mount -o
> bind /run /sysroot/run^M^M
> 3200 dracut-mount[506]: //lib/dracut-lib.sh@352():
> hookdir=/lib/dracut/hooks^M^M
> 3201 dracut-mount[506]: //lib/dracut-lib.sh@353(): export hookdir^M^M
> 3202 dracut-mount[506]: //lib/dracut-lib.sh@404(): '[' -z 1 ']'^M^M
> 3203 dracut-mount[506]: //lib/dracut-lib.sh@509(): command -v findmnt^M^M
> 3204 dracut-mount[506]: //lib/dracut-lib.sh@1035(): setmemdebug^M^M
> 3205 dracut-mount[506]: //lib/dracut-lib.sh@1030(setmemdebug): '[' -z 0
> ']'^M^M
> 3206 dracut-mount[506]: /bin/dracut-mount@10(): source_conf /etc/conf.d^M^M
> 
> 
> This can be fixed by calling /usr/bin/mount explicitly, but that doesn't
> seem like the best solution -- people writing hooks are going to expect the
> path to be searched for binaries and won't always know what dracut is naming
> things.

mount does not call dracut-mount. That is just the output of another dracut service.

Although the ordering was wrong, which is hopefully fixed in 
dracut-026-62.git20130319

Please use the output of
# journalctl -ab -o short-monotonic

or better

# journalctl -ab -o short-monotonic -u dracut-pre-pivot.service

to debug individual service outputs.

Comment 3 Adam Williamson 2013-03-20 16:32:09 UTC
Discussed at 2013-03-20 blocker review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2013-03-20/f19alpha-blocker-review-2.2013-03-20-16.00.log.txt . Accepted as a blocker per criterion cited in comment #1.

Comment 4 Adam Williamson 2013-03-20 19:47:36 UTC
The fixed dracut is in the f19 repos now and I saw people in #anaconda using updates images, closing.