Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139654 - logrotate USE flag for ntp adds logrotate configuration for ntp.log but no configuration to actually have ntp create that file
Summary: logrotate USE flag for ntp adds logrotate configuration for ntp.log but no co...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
: 155892 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-08 05:13 UTC by Brant Gurganus
Modified: 2007-01-03 01:52 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brant Gurganus 2006-07-08 05:13:43 UTC
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.
Comment 1 SpanKY gentoo-dev 2006-07-15 23:55:18 UTC
the default logfile is /var/log/ntp.log ... if your ntp.conf points to something else, that's because you changed it
Comment 2 Brant Gurganus 2006-07-16 04:44:14 UTC
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.
Comment 3 Peng Zhang 2006-09-04 17:33:48 UTC
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
> 

Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-11-21 21:40:39 UTC
*** Bug 155892 has been marked as a duplicate of this bug. ***
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-11-21 21:45:18 UTC
At least stick missingok into ntp.logrotate (Why? See Bug 155892)
Comment 6 DEMAINE Benoît-Pierre, aka DoubleHP 2006-11-21 23:03:01 UTC
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.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-11-21 23:52:09 UTC
(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?
Comment 8 DEMAINE Benoît-Pierre, aka DoubleHP 2006-11-22 00:22:01 UTC
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.
Comment 9 DEMAINE Benoît-Pierre, aka DoubleHP 2006-11-26 17:08:57 UTC
(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 :)
Comment 10 DEMAINE Benoît-Pierre, aka DoubleHP 2006-12-04 03:03:34 UTC
Bug 155892 Comment #1 works for me. I shut up. Thanks.
Comment 11 SpanKY gentoo-dev 2006-12-29 14:23:15 UTC
log rotate support dropped from ntp
Comment 12 Raymond Lewis Rebbeck 2007-01-02 23:07:21 UTC
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.
Comment 13 SpanKY gentoo-dev 2007-01-03 01:52:23 UTC
not really ntp's concern

file a new bug for the dhcp/baselayout maintainer