Bug 75704

Summary: systemd does not handle service dependencies correctly
Product: systemd Reporter: hp4everything
Component: generalAssignee: systemd-bugs
Status: RESOLVED WORKSFORME QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: ARM   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: requested information, unpack with tar -xvzf data.tgz

Description hp4everything 2014-03-03 11:22:09 UTC
I'm running minidlna and httpd on a RaspPI with archlinuxarm. Disk space for both services is located on a NAS drive and automounted. Both service files therefore contain the following dependencies:

---------------------------------------------
Requires=network.target autofs.service remote-fs.target nss-lookup.target
After=network.target autofs.service remote-fs.target nss-lookup.target
---------------------------------------------

Both services fail to start (see syslog messages below, which indicate that the NAS-directories are not yet mounted or mountable)

- httpd exits because its root-directory is not yet available
- minidlna keeps running in an invalid state, because it didn't find its directories during startup

After that both services can be started manually without problems with systemctl start ...


Jan  1 01:00:22 mars minidlnad[189]: [1970/01/01 01:00:22] minidlna.c:582: error: Media directory "P,/srv/dlna/bilder" not accessible [Datei oder Verzeichnis nicht gefunden]

Jan  1 01:00:33 mars apachectl[187]: Syntax error on line 174 of /etc/httpd/conf/httpd.conf:
Jan  1 01:00:33 mars apachectl[187]: DocumentRoot must be a directory
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-03-03 13:18:26 UTC
Can you show the output of 'systemctl cat minidlna', 'systemctl cat httpd' (or whatever the units are called)? And the output of systemctl list-dependencies --all for them?
Comment 2 hp4everything 2014-03-03 14:13:34 UTC
Created attachment 95026 [details]
requested information, unpack with tar -xvzf data.tgz

information as you requested in 4 file

minidlna.dependencies
httpd.dependencies
minidlna.cat
httpd.cat

the .cat files are generated by the cat-command, my systemctl doesn't know any cat-option for the systemctl-command.

The service files for httpd and minidlna are the files from the original archlinux-distribution with the exception, that I've added the Requires- and After-Options.

BR
Hans-Peter
Comment 3 Lennart Poettering 2014-06-23 17:24:11 UTC
Can you please attach the files as-is without making it so complicated to view them?
Comment 4 Lennart Poettering 2016-06-10 12:58:01 UTC
Closing due to lack of response.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.