Bug Description

Binary package hint: autofs

Description: Ubuntu 10.04.2 LTS
Release: 10.04

Installed: 5.0.4-3.1ubuntu5.1

Brief summary: autofs, in upstart terms, becomes "started" before it is actually ready. There seems to be a brief window immediately after "started" where if you run something expecting to be able to read or write to an automounted directory it will either fail (on a read or a write to a subdir of the mount) or write to the empty mountpoint (on a write to the root of the mount). Even though `status autofs` is "started/running" the mounts aren't ready.

If you sleep for a few seconds in the post-start script it covers up for the bug in most cases (probably) but the exact number may vary by system.

There are two issues here. One is that the package appears to fork before it is actually ready for things to automount. Because of that, we don't have a clear point which we can emit the started event. So either a patch should be made to have it fork later (unlikely) or we need a post-start that looks for evidence that automounting is ready to be used and blocks started until that condition is true.