GNU bug report logs - #30649
shepherd services with #:log-file overwrite their log file

Previous Next

Package: guix;

Reported by: Andreas Enge <andreas <at> enge.fr>

Date: Wed, 28 Feb 2018 14:51:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30649 in the body.
You can then email your comments to 30649 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#30649; Package guix. (Wed, 28 Feb 2018 14:51:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Enge <andreas <at> enge.fr>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 28 Feb 2018 14:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: bug-guix <at> gnu.org
Subject: Cuirass service does not rotate its logs
Date: Wed, 28 Feb 2018 15:50:39 +0100
Hello,

while testing the cuirass service on bayfront, I see the following:

$ ll /var/log/c*
-rw-r--r-- 1 root root 2003521 Feb 28 15:38 /var/log/cuirass.log

I am sure this 2MB file was about 14MB big this morning, and indeed
any information dating from before this morning, when I rebooted the
machine and thus restarted the service, has gone.

Notice also that there are no numbered files cuirass.log.1 etc..

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#30649; Package guix. (Wed, 28 Feb 2018 15:49:01 GMT) Full text and rfc822 format available.

Message #8 received at 30649 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 30649 <at> debbugs.gnu.org
Subject: Re: bug#30649: Cuirass service does not rotate its logs
Date: Wed, 28 Feb 2018 17:48:23 +0100
Hi Andreas,

On Wed, 28 Feb 2018 15:50:39 +0100
Andreas Enge <andreas <at> enge.fr> wrote:

> $ ll /var/log/c*
> -rw-r--r-- 1 root root 2003521 Feb 28 15:38 /var/log/cuirass.log
> 
> I am sure this 2MB file was about 14MB big this morning, and indeed
> any information dating from before this morning, when I rebooted the
> machine and thus restarted the service, has gone.
> 
> Notice also that there are no numbered files cuirass.log.1 etc..

The simplest and best way to fix that is to make cuirass use syslog.

Not every program has to have its own private logging implementation,
log rotator, log filterting, log rate limiter, kitchen sink etc.

src/cuirass/logging.scm is prepared somewhat for this possiblity[2], but it
doesn't yet log to syslog.

There are guile syslog bindings[1] and we should use them and then apply a
two-line patch to src/cuirass/logging.scm .

[1] http://puszcza.gnu.org.ua/software/gamma/manual/html_section/Syslog.html
[2] Replace current-logging-procedure




Information forwarded to bug-guix <at> gnu.org:
bug#30649; Package guix. (Thu, 01 Mar 2018 16:36:02 GMT) Full text and rfc822 format available.

Message #11 received at 30649 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Andreas Enge <andreas <at> enge.fr>, 30649 <at> debbugs.gnu.org
Subject: Re: bug#30649: Cuirass service does not rotate its logs
Date: Thu, 01 Mar 2018 17:35:09 +0100
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> Hi Andreas,
>
> On Wed, 28 Feb 2018 15:50:39 +0100
> Andreas Enge <andreas <at> enge.fr> wrote:
>
>> $ ll /var/log/c*
>> -rw-r--r-- 1 root root 2003521 Feb 28 15:38 /var/log/cuirass.log
>> 
>> I am sure this 2MB file was about 14MB big this morning, and indeed
>> any information dating from before this morning, when I rebooted the
>> machine and thus restarted the service, has gone.
>> 
>> Notice also that there are no numbered files cuirass.log.1 etc..
>
> The simplest and best way to fix that is to make cuirass use syslog.
>
> Not every program has to have its own private logging implementation,
> log rotator, log filterting, log rate limiter, kitchen sink etc.
>
> src/cuirass/logging.scm is prepared somewhat for this possiblity[2], but it
> doesn't yet log to syslog.
>
> There are guile syslog bindings[1] and we should use them and then apply a
> two-line patch to src/cuirass/logging.scm .

Indeed.  I wonder why we don’t have a Gamma package yet!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30649; Package guix. (Thu, 01 Mar 2018 16:36:05 GMT) Full text and rfc822 format available.

Message #14 received at 30649 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas <at> enge.fr>
Cc: 30649 <at> debbugs.gnu.org
Subject: Re: bug#30649: Cuirass service does not rotate its logs
Date: Thu, 01 Mar 2018 17:35:54 +0100
Andreas Enge <andreas <at> enge.fr> skribis:

> while testing the cuirass service on bayfront, I see the following:
>
> $ ll /var/log/c*
> -rw-r--r-- 1 root root 2003521 Feb 28 15:38 /var/log/cuirass.log

The cuirass service in GuixSD explicitly extends rottlog so that this
file is rotated on a weekly basis.  Perhaps you just need to wait a
little longer?

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30649; Package guix. (Thu, 01 Mar 2018 16:37:02 GMT) Full text and rfc822 format available.

Message #17 received at 30649 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas <at> enge.fr>
Cc: 30649 <at> debbugs.gnu.org
Subject: Re: bug#30649: Cuirass service does not rotate its logs
Date: Thu, 01 Mar 2018 17:36:45 +0100
ludo <at> gnu.org (Ludovic Courtès) skribis:

> Andreas Enge <andreas <at> enge.fr> skribis:
>
>> while testing the cuirass service on bayfront, I see the following:
>>
>> $ ll /var/log/c*
>> -rw-r--r-- 1 root root 2003521 Feb 28 15:38 /var/log/cuirass.log
>
> The cuirass service in GuixSD explicitly extends rottlog so that this
> file is rotated on a weekly basis.  Perhaps you just need to wait a
> little longer?

I confirm that rotation works as expected on berlin.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30649; Package guix. (Thu, 01 Mar 2018 16:44:01 GMT) Full text and rfc822 format available.

Message #20 received at 30649 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 30649 <at> debbugs.gnu.org
Subject: Re: bug#30649: Cuirass service does not rotate its logs
Date: Thu, 1 Mar 2018 17:43:10 +0100
On Thu, Mar 01, 2018 at 05:35:54PM +0100, Ludovic Courtès wrote:
> The cuirass service in GuixSD explicitly extends rottlog so that this
> file is rotated on a weekly basis.  Perhaps you just need to wait a
> little longer?

The problem is not that the file grows too large.

The problem was that after rebooting the server, the file was *replaced*
with newly written content. Maybe the problem is not rotation, but opening
a file in "write" instead of "append" mode...

Andreas





Changed bug title to 'shepherd services with #:log-file overwrite their log file' from 'Cuirass service does not rotate its logs' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Thu, 01 Mar 2018 21:40:01 GMT) Full text and rfc822 format available.

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Fri, 02 Mar 2018 13:01:02 GMT) Full text and rfc822 format available.

Notification sent to Andreas Enge <andreas <at> enge.fr>:
bug acknowledged by developer. (Fri, 02 Mar 2018 13:01:02 GMT) Full text and rfc822 format available.

Message #27 received at 30649-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas <at> enge.fr>
Cc: 30649-done <at> debbugs.gnu.org
Subject: Re: bug#30649: Cuirass service does not rotate its logs
Date: Fri, 02 Mar 2018 00:47:55 +0100
Andreas Enge <andreas <at> enge.fr> skribis:

> On Thu, Mar 01, 2018 at 05:35:54PM +0100, Ludovic Courtès wrote:
>> The cuirass service in GuixSD explicitly extends rottlog so that this
>> file is rotated on a weekly basis.  Perhaps you just need to wait a
>> little longer?
>
> The problem is not that the file grows too large.
>
> The problem was that after rebooting the server, the file was *replaced*
> with newly written content. Maybe the problem is not rotation, but opening
> a file in "write" instead of "append" mode...

Oh indeed, that’s a different thing.

This is fixed by Shepherd commit
7b4c88bac70f0bad82ef70fd5b682a49bc227478, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 31 Mar 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.