FS#22913 - [initscripts] Netfs hangs if network is down

Attached to Project: Arch Linux
Opened by Chris Darnell (cedeel) - Wednesday, 16 February 2011, 10:51 GMT
Last edited by Tom Gundersen (tomegun) - Friday, 22 April 2011, 17:04 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Thomas Bächler (brain0)
Roman Kyrylych (Romashka)
Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Netfs will just hang if {network,net-profiles,wicd,etc..} has failed to do it's job properly.
This results in a system which won't boot at all, since it hangs when trying to mount network file systems.

Additional info:
* initscripts 2010.07-2

Steps to reproduce:
1. have networking and network file systems configured
2. boot without the network available

The script should time out within a reasonable time frame.
This task depends upon

Closed by  Tom Gundersen (tomegun)
Friday, 22 April 2011, 17:04 GMT
Reason for closing:  Won't implement
Additional comments about closing:  See last comment.
Comment by Dave Reisner (falconindy) - Wednesday, 02 March 2011, 03:15 GMT
This isn't foolproof, but it's better than not checking for a network connection at all.

Comment by Dave Reisner (falconindy) - Sunday, 13 March 2011, 01:08 GMT
Upon further investgation, my above "solution" is crap, but it does rule out _some_ obvious cases. Better yet -- there is no foolproof solution. There's no way to define exactly what constitutes sufficient network connectivity to reach the device you're trying to get to. There's plenty of reasons you could have carrier, an IP, routing and still not have sufficient connectivity for mount to succeed. The best workaround I can think of is to run netfs in the background.

I'm also not sure how to reproduce this, as disabling my network connection or trying to hit an otherwise bogus host makes mount (and this script) return immediately.
Comment by Tom Gundersen (tomegun) - Friday, 22 April 2011, 17:03 GMT
You can set timeout values in fstab. There are casese where we never want to timeout (and when netfs can be run in the background), so we will not set a default timeout in the netfs script.

Either add the timeout to fstab or run netfs in the background.