smbd as a daemon

Jeremy Allison jra at samba.org
Mon Mar 24 10:45:22 MDT 2014


On Mon, Mar 24, 2014 at 06:40:45PM +0200, Alexander Bokovoy wrote:
> >
> What is important here is that a service assumed to be operational
> once it returns control to the systemd. I.e. connecting to the service
> would perform something useful.

Yeah, but as you're finding, that's an incorrect assumption.

You can'task systemd anything about Samba status. All a
meta-daemon can say is 'yes I started the service'.

You have to ask the service itself if it's up and running.

> Our case is that some clustering software checks that smbd started
> (via 'systemctl status smb.service') and then attempts to connect to
> smbd with smbclient. The check fails, clustering tool considers
> smb.service did not start and reports a failure. It could repeat
> 'systemctl status smb.service' multiple times but why should it do if
> we could simply tell the truth at the point we are ready? Looping with
> systemctl is equally bad.

This is why when we were doing the same thing at SGI
for Samba failover clustering the "are you ready"
script called into Samba using smbclient before
deciding the service was ready.

When you get an answer to an SMB1/2/3 request, then
you know Samba is ready.

Jeremy.


More information about the samba-technical mailing list