Re: [systemd-devel] Explain status "Loaded: not-found (Reason: No such file or directory)"

2019-05-09 Thread Reindl Harald


Am 09.05.19 um 12:25 schrieb Ulrich Windl:
> I'm developing a service and getting the status of my target gives:
> ● iotwatch.target
>Loaded: not-found (Reason: No such file or directory)
>Active: active since Thu 2019-05-09 12:00:56 CEST; 18min ago
> 
> I guess it's not a file named "Reason" that's missing. Despite of my
> recommendation to create helpful error messages, can you explain what it 
> means?
> Even after an strace I could not find out what is missing.

iotwatch.target and the large amount of posts about abolsute basics with
no information like contents of unit files is annoying

and frankly starting your conversations with "Cause of the trouble (and
possible reason for systemd's unpopularity) seems to be rather arbitrary
restrictions without reasoning (which is completely against the GNU
spirit of seeking for limitless software)" won't get you far when you
state that you lived under a stone for nearly a decade and now are
starting by zero with systemd
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Explain status "Loaded: not-found (Reason: No such file or directory)"

2019-05-09 Thread Lennart Poettering
On Do, 09.05.19 12:25, Ulrich Windl (ulrich.wi...@rz.uni-regensburg.de) wrote:

> Hi!
>
> I'm developing a service and getting the status of my target gives:
> ● iotwatch.target
>Loaded: not-found (Reason: No such file or directory)
>Active: active since Thu 2019-05-09 12:00:56 CEST; 18min ago
>
> I guess it's not a file named "Reason" that's missing. Despite of my
> recommendation to create helpful error messages, can you explain what it 
> means?
> Even after an strace I could not find out what is missing.

"Loaded" is a field that indicates whether the unit definition was
properly loaded from the unit file. Here, it's shown as "not-found",
which is the value indicating that no unit file by the name
"iotwatch.target" could be found. Then, in brackets you get some
additional information: here "Reason:" is the field that indicates the
reason why the unit file wasn't found, and this usually gives you a
UNIX error code, i.e. the text string associated with an "errno"
code. "No such file or directory" is the string for ENOENT, i.e. it's
the simplest of cases here: there really just was no file found by the
name you requested.

Typically, when you see "not-found" as "Loaded" value, you'll also see
"No such file or directory" as "Reason" value, but there are some
other cases, since units are not always synthesized from unit files on
disk, but from other concepts too.

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Explain status "Loaded: not-found (Reason: No such file or directory)"

2019-05-09 Thread Andrei Borzenkov
09.05.2019 13:25, Ulrich Windl пишет:
> Hi!
> 
> I'm developing a service and getting the status of my target gives:
> ● iotwatch.target
>Loaded: not-found (Reason: No such file or directory)
>Active: active since Thu 2019-05-09 12:00:56 CEST; 18min ago
> 
> I guess it's not a file named "Reason" that's missing. Despite of my
> recommendation to create helpful error messages, can you explain what it 
> means?
> Even after an strace I could not find out what is missing.
> 

It means that unit definition file (iotwatch.target) was not found in
any directory where systemd looks for it.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel