unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Streit <simon@netpanic.org>
To: 72527@debbugs.gnu.org
Subject: bug#72527: Rottlog never exits cleanly
Date: Thu, 08 Aug 2024 17:02:16 +0200	[thread overview]
Message-ID: <ygu8qx7qcqv.fsf@milk> (raw)

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:

--8<---------------cut here---------------start------------->8---
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)
--8<---------------cut here---------------end--------------->8---

Checking directly:

--8<---------------cut here---------------start------------->8---
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
--8<---------------cut here---------------end--------------->8---

To experiment a little, I add:

--8<---------------cut here---------------start------------->8---
(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")))))
--8<---------------cut here---------------end--------------->8---

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




             reply	other threads:[~2024-08-08 15:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 15:02 Simon Streit [this message]
2024-08-08 16:22 ` bug#72527: Rottlog never exits cleanly jgart via Bug reports for GNU Guix
2024-08-08 17:27   ` Simon Streit
2024-09-16 15:29 ` Ludovic Courtès
2024-11-13 21:16   ` Simon Streit
2024-11-20 11:51     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ygu8qx7qcqv.fsf@milk \
    --to=simon@netpanic.org \
    --cc=72527@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).