python / psf-salt

PSF infrastructure configuration
MIT License
115 stars 58 forks source link

New docsbuild log files are not being rotated #501

Closed AA-Turner closed 1 month ago

AA-Turner commented 1 month ago

The 'logrotate' configuration file (https://github.com/python/psf-salt/blob/main/salt/docs/config/docsbuild.logrotate) states that it includes all log files, but the new docsbuild-only-html.log file doesn't seem to have been rotated -- I would expect to see docsbuild-only-html.log.1.gz.

cc @JacobCoffee

adam@docs:/srv/docsbuild/3.13$ ls /var/log/docsbuild/
total 25M
-rw-r--r-- 1 docsbuild docs docsbuild    0 2024-10-01 00:00 docsbuild.log
-rw-rw---- 1 docsbuild docs docsbuild 182K 2024-10-01 06:44 docsbuild-no-html.log
-rw-rw---- 1 docsbuild docs docsbuild  14M 2024-10-01 06:33 docsbuild-only-html.log
-rw-r--r-- 1 docsbuild docs docsbuild 933K 2024-09-30 16:07 docsbuild.log.1.gz
-rw-r--r-- 1 docsbuild docs docsbuild 1.2M 2024-09-29 23:38 docsbuild.log.2.gz
-rw-r--r-- 1 docsbuild docs docsbuild 915K 2024-09-28 23:59 docsbuild.log.3.gz
-rw-r--r-- 1 docsbuild docs docsbuild 710K 2024-09-27 23:28 docsbuild.log.4.gz
-rw-r--r-- 1 docsbuild docs docsbuild 711K 2024-09-26 23:16 docsbuild.log.5.gz
-rw-r--r-- 1 docsbuild docs docsbuild 618K 2024-09-25 23:59 docsbuild.log.6.gz
-rw-r--r-- 1 docsbuild docs docsbuild 703K 2024-09-24 23:39 docsbuild.log.7.gz
-rw-r--r-- 1 docsbuild docs docsbuild 604K 2024-09-23 23:29 docsbuild.log.8.gz
-rw-r--r-- 1 docsbuild docs docsbuild 416K 2024-09-22 23:38 docsbuild.log.9.gz
-rw-r--r-- 1 docsbuild docs docsbuild 623K 2024-09-21 23:39 docsbuild.log.10.gz
-rw-r--r-- 1 docsbuild docs docsbuild 598K 2024-09-20 23:24 docsbuild.log.11.gz
-rw-r--r-- 1 docsbuild docs docsbuild 701K 2024-09-19 23:56 docsbuild.log.12.gz
-rw-r--r-- 1 docsbuild docs docsbuild 660K 2024-09-18 23:32 docsbuild.log.13.gz
-rw-r--r-- 1 docsbuild docs docsbuild 1.1M 2024-09-18 00:00 docsbuild.log.14.gz

A

JacobCoffee commented 1 month ago

I'm not sure if it just hadn't been 24 hours yet but force rotation generated the backups for this:

coffee@docs:/var/log/docsbuild$ sudo logrotate -f /etc/logrotate.d/docsbuild
coffee@docs:/var/log/docsbuild$ ll
total 12276
drwxr-xr-x  2 docsbuild docsbuild    4096 Oct  1 14:17 ./
drwxr-xr-x 14 root      syslog       4096 Oct  1 00:00 ../
-rw-r--r--  1 docsbuild docs            0 Oct  1 00:00 docsbuild.log
-rw-r--r--  1 docsbuild docs       954656 Sep 30 16:07 docsbuild.log.1.gz
...
-rw-r--r--  1 docsbuild docsbuild       0 Oct  1 14:17 docsbuild-no-html.log
-rw-rw----  1 docsbuild docs        60396 Oct  1 07:24 docsbuild-no-html.log.1.gz
-rw-r--r--  1 docsbuild docsbuild       0 Oct  1 14:17 docsbuild-only-html.log
-rw-rw----  1 docsbuild docs      1763038 Oct  1 14:16 docsbuild-only-html.log.1.g

Reopen and let me know if we don't see a rotation within 24 hours again