Ubuntu

Comment 1 for bug 728047

Clint Byrum (clint-fewbar) wrote :

Hi Slu, thanks for taking the time to file this bug and help us make ubuntu better.

You don't mention what version you were on before. The start condition for smbd has been the same since Feb of last year:

samba (2:3.4.5~dfsg-2ubuntu2) lucid; urgency=low

  * Switch smbd and nmbd over to upstart jobs, to ensure nmbd starts reliably
    after the network is up. LP: #523868.
  * Remove /etc/network/if-up.d/samba on upgrade, superseded by the above.

 -- Steve Langasek <email address hidden> Thu, 18 Feb 2010 12:51:45 +0000

smbd is started as soon as local-filesystems is emitted by mountall, which is very early in the boot.

To fix this issue on lucid, we could very easily add an upstart job to the slapd package which removes it from the sysvinit startup and starts it before smbd:

# slapd-before-samba
start on starting smbd
task
script
  update-rc.d slapd remove || :
  update-rc.d slapd stop 70 0 1 6 .
  exec /etc/init.d/slapd start
end script

Of course, even better would be to simply create an upstart job for slapd which can define starting smbd as its start criteria (or even better, start on starting NEEDS_LDAP=1 and then export that in smbd and other services' upstart job definitions).

This sounds like its been the case since 10.04 was released though, so I'm not sure what the importance should be. For now I'm going to mark this as Triaged and Medium, as this sounds like a new accidental regression for a limited set of users (who run their slapd and smbd on the same box). If you could please confirm that this was caused by an upgrade from hardy or karmic to lucid, that would help (and would warrant tagging this bug hardy2lucid or karmic2lucid). It doesn't make any sense that any of the lucid updates would cause it.

The key is that slapd is explicitly started at level 19 in the sysvinit sequence. This seems deliberate, since it is common for slapd to support other services locally. Since samba has been moved out of the sysvinit sequence, to make it depend on slapd one must do something like above.

This is similar to bug #445619 which documents the same effect for kerberos servers which depend on slapd

In summary, marking Triaged, setting importance to Medium. Also adding openldap task since this really has to be fixed there, though it might be worked around in samba for SRU's.