Dear Maintainer, the ntpd reports the following error when starting: statistics directory /var/log/ntpsec/ does not exist or is unwriteable, error No such file or directory While the service seems to be able to start, this directory is never created and logs / statistics are not written. Attached is a patch that creates this directory. Note, that we need to use tmpfiles.d as this directory is on /var. Best regards, Felix Moessbauer Siemens AG
This is intentional. The logging is optional and whether the directory exists controls this. One advantage of that is the ntpsec-ntpviz package can create that directory to enable logging, which is required for ntpviz to be useful. Otherwise, it would have to edit the config file, which is riskier. I'm closing this bug report, as a housekeeping thing, but we can re-open if needed.
Hi Richard, that's a quite uncommon interface. Is this at least documented somewhere? Also the "error" should be downgraded to a "warning" at least. Well... for that conf.d style configs are usually used. For me the whole ntp / ntpsec seems to need a bigger overhaul... Felix
Control: reopen -1
ntp.conf
commit b06f1d8177a9b0a2593947a2ebefcb43e94ac281
Author: Santiago Vila <sanvila@debian.org>
Date: Sun Dec 24 15:36:25 2023 -0600
Downgrade missing stats dir log severity
The Debian package does not create /var/log/ntpsec by default. The
admin is directed (by a comment in ntp.conf) to create it if and only
if they want logging. However, upstream ntpsec logs an error message
if the log directory does not exist.
Closes: 1049424
Signed-off-by: Richard Laager <rlaager@debian.org>
[The commit message / patch description is my wording.]
Yeah. ntpsec supports those _now_. (I don't know that it did at the
time.) So maybe that's a better answer.
Okayy... I was just looking at the manpage. Right. I re-tested on a bookworm system where this issue first popped up. Anyways, thanks for the pointer. Felix
(Replying via mobile, so non-Debian address.) It should be reasonably possible to convert this to .d style. I will have to dig into this to fully consider all the implications, especially around handling upgrades. I think part of the issue here is that ntpd logs there by default. That is, you don’t turn on logging. I’m not sure if there is a way to turn off logging. But I have to check. I want to maintain the same posture we have now: - No logs by default. Most people don’t use them, so this is pointless I/O. - People can enable logs reasonably easily. - Installing ntpviz automatically enables logs. For upgrades, I can use the presence or absence of the directory for most of the handling. I do need to think through what happens / what to do if someone has customized any of the other log settings.