NIS-based autofs maps don't load on startup

Bug #570513 reported by wfaulk
122
This bug affects 20 people
Affects Status Importance Assigned to Milestone
autofs5 (Ubuntu)
Invalid
Medium
Unassigned
nis (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: autofs5

I have all of my automount maps in NIS. Automount starts, but fails to load the maps on startup.

I would guess that the problem is that NIS starts after autofs:

rd-xd-faulk% ls /etc/rc3.d/S*{nis,autofs}*
/etc/rc3.d/S19autofs /etc/rc3.d/S99nis

(Same sequence numbers for runlevels 2, 4, and 5, as well.)

Description: Ubuntu lucid (development branch)
Release: 10.04

nis:
  Installed: 3.17-31
  Candidate: 3.17-31
  Version table:
 *** 3.17-31 0
        500 http://archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status
autofs:
  Installed: 5.0.4-3.1ubuntu4
  Candidate: 5.0.4-3.1ubuntu4
  Version table:
 *** 5.0.4-3.1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status

I had a similar problem under 9.10 that I never bothered to track down.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: autofs 5.0.4-3.1ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Mon Apr 26 22:37:56 2010
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/usr/intel/bin/zsh
SourcePackage: autofs5

Revision history for this message
wfaulk (wfaulk) wrote :
Revision history for this message
Thierry Carrez (ttx) wrote :

Looks like a dupe from bug 533029 ...
Any chance you could upgrade to autofs5 5.0.4-3.1ubuntu5 and check that it also fixes it for you ?

Changed in autofs5 (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
wfaulk (wfaulk) wrote :

That did not fix the problem.

This line from syslog looks relevant:

automount[1378]: lookup_init:136: lookup(yp): map auto.master: Local domain name not set

It looks like nis hasn't been converted to upstart, and autofs therefore can't depend on any event it might emit.

Revision history for this message
wfaulk (wfaulk) wrote :

I forgot to mention it, but if I stop/start autofs or reload autofs, the automounts start working.

Revision history for this message
Thierry Carrez (ttx) wrote :

The issue is that autofs is now an upstart script but NIS wasn't converted to upstart yet. So nothing ensures that NIS is started before AutoFS.

A workaround would be to reload AutoFS in /etc/rc.local, since S99rc.local should always run after S99nis.

Changed in nis (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Changed in autofs5 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Lars Kellogg-Stedman (lars-oddbit) wrote :

I'm also hitting this problem. Obviously the correct solution is to move nis to use upstart and then make autofs depend on nis being up. In the interim, I've modified autofs.conf to wait for the rc process to finish:

  start on (filesystem
        and net-device-up IFACE!=lo
        and stopped rc RUNLEVEL=[2345])
  stop on runlevel[!2345]

Revision history for this message
Dern (nico-sonycom) wrote :

Reloading autofs in /etc/rc.local doesn't work for me as my /usr/local is also automounted and seems to be busy at that time which makes autofs restart freeze.

@Lars Kellogg-Stedman: thanks, that does seem to work for me although I wonder what the side effects might be. If I understand this correctly it will make autofs start after everything else starts, right?

Nico

Revision history for this message
Lars Kellogg-Stedman (lars-oddbit) wrote :

@Dern: That's correct, anything started out of /etc/init.d will start up before autofs with this configuration. My solution is really just a hack to work around the fundamental problem.

Revision history for this message
Paul Elliott (omahn) wrote :

This should be fixed when bug 569757 is fixed (migration of NIS to upstart).

Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

This bug also breaks gdm on NIS accounts with automounted NFS home directories !

Revision history for this message
Robert Sander (gurubert) wrote :

This is a patch a applied to /etc/init/autofs.conf to make the autofs upstart job wait for NIS.

The loop was inspired by the same loop in /etc/init.d/nis.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch to /etc/init/autofs.conf waiting for NIS" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
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.