unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72527: Rottlog never exits cleanly
@ 2024-08-08 15:02 Simon Streit
  2024-08-08 16:22 ` jgart via Bug reports for GNU Guix
  2024-09-16 15:29 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Streit @ 2024-08-08 15:02 UTC (permalink / raw)
  To: 72527

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#72527: Rottlog never exits cleanly
  2024-08-08 15:02 bug#72527: Rottlog never exits cleanly Simon Streit
@ 2024-08-08 16:22 ` jgart via Bug reports for GNU Guix
  2024-08-08 17:27   ` Simon Streit
  2024-09-16 15:29 ` Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: jgart via Bug reports for GNU Guix @ 2024-08-08 16:22 UTC (permalink / raw)
  To: 72527; +Cc: Simon Streit


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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#72527: Rottlog never exits cleanly
  2024-08-08 16:22 ` jgart via Bug reports for GNU Guix
@ 2024-08-08 17:27   ` Simon Streit
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Streit @ 2024-08-08 17:27 UTC (permalink / raw)
  To: jgart; +Cc: 72527

Hello jgart,

jgart <jgart@dismail.de> writes:

> 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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#72527: Rottlog never exits cleanly
  2024-08-08 15:02 bug#72527: Rottlog never exits cleanly Simon Streit
  2024-08-08 16:22 ` jgart via Bug reports for GNU Guix
@ 2024-09-16 15:29 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2024-09-16 15:29 UTC (permalink / raw)
  To: Simon Streit; +Cc: 72527

Hi Simon,

Simon Streit <simon@netpanic.org> skribis:

> 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.

  https://lists.gnu.org/archive/html/guix-devel/2024-05/msg00159.html

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-16 15:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-08 15:02 bug#72527: Rottlog never exits cleanly Simon Streit
2024-08-08 16:22 ` jgart via Bug reports for GNU Guix
2024-08-08 17:27   ` Simon Streit
2024-09-16 15:29 ` Ludovic Courtès

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).