severity 704950 grave
done

because obvious critical data loss (though the case is not common).

On 2013-04-08 15:47:42 +0100, Paul Martin wrote:
> severity 704950 minor
> tags 704950 wontfix
> thanks
> 
> On Mon, Apr 08, 2013 at 01:30:20PM +0200, Vincent Lefevre wrote:
> > On 2013-04-08 09:38:17 +0100, Paul Martin wrote:
> > > On Sun, Apr 07, 2013 at 11:40:17PM -0500, Vincent Lefevre wrote:
> > > > Note that the timezone was changed from Europe/Paris to US/Central
> > > > earlier this day. This may be related. But I'd expect logrotate to
> > > > obviously consider UTC time when comparing dates; if it does, this
> > > > cannot explain the above errors.
> > > 
> > > Sorry, no.  It uses local time, to match how cron(8) works.
> > 
> > I don't see why this is necessary. Note that cron doesn't do
> > time stamp comparisons, AFAIK. At least cron has never thought
> > that some file has been created in the future.
> 
> But cron does run on local time, so logrotate has to be able to cope
> with daylight savings time changes.  Hence it runs on local time too.

There's no problem with that. But Linux is not Windows. Even though
logrotate runs on local time, the system is aware of UTC time. For
comparing two events, this should be done with UTC time.

One part of the bug is that logrotate rotates the log files instead
of not changing anything if it incorrectly guesses that a file has
been written in the future. So, if the timezone changes several
times (e.g. during a travel), some logs may be lost, even recent
ones, while they would normally be kept e.g. for several weeks!
Logs are important data. Losing logs is not acceptable.

> > > Gandi hosting, perhaps?
> > 
> > No, just a laptop, which comes with me when I travel.
> 
> In that case, edit /etc/cron.daily/logrotate and change it to have
> 
>    TZ=UTC /usr/sbin/logrotate /etc/logrotate.conf
> 
> so that it doesn't care about the local time zone.

No!!! This is wrong!

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to