Rottlog never exits cleanly

  • Done
  • quality assurance status badge
Details
3 participants
  • jgart
  • Ludovic Courtès
  • Simon Streit
Owner
unassigned
Submitted by
Simon Streit
Severity
normal
S
S
Simon Streit wrote on 8 Aug 17:02 +0200
(address . bug-guix@gnu.org)
ygu8qx7qcqv.fsf@milk
Hello!

On inspection of the default settings for Rot[t]log’s service, and
reading through /var/log/mcron.log, rottlog always exits with the
following error:

Toggle snippet (4 lines)
2024-08-07 12:00:00 3408 /gnu/store/scligrs2fwpsy6jvffraa274k7ipbg81-rottlog-0.72.2/sbin/rottlog: running...
2024-08-07 12:00:01 3408 /gnu/store/scligrs2fwpsy6jvffraa274k7ipbg81-rottlog-0.72.2/sbin/rottlog: failed after 0.199s with: (misc-error #f unclean exit status ~S (1) #f)

Checking directly:

Toggle snippet (13 lines)
root@host ~# /gnu/store/scligrs2fwpsy6jvffraa274k7ipbg81-rottlog-0.72.2/sbin/rottlog -v
read_custom: Config file 'custom' does not exist
read_daily: Config file 'daily' does not exist
check_last_rotate: Checking for week(ly) config file
check_last_rotate: Old date : 1722810339
check_last_rotate: New date : 1723125091
check_last_rotate: Next date : Thu 15 Aug 16:51:31 CEST 2024
check_last_rotate: Rotation not needed: 314752 < 604800
read_monthly: Config file 'monthly' does not exist
root@host ~# echo $?
1

To experiment a little, I add:

Toggle snippet (21 lines)
(simple-service 'nginx-custom-rotations rottlog-service-type
(list (log-rotation
(frequency 'custom)
(files '("/var/log/nginx/access.log"
"/var/log/nginx/error.log"))
(options '("storedir nginx
period 15")))))
(simple-service 'nginx-daily-rotations rottlog-service-type
(list (log-rotation
(frequency 'daily)
(files '("/var/log/nginx/access.log"
"/var/log/nginx/error.log"))
(options '("storedir nginx")))))
(simple-service 'nginx-monthly-rotations rottlog-service-type
(list (log-rotation
(frequency 'monthly)
(files '("/var/log/nginx/access.log"
"/var/log/nginx/error.log"))
(options '("storedir nginx")))))

Upon reconfiguration, I called “/gnu/store/...rottlog -v” again, and
voilà, it exits cleanly.

The current default is to only provide a weekly rotation. Rottlog
expects a custom, daily, weekly and monthly file. The documentation
upstream doesn't state this directly. Providing empty files doesn't
help either, as it then errors out about syntax errors.

Would it make sense to be sure that a weekly file is enough, or all four
files are provided in a way? The latter option sounds like slight over
engineering. The default weekly rotation is enough for a base system.

I doubt it this is someone’s first concern to read through
/var/log/mcron.log and understand the error message on a new system.
The error message is there and it is not clear why at first sight.


Kind regards

--
Simon
J
(address . 72527@debbugs.gnu.org)(name . Simon Streit)(address . simon@netpanic.org)
875xsbyof1.fsf@dismail.de
Hi Simon,

Thanks for investigating this.

Would you be interested in sending a v1 patch with a proposal that fixes
the issue. I could then test it.

wdyt

--
all the best,
jgart
S
S
Simon Streit wrote on 8 Aug 19:27 +0200
(name . jgart)(address . jgart@dismail.de)(address . 72527@debbugs.gnu.org)
ygu4j7vq615.fsf@milk
Hello jgart,

jgart <jgart@dismail.de> writes:

Toggle quote (3 lines)
> Would you be interested in sending a v1 patch with a proposal that
> fixes the issue. I could then test it.

I'll workout a patch and post it, once I've got one.


Kind regards,

--
Simon
L
L
Ludovic Courtès wrote on 16 Sep 17:29 +0200
Re: bug#72527: Rottlog never exits cleanly
(name . Simon Streit)(address . simon@netpanic.org)(address . 72527@debbugs.gnu.org)
87bk0nehwj.fsf@gnu.org
Hi Simon,

Simon Streit <simon@netpanic.org> skribis:

Toggle quote (22 lines)
> On inspection of the default settings for Rot[t]logs service, and
> reading through /var/log/mcron.log, rottlog always exits with the
> following error:
>
> 2024-08-07 12:00:00 3408 /gnu/store/scligrs2fwpsy6jvffraa274k7ipbg81-rottlog-0.72.2/sbin/rottlog: running...
> 2024-08-07 12:00:01 3408 /gnu/store/scligrs2fwpsy6jvffraa274k7ipbg81-rottlog-0.72.2/sbin/rottlog: failed after 0.199s with: (misc-error #f unclean exit status ~S (1) #f)
>
>
> Checking directly:
>
> root@host ~# /gnu/store/scligrs2fwpsy6jvffraa274k7ipbg81-rottlog-0.72.2/sbin/rottlog -v
> read_custom: Config file 'custom' does not exist
> read_daily: Config file 'daily' does not exist
> check_last_rotate: Checking for week(ly) config file
> check_last_rotate: Old date : 1722810339
> check_last_rotate: New date : 1723125091
> check_last_rotate: Next date : Thu 15 Aug 16:51:31 CEST 2024
> check_last_rotate: Rotation not needed: 314752 < 604800
> read_monthly: Config file 'monthly' does not exist
> root@host ~# echo $?
> 1

FWIW I would recommend not investing too much time in Rottlog: well
hopefully be able to migrate to the Shepherds log rotation service in
the coming months.


Ludo’.
S
S
Simon Streit wrote on 13 Nov 22:16 +0100
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 72527@debbugs.gnu.org)
ygucyiyq1go.fsf@netpanic.org
Hello Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (6 lines)
> FWIW I would recommend not investing too much time in Rottlog: well
> hopefully be able to migrate to the Shepherds log rotation service in
> the coming months.
>
> https://lists.gnu.org/archive/html/guix-devel/2024-05/msg00159.html

I just rolled out shepherd 1.0.0rc1 locally that also includes brand new
logging facilities. It looks so much better there. I am assuming once
this release proceeds, rottlog will be eventually be completely
replaced?

I don't see a need to follow this issue any more. Closing.


Kind regards

--
Simon
S
S
Simon Streit wrote on 13 Nov 22:22 +0100
control message for bug #72527
(address . control@debbugs.gnu.org)
ygu8qtmq16v.fsf@netpanic.org
close 72527
quit
L
L
Ludovic Courtès wrote on 20 Nov 12:51 +0100
Re: bug#72527: Rottlog never exits cleanly
(name . Simon Streit)(address . simon@netpanic.org)(address . 72527@debbugs.gnu.org)
87mshuxgv9.fsf@gnu.org
Hi,

Simon Streit <simon@netpanic.org> skribis:

Toggle quote (13 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> FWIW I would recommend not investing too much time in Rottlog: well
>> hopefully be able to migrate to the Shepherds log rotation service in
>> the coming months.
>>
>> https://lists.gnu.org/archive/html/guix-devel/2024-05/msg00159.html
>
> I just rolled out shepherd 1.0.0rc1 locally that also includes brand new
> logging facilities. It looks so much better there. I am assuming once
> this release proceeds, rottlog will be eventually be completely
> replaced?

Yes, that’s the plan. (It’s a bit tricky because someone reconfiguring
a pre-1.0 system won’t be able to run timed services.)

Ludo’.
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72527@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72527
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch