portmap is not started during boot process before autofs and hence autofs does not work properly

Bug #511245 reported by Ralph Janke
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
autofs (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Problem:

autofs is used to automatically mount filesystems via nfs (including the home directories of users). During the boot process autofs is started but does not work, hence the login into the Desktop fails since it tries to access the user directory.

In order to fix the problem, a console must be opened and then portmap be started, and autofs restarted. After this the user can login without any problems.

Expected Behaviour:

The boot-up process should allow autofs work probably with nfs without any manual intervention

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.10
Release: 9.10
Codename: karmic

autofs:
  Installed: 4.1.4+debian-2.1ubuntu2
  Candidate: 4.1.4+debian-2.1ubuntu2
  Version table:
 *** 4.1.4+debian-2.1ubuntu2 0
        500 http://gb.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

portmap:
  Installed: 6.0-10ubuntu2
  Candidate: 6.0-10ubuntu2
  Version table:
 *** 6.0-10ubuntu2 0
        500 http://gb.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Ralph Janke (txwikinger)
affects: kde4libs (Ubuntu) → autofs (Ubuntu)
description: updated
Revision history for this message
Chuck Short (zulcss) wrote :

This looks like an upstart race to me. Ill try to get this fixed for lucid.

Regards
chuck

Changed in autofs (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Cédric Dufour (cdufour-keyword-ubuntu-086000) wrote :

I'm experiencing the (same?) problem with Lucid (and autofs-ldap).
After rebooting, one time it works... another time not (until autofs is manually restarted)
That does sound like an upstart race condition.
Unfortunately, this is quite important for enterprise environments :-(
I guess at the time being, one can live with a dirty hack in /etc/rc.local:
sh -c "sleep 15; /etc/init.d/autofs restart" &

Revision history for this message
Ralph Janke (txwikinger) wrote :

Since portmap is now started by upstart, it makes more sense to port autofs over to upstart too and trigger the start on the event of portmap being started.

Revision history for this message
Cédric Dufour (cdufour-keyword-ubuntu-086000) wrote :

The problem is the same for NIS: https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/119660

I do agree that porting autofs to upstart would be ideal. Unfortunately, it seems it requires a good knowledge of Ubuntu's upstart events chain to do it properly. Maybe someone knowledgeable enough with the latter can come up with an elegant rewrite of https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/119660/comments/17

I had in mind something like /etc/init/autofs-ldap.conf (that would be part of the autofs5-ldap package):
[...]
start on (started rc-sysinit and started portmap)
[...]
script
  [ -e /usr/lib/autofs/lookup_ldap.so ] || exit 0
  /etc/init.d/autofs restart
end script

Would that do the trick elegantly enough ?

Revision history for this message
Cédric Dufour (cdufour-keyword-ubuntu-086000) wrote :

After a few reboot, it seems I found the quick-'n-elegant fix for that issue:

root@lucid-golden:~ # cat /etc/init/autofs-ldap.conf
# Restart AutoFS-LDAP after everything has settled
start on (stopped networking and stopped rc RUNLEVEL=[2345])
exec /etc/init.d/autofs restart

Problem with depending on 'portmap' is that it may not be installed (since 'autofs5' only recommends 'nfs-common' and indirectly 'portmap') and may not be necessary (it seems one may use autofs-ldap to mount other-than-NFS network filesystem, e.g. CIFS).

Now comes the issue of a (ported) /etc/init/autofs.conf: should it necessarily depend on 'networking' (and thus make the /etc/init/autofs-ldap.conf unnecessary) or can we imagine that autofs may be used for non-network filesystems (and should thus not depend on 'networking'; /etc/init/autofs-ldap.conf should thus be kept separate, with the 'networking' dependency but without the 'rc' one) ?

Hope this helps. Cheers

Revision history for this message
Bruce Edge (bruce-edge) wrote :

Gets worse if you add SAN volumes that are NFS exported.
There's a corner case here that's not working at all:

1 - QLogic SAN - Fails to come up until I reload qla driver with modprobe -r/modprobe
2 - NFS export, since #1 didn't come up, export also fails.
3 - Since #2 didn't come up, autofs also fails.

Revision history for this message
Bruce Edge (bruce-edge) wrote :

I'd like to bump the priority on this as it makes it impossible for servers to come up clean.

For an LTS release, I would expect that having servers boot clean would be a priority.

Revision history for this message
Lenin (gagarin) wrote :

Absolutely, this should be fixed for any stable release, not just LTS.

Revision history for this message
Pat Double (patdouble) wrote :

I'm not sure if this is related, but my problem is similar except that statd is not starting and so autofs breaks. It was working over a week ago.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.