Bug 9118 - Daemon startup fails with systemd
Summary: Daemon startup fails with systemd
Status: CLOSED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: samba4-qa@samba.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-25 01:19 UTC by Justin Maggard
Modified: 2012-10-09 12:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Maggard 2012-08-25 01:19:04 UTC
I am using the .service files included with Samba4.  The problem apparently comes from the fact that /var/run is now a symlink to /run, which is tmpfs.  When {smbd, nmbd, winbindd} starts up, it tries to create a directory under /var/run/samba; but unless you have something like Fedora's tmpfiles.d, the parent directory /var/run/samba will not exist after each time the system is rebooted, and the daemon will not attempt to create the parent directory, and ends up failing to start as a result.
Comment 1 Justin Maggard 2012-08-31 06:21:50 UTC
Okay, so tmpfiles.d is generic, and not Fedora-specific.  So another option would be to create a tmpfiles.d configuration file to go along with the systemd service files.
Comment 2 Jeremy Allison 2012-10-08 22:16:47 UTC
Justin, do you have a specific patch we can add ?

Jeremy.
Comment 3 Justin Maggard 2012-10-08 22:25:28 UTC
What I ended up doing is just creating a samba conf file in tmpfiles.d as follows:
::::::::::::::
/usr/lib/tmpfiles.d/samba.conf
::::::::::::::
d /run/samba 0755 root root -

Perhaps it would make sense to include this in packaging/systemd/?
Comment 4 Andreas Schneider 2012-10-09 12:30:20 UTC
I've added the samba.conf.tmp file from Fedora and documented it.