Re: [systemd-devel] Dependencies on DBus activated services during shutdown

2018-01-24 Thread Lennart Poettering
On Mo, 08.01.18 16:07, Michal Koutný (mkou...@suse.com) wrote: > Hello, > I'd like to ask your opinion on the following situation. > > B.service exposes its API through D-Bus. A.service uses this API and > thus it has a dependency on B.service. This is implicit though -- and > we're happy we can

Re: [systemd-devel] Dependencies on DBus activated services during shutdown

2018-01-08 Thread Michal Koutný
On 01/08/2018 05:52 PM, Simon McVittie wrote: > Does A.service even need B.service during shutdown if it has not > previously interacted with (=> started) B.service? That's not correct implication, due to concurrency, B.service may be stopped before A.service. > On Mon, 08 Jan 2018 at 16:53:04 +01

Re: [systemd-devel] Dependencies on DBus activated services during shutdown

2018-01-08 Thread Andrei Borzenkov
08.01.2018 22:27, Michal Koutný пишет: > > > On 01/08/2018 08:04 PM, Andrei Borzenkov wrote: >> If systemd could infer that A requested B to be started it could also >> add implicit ordering between A and B. > Yes, this would be a way to the complete solution where all dependencies > are tracked

Re: [systemd-devel] Dependencies on DBus activated services during shutdown

2018-01-08 Thread Michal Koutný
On 01/08/2018 08:04 PM, Andrei Borzenkov wrote: > If systemd could infer that A requested B to be started it could also > add implicit ordering between A and B. Yes, this would be a way to the complete solution where all dependencies are tracked (however, I'm not sure it's achievable). Activation

Re: [systemd-devel] Dependencies on DBus activated services during shutdown

2018-01-08 Thread Andrei Borzenkov
08.01.2018 18:53, Jérémy Rosen пишет: > well, afaict from your description the information "A needs B" is > totally implicit, there is no place where this info is available, so no > way to pass that info to systemd. > If systemd could infer that A requested B to be started it could also add impli

Re: [systemd-devel] Dependencies on DBus activated services during shutdown

2018-01-08 Thread Simon McVittie
On Mon, 08 Jan 2018 at 16:07:48 +0100, Michal Koutný wrote: > As it comes, A.service needs B.service for proper termination. During > the shutdown transaction there is unspecified ordering of the two (since > the dependency is implicit only) and B.service is stopped before A.service. Does A.servic

Re: [systemd-devel] Dependencies on DBus activated services during shutdown

2018-01-08 Thread Jérémy Rosen
well, afaict from your description the information "A needs B" is totally implicit, there is no place where this info is available, so no way to pass that info to systemd. That means that the only way to fix that without explicitely telling someone about the dependency is to allow dbus to star

[systemd-devel] Dependencies on DBus activated services during shutdown

2018-01-08 Thread Michal Koutný
Hello, I'd like to ask your opinion on the following situation. B.service exposes its API through D-Bus. A.service uses this API and thus it has a dependency on B.service. This is implicit though -- and we're happy we can rely on D-Bus activation and needn't to list all dependencies explicitly. A