diff --git a/stack/resilient/buildout.cfg b/stack/resilient/buildout.cfg index e82c383694a0af8dd4526f58c84f765f2dc588d8..7c190e7cf20ace72188fe9bf2809d572595026f8 100644 --- a/stack/resilient/buildout.cfg +++ b/stack/resilient/buildout.cfg @@ -41,7 +41,7 @@ eggs = recipe = slapos.recipe.template url = ${:_profile_base_location_}/pbsready.cfg.in output = ${buildout:directory}/pbsready.cfg -md5sum = 3dddf84daf5db8ff4ffc3878e206b467 +md5sum = 6e3bd92750407c8d6eaffde2fc94d000 mode = 0644 [pbsready-import] @@ -50,7 +50,7 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/pbsready-import.cfg.in output = ${buildout:directory}/pbsready-import.cfg -md5sum = 10264fe1cfb7ebe567d50ebabbd93a43 +md5sum = 8b4d5288f18b5404a8d87279e5dd1fde mode = 0644 [pbsready-export] @@ -59,14 +59,14 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/pbsready-export.cfg.in output = ${buildout:directory}/pbsready-export.cfg -md5sum = 793f1843a643b3c91b658eca2bad5abc +md5sum = 195ab54f73883d150e45cd3339b91 mode = 0644 [template-pull-backup] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-pull-backup.cfg.in output = ${buildout:directory}/instance-pull-backup.cfg -md5sum = 3ef8f98ff013f06fcd81bba18872e561 +md5sum = 71c24e37426910af05ac484f5e206388 mode = 0644 [template-replicated] diff --git a/stack/resilient/instance-pull-backup.cfg.in b/stack/resilient/instance-pull-backup.cfg.in index 810b569d4d97bce7e856cf75bfc3a825b85030c5..1cf3e795a9937f30043bf86660f749d1111948f7 100644 --- a/stack/resilient/instance-pull-backup.cfg.in +++ b/stack/resilient/instance-pull-backup.cfg.in @@ -4,6 +4,7 @@ parts = publish-connection-information pbs logrotate + logrotate-entry-notifier cron cron-entry-logrotate pbs-sshkeys-authority @@ -201,6 +202,18 @@ log = $${cron-simplelogger:log} frequency = daily rotate-num = 30 +[logrotate-entry-notifier] +recipe = collective.recipe.template +mode = 600 +input = inline: + $${directory:notifier-feeds}/* { + rotate 5 + weekly + nocompress + missingok + olddir $${directory:logrotate-backup} + } +output = $${logrotate:logrotate-entries}/notifier #---------------- #-- diff --git a/stack/resilient/pbsready-export.cfg.in b/stack/resilient/pbsready-export.cfg.in index 866680d9b672e66dfc3ca04d3e0a2874c6d27423..fb69b533444ec27149949b3acc56124aea8a8974 100644 --- a/stack/resilient/pbsready-export.cfg.in +++ b/stack/resilient/pbsready-export.cfg.in @@ -59,6 +59,9 @@ notify = $${slap-parameter:notify} pidfile = $${resilient-directory:pid}/$${:name}.pid max-run = 3 +[logrotate-entry-notifier] +output = $${rootdirectory:etc}/logrotate_notifier.conf + [notifier-exporter-promise] recipe = slapos.recipe.template:jinja2 mode = 700 @@ -79,7 +82,7 @@ recipe = slapos.cookbook:cron.d name = backup frequency = $${slap-parameter:resiliency-backup-periodicity} once-a-day = true -command = $${notifier-exporter:wrapper} --transaction-id `date +%s` +command = ${logrotate:location}/sbin/logrotate -s $${basedirectory:run}/logrotate.status $${logrotate-entry-notifier:output}; $${notifier-exporter:wrapper} --transaction-id `date +%s` [slap-parameter] # In cron.d format (i.e things like */15 * * * * are accepted). diff --git a/stack/resilient/pbsready-import.cfg.in b/stack/resilient/pbsready-import.cfg.in index 67c3170038c00e6a70c41b7b87aa0a24fa9e15cc..afa5ca678fa859bdea4bd94e9f367d1d6a520e13 100644 --- a/stack/resilient/pbsready-import.cfg.in +++ b/stack/resilient/pbsready-import.cfg.in @@ -8,6 +8,7 @@ parts = logrotate logrotate-entry-cron logrotate-entry-equeue + logrotate-entry-notifier cron cron-entry-logrotate resilient-sshkeys-authority @@ -179,4 +180,4 @@ curl_path = ${curl:location}/bin/curl ########### [backup-signature-link] recipe = cns.recipe.symlink -symlink = $${post-notification-run:proof-signature-file} = $${directory:monitor-resilient}/backup.signature \ No newline at end of file +symlink = $${post-notification-run:proof-signature-file} = $${directory:monitor-resilient}/backup.signature diff --git a/stack/resilient/pbsready.cfg.in b/stack/resilient/pbsready.cfg.in index a6291875122fc2a913ab8e5c6d06cbcd571b5565..e34439db1400563bcdc2d037a2cc16044ce54665 100644 --- a/stack/resilient/pbsready.cfg.in +++ b/stack/resilient/pbsready.cfg.in @@ -4,6 +4,7 @@ parts = logrotate logrotate-entry-cron logrotate-entry-equeue + logrotate-entry-notifier cron cron-entry-logrotate resilient-sshkeys-authority @@ -126,6 +127,18 @@ log = $${equeue:log} $${sshd-server:log} frequency = daily rotate-num = 30 +[logrotate-entry-notifier] +recipe = collective.recipe.template +mode = 600 +input = inline: + $${notifier:feeds}/* { + rotate 5 + weekly + nocompress + missingok + olddir $${directory:logrotate-backup} + } +output = $${logrotate:logrotate-entries}/notifier #---------------- #--