Bug 452866 - netfs does not synchronise with udev
netfs does not synchronise with udev
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
5.2
All Linux
medium Severity medium
: rc
: ---
Assigned To: initscripts Maintenance Team
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-25 10:18 EDT by Bryn M. Reeves
Modified: 2010-10-22 22:13 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 17:16:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Add a udevsettle before mounting _netdev devices (588 bytes, patch)
2008-06-25 10:18 EDT, Bryn M. Reeves
no flags Details | Diff

  None (edit)
Description Bryn M. Reeves 2008-06-25 10:18:03 EDT
Description of problem:
The _netdev option is used in /etc/fstab to mark devices that depend on the
network for operation. This causes the initscripts to defer mounting file
systems located on these devices until the network is brought up and the netfs
initscript runs.

Device nodes for these devices (nbd, gnbd, iscsi etc.) are created by udev once
the appropriate subsystem is started.

Processing of the udev backlog may not have completed by the time the netfs
script runs causing failures to occur when attempting to mount file systems.
This can happen when there are a large number of devices or when device
initialisation is slow.

This is fixed by adding a udevsettle to the start() function in netfs. 

Version-Release number of selected component (if applicable):
initscripts-8.45.17.EL-1

How reproducible:
100%

Steps to Reproduce:
1. grep udev /etc/init.d/netfs
  
Actual results:
No results.

Expected results:
An invocation of udevsettle to cause the script to sync up with udev processing.

Additional info:
Reproducing actual errors is harder; need to create for e.g. a very large number
of iSCSI devices or arrange for the udev processing to take longer than normal
(maybe adding a sleep in a udev rule would work for simulating this).

This has been seen in production environments with large numbers of devices.
Comment 1 Bryn M. Reeves 2008-06-25 10:18:03 EDT
Created attachment 310267 [details]
Add a udevsettle before mounting _netdev devices
Comment 2 RHEL Product and Program Management 2008-06-25 11:03:17 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 4 Bryn M. Reeves 2008-06-30 10:05:56 EDT
As described in comment #0; when you have a system that exhibits this behavior
it will fail 100% of the time. This normally involves very large numbers of
devices or devices that are for some reason slow for udev to process.

If using modified udev scripts is an acceptable way to reproduce for testing
purposes then just adding a delay of a couple of seconds should be adequate to
trigger a mount failure in the netfs script; just create an entry in fstab
labelled with _netdev that attempts to mount such a "slow" device.
Comment 5 David Kovalsky 2008-06-30 10:21:41 EDT
Yes, I think might be acceptable and probably easier to setup then many iscsi
drives (even though possible). Thanks for the info Bryn!
Comment 8 Bill Nottingham 2008-09-16 20:06:40 EDT
Upon re-review... why isn't this patch in the iscsi script instead?
Comment 9 Matthew Kent 2008-11-27 19:35:15 EST
+1, seeing this issue here on multiple systems.

Confirming that adding /sbin/udevsettle --timeout=30 to init.d/iscsi startup, just after loginall, solves it nicely. Solid across 20 reboots.
Comment 10 Yulia Kopkova 2008-12-02 08:10:58 EST
Bryn, Harald,

Can you please add more clear/step-by-step reproducer for QE?

Thank you in advance.
Comment 14 errata-xmlrpc 2009-01-20 17:16:02 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0245.html

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