Revert logrotate change for components journal

pull/116/head
Nicolas Arenas 2026-05-18 12:49:29 +02:00
parent ebb6edf161
commit 11122db156
4 changed files with 9 additions and 30 deletions

View File

@ -13,9 +13,9 @@
- `DiskLogsAction`: soporte de múltiples `SYSLOG_IDENTIFIER` separados por coma
o en array, salida estructurada en JSON y lectura desde fichero de journal
remoto (`/var/log/journal/remote/<IP>.journal`) cuando se indica el parámetro host
- Rotación diaria de ficheros de journal remoto con `logrotate` (10 días de
retención); los servicios `journal-pull@` se paran y arrancan durante la rotación
- `logrotate` añadido como dependencia del paquete
- La retención de los journals remotos se delega en `systemd-journald` de cada
componente (configurado por oginstaller: 500MB máx, 10 días); los ficheros
pulled en ogcore quedan acotados sin necesidad de logrotate local
### Fixed
- `journal-pull@.service`: `Restart=always` para reconectar tras salida limpia
@ -31,11 +31,11 @@
- postinst: permisos de acceso al journal para el usuario `opengnsys`
(`systemd-journal` y `systemd-journal-remote`)
- postinst (upgrade): añadidos symlinks faltantes en actualizaciones —
`mercure.conf` en nginx, unidades `journal-pull@`, `journal-pull-sync`,
`logrotate.d/journal-pull`; `chmod +x` en `journal-pull-sync.sh`;
propietario y permisos de `journal-pull-sources.conf`; cambiado `ln -s`
por `ln -sf` en las unidades journal-pull para evitar fallo cuando el
fichero existe como fichero regular en lugar de symlink
`mercure.conf` en nginx, unidades `journal-pull@`, `journal-pull-sync`;
`chmod +x` en `journal-pull-sync.sh`; propietario y permisos de
`journal-pull-sources.conf`; cambiado `ln -s` por `ln -sf` en las
unidades journal-pull para evitar fallo cuando el fichero existe como
fichero regular en lugar de symlink
- `systemd-journal-remote` y `logrotate` añadidos como dependencias del paquete
## [1.7.11] - 2026-05-14

2
debian/control vendored
View File

@ -10,7 +10,7 @@ Architecture: all
Depends: ${misc:Depends}, mariadb-server, systemd, nginx, libzip-dev, zip, unzip,
php8.3-opcache, php8.3-bcmath, php8.3-cli, php8.3-curl, php8.3-fpm,
php8.3-gd, php8.3-ldap, php8.3-mbstring, php8.3-mysql, php8.3-common,
php8.3-xml, php8.3-zip, mercure, systemd-journal-remote, logrotate
php8.3-xml, php8.3-zip, mercure, systemd-journal-remote
Description: OpenGnsys Core
OgCore package is responsible about management of Opengnsys platform
OpenGnsys Core is a platform for system management.

View File

@ -82,8 +82,6 @@ if [ "$1" = "configure" ] && [ -z "$2" ]; then
ln -s /opt/opengnsys/ogcore/etc/systemd/system/journal-pull@.service /etc/systemd/system/journal-pull@.service
ln -s /opt/opengnsys/ogcore/etc/systemd/system/journal-pull-sync.path /etc/systemd/system/journal-pull-sync.path
ln -s /opt/opengnsys/ogcore/etc/systemd/system/journal-pull-sync.service /etc/systemd/system/journal-pull-sync.service
ln -s /opt/opengnsys/ogcore/etc/logrotate.d/journal-pull /etc/logrotate.d/journal-pull
echo ">>> Configurando journal-pull"
touch /opt/opengnsys/ogcore/etc/journal-pull-sources.conf
chmod +x /opt/opengnsys/ogcore/etc/bin/journal-pull-sync.sh
@ -165,7 +163,6 @@ elif [ "$1" = "configure" ] && [ -n "$2" ]; then
ln -sf /opt/opengnsys/ogcore/etc/systemd/system/journal-pull@.service /etc/systemd/system/journal-pull@.service
ln -sf /opt/opengnsys/ogcore/etc/systemd/system/journal-pull-sync.path /etc/systemd/system/journal-pull-sync.path
ln -sf /opt/opengnsys/ogcore/etc/systemd/system/journal-pull-sync.service /etc/systemd/system/journal-pull-sync.service
ln -sf /opt/opengnsys/ogcore/etc/logrotate.d/journal-pull /etc/logrotate.d/journal-pull
chmod +x /opt/opengnsys/ogcore/etc/bin/journal-pull-sync.sh
if [ ! -f /opt/opengnsys/ogcore/etc/journal-pull-sources.conf ]; then
touch /opt/opengnsys/ogcore/etc/journal-pull-sources.conf

View File

@ -1,18 +0,0 @@
/var/log/journal/remote/*.journal {
daily
rotate 10
dateext
missingok
nocompress
sharedscripts
prerotate
systemctl stop $(systemctl list-units --plain --no-legend \
--state=active 'journal-pull@*.service' \
| awk '{print $1}') 2>/dev/null || true
endscript
postrotate
systemctl start $(systemctl list-units --plain --no-legend \
--state=inactive 'journal-pull@*.service' \
| awk '{print $1}') 2>/dev/null || true
endscript
}