[systemd-devel] I want to ask you a fundamental question to you about dependency and starting sequence among units.
Hello. As I'm a starter in systemd, I want to ask you a fundamental question. That is how to understand existing relation from dependent and starting perspective. If you check a image file I attached, it' more clear. Actually, I have studied systemd structure to add my processes in systemd structure. Although I have read many manpage whicn is on freedesktop.org, I thought that I might not yet understand dependency and boot sequence among units after comparing results from systemd-analyze plot and dot tool. So, I want to get clear conception of dependency and boot sequence. When I first read a manpage which explains [Unit] option, I find a Wants=. For example, I make a A.service which has an Want = B.service. If A.service is started by systemd, I think that B.service will be started after A.service is totally completed. ( Is it right to use a words totally completed to explain execution of A.sevice? And I'm confused words which explain some parts of Wants=, I couldn't understand the expression start-up. Does it mean that a unit listed in Want= option will be started after the configuring unit is finished? ) if so, I think this relationship like below 1. B.service is a dependency of A.service. 2. A.service is started before B.service is started in sequential perspective of boot sequence among units. 3. if B.service is in A.service.want folder, a implicit dependency is made between A.service and B.service( result will be same as No.1) In my view, this is a critical time to develop the knowledge of systemd. I wait someone who explains those things more definite than before. Thanks Tony Seo ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] I want to ask you a fundamental question to you about dependency and starting sequence among units.
On Wed, Jul 24, 2013 at 7:15 PM, Tony Seo tonys...@gmail.com wrote: When I first read a manpage which explains [Unit] option, I find a Wants=. For example, I make a A.service which has an Want = B.service. If A.service is started by systemd, I think that B.service will be started after A.service is totally completed. ( Is it right to use a words totally completed to explain execution of A.sevice? And I'm confused words which explain some parts of Wants=, I couldn't understand the expression start-up. Does it mean that a unit listed in Want= option will be started after the configuring unit is finished? ) if so, I think this relationship like below 1. B.service is a dependency of A.service. 2. A.service is started before B.service is started in sequential perspective of boot sequence among units. 3. if B.service is in A.service.want folder, a implicit dependency is made between A.service and B.service( result will be same as No.1) #1 and #3 are correct, but #2 is not. Properties like Wants= or Requires= only define *dependencies* – if A has Wants=B, then starting A will also make systemd try to start B – but they do not define any sort of *order*. There is a separate set of properties, After= and Before=, that specify order, but do not add any dependencies. For example, if A has After=B, or if B has Before=A, then they will be started sequentially (A will be started after B has started). If order is not specified, both will be started at the same time. As for the terms... it seems that the general stages are inactive, activating (in the startup process), active (has finished startup), and deactivating. I'm not entirely sure what stages apply to .service units. -- Mantas Mikulėnas graw...@gmail.com ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel