On Mon, 06.08.12 10:16, Holger Freyther (hol...@freyther.de) wrote: > Hi, > > I have launched "systemd --user", created a bts.service file, added > 'ConditionPathExists=' in the Unit section of my service. Then I > launched my service with 'systemctl --user start ...' and as the > path does not exist, the condition_test fails and the service is not > started. > > Next I tried to figure out if I my users would be able to understand > why the service was not started. This appears to be not possible. > > The first part is that the Unit only holds condition_result and does > not store which test failed. E.g. if a Unit has multiple tests it > is not possible to know which test has failed. The debug output will > simply state that one condition has failed. The second issue is that > after the Unit has been garbage collected(???) the condition_result > is gone and will not be restored. My users would have to query the > status fast enough to maybe see the condition failure in the status. > > Do you consider these issues worth fixing? Is this due running > systemd as a user?
So yupp, we currently do not store which conditions failed. It probably makes sense to store that and expose it on the bus. (added this to the TODO list now). Whether we should GC the units or not is a problematic issue. We used to keep more services around, but nowadays we GC services much more aggressively. It's always a bit of a balance between "what is interesting" and "let's save some memory", and the question where we choose good defaults. In a way "RemainAfterExit=yes" could be used to keep a service around even on success, but that's a bit of a hack. So, dunno, I am open to suggestions here... Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel