Re: [chrony-users] Feature suggestion: "reloadconfig" command

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On 03/09/2012 15:35, Miroslav Lichvar wrote:
On Thu, Aug 23, 2012 at 03:35:56PM +0100, Tomalak Geret'kal wrote:
Hey

My /etc/chrony.conf is owned by an automated tool (of sorts) which
currently has to kill the chrony process and restart it, in order
for chrony to pick up new config when it's made. This doesn't feel
too robust, since the kill could theoretically fail and then the
restart wouldn't work either, leaving the confi changes unapplied.

It would be lovely if I could just send "reloadconfig" to chronyc
and have /etc/chrony.conf re-parsed for me.
That would be pretty hard to do in the current code. Also, some parts
of the config are evaluated under root (refclocks, port binding) and
can't be changed after the permissions are dropped.

How can killing chronyd fail? If the daemon doesn't respond to the
signal, will reloading work?

A kill with SIGINT/SIGTERM relies on the signal handlers working properly and being bugless which, for any process, cannot be 100% guaranteed, and the delay before actual process termination is unknown.

A kill with SIGKILL does not allow chrony to do its exit-time stuff, but solves the above problem.

The best way around this I suppose would be to attempt SIGTERM, then resort to SIGKILL a few moments later if the SIGTERM was deemed to have been ineffective, but this greatly complicates my calling code and introduces a synchronous block (unless I further complicate the flow of the calling code).

Tom

--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/