LWN.net Logo

The novelity is in combination of ideas...

The novelity is in combination of ideas...

Posted May 27, 2010 16:40 UTC (Thu) by spaetz (subscriber, #32870)
In reply to: The novelity is in combination of ideas... by spaetz
Parent article: The road forward for systemd

> One of the things I thought is that systemd does NOT require explicit dependency information.[...]
> So do we need to code in the explicit dependency information into the
> avahi.service config?

I was not sure because the initial blog post both seems to hint that explicit dependencies become redundant:

"Also, dependencies between services will no longer necessarily have to be configured to allow proper parallelized start-up" "...dependency management also becomes redundant..." "[In critique of upstart] So, instead of letting the computer figure out what to do based on the dependencies, the user has to manually translate the dependencies into simple event/action rules."
But it also says that it is possible:
"All these units can have dependencies between each other (both positive and negative, i.e. 'Requires' and 'Conflicts')" "11. systemd supports several kinds of dependencies between units. After/Before can be used to fix the ordering how units are activated. It is completely orthogonal to Requires and Wants,"
So would avahi explicitely specify dependencies on dbus and syslogd in its .service file? It seems it would. BTW, dependencies seem to be better explained in this mail explaining the dependency information in .service files: http://lists.freedesktop.org/archives/systemd-devel/2010-May/000015.html


(Log in to post comments)

The novelity is in combination of ideas...

Posted May 31, 2010 16:08 UTC (Mon) by mezcalero (guest, #45103) [Link]

Yes, you raise a good question.

To light this up a bit: in systemd you can express both ordering and requirement dependencies. You can both configure them manually, and systemd will automatically add quite a few additional ones for you (Example: we will automatically add a "Requires" dependency from every file system listed in /etc/fstab to the device it is mounted from). However, for most cases for normal services you will not need to manually configure any dependencies, as the various ways of activation will deal with that automatically. Manual dependency configuration is really only necessary for units necessary for the very early boot, or the very late shut down.

Or in other words: we use dependencies internally, we also expose them to the user, but he should only very seldom need to make use of them.

This is a bit different from launchd, which really knows no dependencies at all. For that they pay a certain price though: their early boot-up is done completely differently from the actual service startup. Since our Linux start-up procedure is more complicated then theirs we hence decided to provide both: the dependency-less main boot-up plus manual dependencies for a few special services involved with very early boot.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds