The logrotate USE flag makes ntp install a logotate configuration file at /etc/logrotate.d/ntp to rotate /var/log/ntp.log, but the default ntp configuration is not modified to log to that file.
the default logfile is /var/log/ntp.log ... if your ntp.conf points to something else, that's because you changed it
The file at /usr/portage/net-misc/ntp/files/ntp.conf contains no logfile directive. The file at /usr/portage/net-misc/ntp/files/ntpd.rc does not use --logfile to start ntpd. In the absence of a logfile directive or specification on the command line, the man page for ntpd indicates that the system log file is used, not ntp.log. As far as I can tell, no patch or configuration option used by Gentoo changes this default. Where are you getting the information that ntp.log is used by default? I have done several installations and the only setting I change in ntp.conf is the time servers to use.
read comment #2 (In reply to comment #1) > the default logfile is /var/log/ntp.log ... if your ntp.conf points to > something else, that's because you changed it >
*** Bug 155892 has been marked as a duplicate of this bug. ***
At least stick missingok into ntp.logrotate (Why? See Bug 155892)
Jakub, the idea of bug #155892 was rather about logrotate itself: why would a missing logfile make it crash and prevent rotating other files ? actually bugs for ntp log, but also may happen for any other reason, like lost or broken file after failed fsck. Warn should be ok. The critical point to me is that if a log file is missing, and logrotate is installed and configured, there should not be any acceptable reasons for logrotate to crash; thus, my title. Ntp today, apache tomorow, emerge next day ... cause by the mean time /var is growing huge. Thats why I am not satisfied of DUP state. For me, there is "broken code" at both places to be altered: ntp ebuild/conf, logrotate source.
(In reply to comment #6) > Jakub, the idea of bug #155892 was rather about logrotate itself: > why would a missing logfile make it crash and prevent rotating other files ? Maybe you should re-read Bug 155892 Comment #1 and man logrotate?
if Bug 155892 Comment #1 is the fix I need, then you should patch ebuild to fix this for other people before they complain. I do complain because I think that after running emerge && etc-update, system should work fine. It does not. I should not have to add manually missing options, nor touch absent files. Especially, I do not know if ntp missing file is the cause of logrotate not performing it's work, because program does NOT say if this is a fatal error ! I mean: output message is ambiguous. *** *** *** I added missingok to /etc/logrotate.d/ntp, wait 24h before telling it fixed.
(In reply to comment #8) > if Bug 155892 Comment #1 is the fix I need, then you should patch ebuild to [...] > I added missingok to /etc/logrotate.d/ntp, wait 24h before telling it fixed. cron.weekly passed, and /var/log/messages have neither been moved to .0 nor .old. Waiting for next sunday, just in case things were to work a different way than I expect. But since: root@moon_gen:/var/log# cat messages |grep logr root@moon_gen:/var/log# cat messages |grep ntp root@moon_gen:/var/log# I do thing there is a problem with cron: - not trying to run logrotate - or cron not sending warning/error messages to syslog - or logrotate to silently die. I still personnaly disagree with dup state of 155892. See you next sunday. Have a nice week :)
Bug 155892 Comment #1 works for me. I shut up. Thanks.
log rotate support dropped from ntp
dhcpcd automatically sets 'logfile /var/log/ntp.log' in /etc/ntp.conf when it obtains ntp information via dhcp. There does not appear to be any way to change this behaviour.
not really ntp's concern file a new bug for the dhcp/baselayout maintainer