Bug 75704 - systemd does not handle service dependencies correctly
Summary: systemd does not handle service dependencies correctly
Status: RESOLVED WORKSFORME
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: ARM Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-03 11:22 UTC by hp4everything
Modified: 2016-06-10 12:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
requested information, unpack with tar -xvzf data.tgz (2.23 KB, application/octet-stream)
2014-03-03 14:13 UTC, hp4everything
Details

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.