<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 18 juin 2020 à 12:44, Ulrich Windl <<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-regensburg.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>>> Jérémy ROSEN <<a href="mailto:jeremy.rosen@smile.fr" target="_blank">jeremy.rosen@smile.fr</a>> schrieb am 18.06.2020 um 11:01 in<br>
Nachricht<br>
<19710_1592470931_5EEB2D93_19710_59_1_CAFvCimXJwvDg0+5W11H0pUh+EHDTGxgbAuAGpG2PL<br>
<a href="mailto:gjC0iX7A@mail.gmail.com" target="_blank">gjC0iX7A@mail.gmail.com</a>>:<br>
> Le jeu. 18 juin 2020 à 08:53, Ulrich Windl <<br>
> <a href="mailto:Ulrich.Windl@rz.uni-regensburg.de" target="_blank">Ulrich.Windl@rz.uni-regensburg.de</a>> a écrit :<br>
> <br>
>> Hi!<br>
>><br>
>> I have a question: systemd monitors almost everything it seems to me. So I<br>
>> wonder:<br>
>> Under what conditions is it necessary to issue a daemon-reload, and why<br>
>> can't systemd find out itself that a daemon-reload is required?<br>
>><br>
> <br>
> There are some cases where systemd can detect the proper time for a<br>
> daemon-reload, and does it implicitely<br>
> systemd also check mtime of configuration files so it can see when a<br>
> daemon-reload should be done.<br>
<br>
Is there something like "systemd suggests daemon-reload" (assuming systemd<br>
detects the situation, but does not issue a reload itself)?<br>
<br></blockquote><div>Not that I know of...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> However it is not because a file has been modified that systemd should<br>
> decide to reload by itself.<br>
> multiple unit files need to work together to make a working environment,<br>
> and systemd can't know when all changes are consistent and<br>
> it is safe to reload. So systemd will want an explicit order from the user.<br>
<br>
I see (see above).<br>
<br>
> <br>
> So if I think a "manual" daemon-reload is required, is it safe to do it<br>
>> from within a unit?<br>
>><br>
> <br>
> Usually, calling daemon-reload from a unit is a sign of bad design or<br>
> misunderstanding of some tool. What exactly is the problem you are<br>
> trying to solve ?<br>
> <br>
> <br>
>> I have a "generator-like" type of unit that changes the configuration of<br>
>> other units. However, as it seems, systemd ignores such changes until I<br>
use<br>
>> daemon-reload...<br>
>><br>
> <br>
> Yes. you need an explicit daemon-reload here.<br>
> why can't it be a real generator ?<br>
<br>
AFAIK generators are quite low-level and have some restrictions. My unit is<br>
kind of high-level (e.g. it needs all filesystems mounted). Actually I started<br>
with a "normal" generator, but several restriction I can't remember right now<br>
made me change my mind to convert the generator to a "normal" (more or less)<br>
unit.<br>
<br></blockquote><div>generators are run very early during boot time so if you need external filesystems </div><div>mounted, that can indeed be a problem. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> could you use systemd-run or the equivalent dbus API to do what you are<br>
> trying to do ?<br>
<br>
Good question! ;-) Browsing through the manpage I got the impression that it's<br>
systemd's version of "batch" IMHO. I'm unsure whether this has any advantage<br>
for my problem. For dbus I must admit that I have no experience of any kind<br>
with it...<br>
<br></blockquote><div></div><div>Well, it has the advantage of not needing a daemon-reload and of getting rid of the </div><div>need to create a config file altogether... you talk directly to the running instance of systemd</div><div><br></div><div>(i'm not sure what you mean by "batch" in this context. this is about creating a unit, not some</div><div>kind of shell-script-like language)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Regards,<br>
Ulrich<br>
<br>
[...]<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><table border="0" style="border-collapse:collapse;border-spacing:0px;color:rgb(51,51,51);font-family:Raleway,regular;font-size:14px;padding:20px"><tbody><tr><td style="padding:0px 30px 0px 0px;font-size:13px;color:rgb(255,128,84);text-align:center"><a href="http://www.smile.eu/" style="background-color:transparent;color:rgb(221,72,20)" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/Logo-new.png" alt="SMILE" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"> </a><br><br><p style="margin:0px 0px 10px">20 rue des Jardins<br>92600 Asnières-sur-Seine</p></td><td style="padding:0px 0px 0px 20px;border-left:1px solid rgb(59,127,254);font-size:13px;color:rgb(255,128,84)"><div style="font-size:14px"><b>Jérémy ROSEN</b></div><div style="color:rgb(59,127,254)">Architecte technique<br></div><br><div style="color:rgb(59,127,254)"><span style="white-space:nowrap"><img src="http://ftp.smile.fr/client/Communication/signature/img/mail.png" alt="email" width="12" height="10" style="border: 0px; vertical-align: middle; margin-right: 5px;"> <a href="mailto:jeremy.rosen@smile.fr" style="background-color:transparent;color:rgb(59,127,254)" target="_blank">jeremy.rosen@smile.fr</a> </span><br><span style="white-space:nowrap"><img src="http://ftp.smile.fr/client/Communication/signature/img/phone.png" alt="phone" width="10" height="10" style="border: 0px; vertical-align: middle; margin-right: 5px;"></span>  +33 6 88 25 87 42 <br><span style="white-space:nowrap"><img src="http://ftp.smile.fr/client/Communication/signature/img/web.png" alt="url" width="12" height="12" style="border: 0px; vertical-align: middle; margin-right: 5px;"> <a href="http://www.smile.eu/" style="background-color:transparent;color:rgb(59,127,254)" target="_blank">http://www.smile.eu</a></span></div><br><div><span><a href="https://twitter.com/GroupeSmile" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-twitter.png" alt="Twitter" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span> <span><a href="https://www.facebook.com/smileopensource" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-facebook.png" alt="Facebook" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span> <span><a href="https://www.linkedin.com/company/smile" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-linkedin.png" alt="LinkedIn" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span> <span><a href="https://github.com/Smile-SA" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-github.png" alt="Github" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span></div></td></tr></tbody></table><br style="color:rgb(51,51,51);font-family:Raleway,regular;font-size:14px"><div style="color:rgb(51,51,51);font-family:Raleway,regular;font-size:14px"><a href="https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature" style="background-color:transparent;color:rgb(221,72,20)" target="_blank"><img src="https://signature.smile.eu/assets/img/bandeaux_signature_mail_yocto.gif.gif" alt="Découvrez l’univers Smile, rendez-vous sur smile.eu" border="0" style="border: 0px; vertical-align: middle;"></a></div></div></div></div></div></div>