Bug 1338759

Summary: unable to shutdown - dracut loop rm: cannot remove /lib/drauct/hooks/shutdown/30-dm-shutdown.sh: Read-only filesystem
Product: Red Hat Enterprise Linux 7 Reporter: Marcel Kolaja <mkolaja>
Component: dracutAssignee: dracut-maint
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.1CC: alexey.dushechkin, andrea, bugzilla, christopher_dearborn, dburkland, djuran, dkelson, dracut-maint-list, dracut-maint, fkrska, gianluca.cecchi, harald, ipilcher, jdonohue, jmagrini, jonathan, jstodola, kyoshida, ldomb, linforpros, mbanas, mkovarik, mlinden, mrunge, myllynen, rnishtal, rsussman, sjenning, skinjo, sserna, stuartjames, tbarron, thomas.cappetta, vcojot, zbyszek
Target Milestone: rcKeywords: Reopened, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: If a mount point resides in /run on shutdown and cannot be unmounted, systemd will mount this mountpoint read-only. This propagates to /run being read-only. Consequence: When the dracut shutdown procedure runs in a /run root to disassemble and unmount the old real root, its /run is read-only. dracut expects a writable /run, though, so it fails on shutdown. Fix: If dracut encounters a read-only /run on shutdown, it remounts it writeable. Result: The dracut shutdown procedure to disassemble and unmount the old real root succeeds.
Story Points: ---
Clone Of: 1178497 Environment:
Last Closed: 2016-06-23 16:33:22 UTC Type: ---
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: 1178497    
Bug Blocks:    

Description Marcel Kolaja 2016-05-23 11:59:59 UTC
This bug has been copied from bug #1178497 and has been proposed
to be backported to 7.2 z-stream (EUS).

Comment 6 Jan Stodola 2016-06-08 12:26:11 UTC
Reproduced with dracut-033-359.el7, verified with dracut-033-360.el7_2.1, system shuts down as expected.

There is one warning message when trying to unmount /run/netns/namespace, which doesn't prevent from shutting down the system, and will be reported as a separate bug:

[   42.401813] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[   42.404672] systemd-shutdown[1]: Unmounting file systems.
[   42.406297] systemd-shutdown[1]: Unmounting /run/netns/namespace.
[   42.407469] systemd-shutdown[1]: Unmounting /run/netns/namespace.
[   42.408819] systemd-shutdown[1]: Unmounting /run/netns.
[   42.474532] systemd-shutdown[1]: Unmounting /run/netns/namespace.
[   42.475970] systemd-shutdown[1]: Unmounting /run/netns/namespace.
[   42.477191] systemd-shutdown[1]: Could not unmount /run/netns/namespace: Invalid argument
[   42.478824] systemd-shutdown[1]: Not all file systems unmounted, 1 left.

Moving to VERIFIED.

Comment 7 Jan Stodola 2016-06-08 12:40:47 UTC
The warning message has been reported as bug 1343986.

Comment 9 errata-xmlrpc 2016-06-23 16:33:22 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://access.redhat.com/errata/RHBA-2016:1252