Bug 463161

Summary: initscripts + NM cause "spontaneous" reboot when netbd not available
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: rvokal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-23 18:29:27 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:

Description Hans de Goede 2008-09-22 13:00:19 UTC
Best explained by giving reproducing instructions:
1) Do a rawhide install with /home or /srv on an iscsi target
2) Reboot into the fresh installation
3) iscsi service runs before NM, fails to attach to target
   (this is another bug, but even without this this bug will still happen)
4) netfs runs from upstart, does nothing as no network yet.
5) NetworkManager runs
6) NetworkManager is done bringing up the network and runs netfs, note that
   netfs no is run from NetworkManager not from upstart and thus has no 
   console/tty
7) netfs tries to fsck network attached block devices such as iscsi, but those
   are not present due to 3 (if this error was not there, the following could
   still happen in case of fs damage)
8) netfs detects a fatal fsck errors and tries to start a root shell
9) starting the rootshell fails as no stdin to read the password from
10) netfs reboots the machine
11) machine starts rebooting while it had already continued booting way past
    NM (I actually briefly get a login screen) as NM was doing its stuff async.

So it looks like we need some magic in netfs to not try to run the rootshell but instead log an error and exit when running from NM. netfs *must* exit when this happens and not continue as we do not want to mount the network block devices with fsck errors to avoid further damage.