Re: Q: daemon-reload: when and how?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Le jeu. 18 juin 2020 à 08:53, Ulrich Windl <Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx> a écrit :
Hi!

I have a question: systemd monitors almost everything it seems to me. So I wonder:
Under what conditions is it necessary to issue a daemon-reload, and why can't systemd find out itself that a daemon-reload is required?

There are some cases where systemd can detect the proper time for a daemon-reload, and does it implicitely
systemd also check mtime of configuration files so it can see when a daemon-reload should be done.

However it is not because a file has been modified that systemd should decide to reload by itself.
multiple unit files need to work together to make a working environment, and systemd can't know when all changes are consistent and
it is safe to reload. So systemd will want an explicit order from the user.

So if I think a "manual" daemon-reload is required, is it safe to do it from within a unit?

Usually, calling daemon-reload from a unit is a sign of bad design or misunderstanding of some tool. What exactly is the problem you are
trying to solve ?
 
I have a "generator-like" type of unit that changes the configuration of other units. However, as it seems, systemd ignores such changes until I use daemon-reload...

Yes. you need an explicit daemon-reload here.
why can't it be a real generator ?

could you use systemd-run or the equivalent dbus API to do what you are trying to do ?
 

(systemd-228-157.9.1.x86_64 of SLES12)

Ouch that's old...
Hopefully there are not too many missing features I'm used to have in there...

Regards
Jeremy 

Regards,
Ulrich



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


--
SMILE 

20 rue des Jardins
92600 Asnières-sur-Seine

Jérémy ROSEN
Architecte technique

email jeremy.rosen@xxxxxxxx 
phone  +33 6 88 25 87 42 
url http://www.smile.eu

Twitter Facebook LinkedIn Github

Découvrez l’univers Smile, rendez-vous sur smile.eu
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux