Re: [systemd-devel] Wtrlt: Antw: Re: Can I enable/disable a target?

2019-05-09 Thread Michael Biebl
Am Do., 9. Mai 2019 um 15:52 Uhr schrieb Ulrich Windl
:
>
> (Sorry, I didn't send to the list before)
> >>> Ulrich Windl  schrieb am 09.05.2019 um 
> >>> 14:28
> in Nachricht <5cd44cae.ed38.00a...@rz.uni-regensburg.de>:
>  Michael Biebl  schrieb am 09.05.2019 um 12:29 in 
>  Nachricht
> > :
> > > Am Do., 9. Mai 2019 um 12:27 Uhr schrieb Ulrich Windl
> > > :
> > >>
> > >> Hi!
> > >>
> > >> Whenever I try to enable or disable a target (that exists), I get 
> > >> "Failed to
> >
> > > execute operation: No such file or directory". What file or directory,
> > > please? Or what is the command trying to say?
> > >
> > > Can you share the target unit please.
> > > Into what location have you installed the unit file?
> >
> > This is after fixing obvious errors:
> > # systemctl enable iotwatch.target
> > Failed to execute operation: No such file or directory
> > # cat /run/systemd/generator.late/iotwatch.target
> > [Unit]
> > Description=iotwatch I/O performance monitor
> > Documentation=man:iotwatch@.service(8) man:iotwatch-generator(8)
> > After=nss-lookup.target time-sync.target paths.target
> > Wants=iotwatch@VAR.service
> >
> > [Install]
> > WantedBy=multi-user.target

This doesn't make sense. You generate an ephemeral runtime unit in
/run but you then try to enable it in /etc.

To make it easier to help, you should give us an idea/overview what
you are trying to achieve. What you did so far (and why), what
environment you are using etc.

It's really hard to give you a good answer when we don't even tell us
the systemd version and distro you are using.

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] Wtrlt: Antw: Re: Can I enable/disable a target?

2019-05-09 Thread Ulrich Windl
(Sorry, I didn't send to the list before)
>>> Ulrich Windl  schrieb am 09.05.2019 um 
>>> 14:28
in Nachricht <5cd44cae.ed38.00a...@rz.uni-regensburg.de>:
 Michael Biebl  schrieb am 09.05.2019 um 12:29 in 
 Nachricht
> :
> > Am Do., 9. Mai 2019 um 12:27 Uhr schrieb Ulrich Windl
> > :
> >>
> >> Hi!
> >>
> >> Whenever I try to enable or disable a target (that exists), I get "Failed 
> >> to 
> 
> > execute operation: No such file or directory". What file or directory, 
> > please? Or what is the command trying to say?
> > 
> > Can you share the target unit please.
> > Into what location have you installed the unit file?
> 
> This is after fixing obvious errors:
> # systemctl enable iotwatch.target
> Failed to execute operation: No such file or directory
> # cat /run/systemd/generator.late/iotwatch.target
> [Unit]
> Description=iotwatch I/O performance monitor
> Documentation=man:iotwatch@.service(8) man:iotwatch-generator(8)
> After=nss-lookup.target time-sync.target paths.target
> Wants=iotwatch@VAR.service 
> 
> [Install]
> WantedBy=multi-user.target
> 
> 
> 




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

[systemd-devel] Wtrlt: Antw: Re: Can I enable/disable a target?

2019-05-09 Thread Ulrich Windl
(Sorry, I didn't sent to the list before)
>>> Ulrich Windl  schrieb am 09.05.2019 um
13:22
in Nachricht <5cd44c66.ed38.00a...@rz.uni-regensburg.de>:
 Michael Biebl  schrieb am 09.05.2019 um 12:29 in
Nachricht
> :
> > Am Do., 9. Mai 2019 um 12:27 Uhr schrieb Ulrich Windl
> > :
> >>
> >> Hi!
> >>
> >> Whenever I try to enable or disable a target (that exists), I get "Failed
to 
> 
> > execute operation: No such file or directory". What file or directory, 
> > please? Or what is the command trying to say?
> > 
> > Can you share the target unit please.
> > Into what location have you installed the unit file?
> 
> Good question: I should have been created by a generator, so the location 
> should be /run/systemd/generator*, but I could not find it. I have the 
> feeling that "systemctl daemon-reload" did not trigger the generator (which

> is at /usr/lib/systemd/system-generators/iotwatch-generator).
> 
> OK, trying to run the generator manually I found that it exits with 1, not 
> creating the target. Wouldn't it be nice if systemd would log failed 
> generators?
> 
> So I fixed the generator (it can still exit with 1, but no longer in the 
> success-case).
> 
> Now I have some "bad" state:
> # systemctl status iotwatch.target  

>● iotwatch.target - iotwatch I/O performance monitor
>Loaded: loaded (/run/systemd/generator.late/iotwatch.target; bad; vendor

> preset: disabled)
>Active: inactive (dead) since Thu 2019-05-09 12:39:45 CEST; 39min ago
> ...
> 
> What is that "bad" referring to? The target 
> /run/systemd/generator.late/iotwatch.target looks like this:
> # cat /run/systemd/generator.late/iotwatch.target
> [Unit]
> Description=iotwatch I/O performance monitor
> Documentation=man:iotwatch@.service(8) man:iotwatch-generator(8)
> After=nss-lookup.target time-sync.target paths.target
> Wants=iotwatch@VAR.service 
> 
> [Install]
> WantedBy=multi-user.target
> 
> Regards,
> Ulrich
> 
> 
> 



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