[Samba] Option configure

mathias dufresne infractory at gmail.com
Tue Jul 12 13:47:18 UTC 2016


\o/

Martin, thank you very much : )

Our unit files were configured with "Type=forking". I just changed that to
replace it by "Type=notify" and these unit files are starting all three
daemons (nmbd, smbd, winbindd) without killing them after some time.

I did tried that change in our unit files on others servers, with older
Samba version compiled without --with-systemd and changing type to notify
was also enough on these systems.

I expect the issue raised because our deployment script should push these
unit files rather than using those build during packaging (perhaps they are
built only when using --with-systemd, not tested yet).

Thank you all for that : )

2016-07-12 15:10 GMT+02:00 martin <martini5468 at gmail.com>:

> On Tue 12/07/2016 13:11, mathias dufresne wrote:
> > I expect the --with-systemd is to add the little piece of code which
> makes
> > Samba systemd unit files to work correctly, for systemd stop killing
> > processes after some timeout because it doesn't received the right
> message
> > from Samba.
>
> Hi Mathias,
>
> A while back we built a test system to try the 4.3 and later packages
> and had the same issue. We configured samba with:
> "./configure --without-ad-dc --with-systemd --disable-cups
> --libdir=/usr/lib64 --prefix=/usr --sysconfdir=/etc --localstatedir=/var
> --with-piddir=/var/run --with-sockets-dir=/run --enable-fhs"
>
> After the package build we had a few .service files - I guess as a
> result of the --with-systemd switch.
>
> The content of the nmb.service file is:
> [Unit]
> Description=Samba NMB Daemon
> After=syslog.target network.target
>
> [Service]
> Type=notify
> NotifyAccess=all
> PIDFile=/run/nmbd.pid
> EnvironmentFile=-/etc/sysconfig/samba
> ExecStart=/usr/sbin/nmbd $NMBDOPTIONS
> ExecReload=/usr/bin/kill -HUP $MAINPID
>
> [Install]
> WantedBy=multi-user.target
>
> We then replaced the current .service files on the system with the ones
> from the compiled package. However doing
> systemctl restart nmb smb winbind
>
> would cause each service to start and then die after a little while.
> Increasing the verbosity just showed the process getting a SIGHUP.
> Looking into systemd it seemed to think the process did not start at all.
>
> After some poking around the web [1] we took the original systemd files
> that ship with CentOS 7.2 and changed the .service files for nmb, smb
> and winbind to be:
> Type=forking
>
> While leaving the rest of the content of the file as is. This has
> resolved the issue with service control using systemd.
>
> I hope that might give you an idea of what your problem may be.
>
> Regards,
> Martin
> References:
> [1]
>
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Unit_Files.html
>


More information about the samba mailing list