From fe92296542711fbf373873b6a7eeb40d090a8639 Mon Sep 17 00:00:00 2001 From: Sietse Snel Date: Tue, 26 Sep 2023 09:04:29 +0200 Subject: [PATCH] YDA-5405: add verbose mode for revision cleanup --- docs/administration/configuring-yoda.md | 1 + roles/yoda_rulesets/defaults/main.yml | 1 + roles/yoda_rulesets/templates/cronjob-revision-cleanup.sh.j2 | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/administration/configuring-yoda.md b/docs/administration/configuring-yoda.md index 810e87e84..068ca054b 100644 --- a/docs/administration/configuring-yoda.md +++ b/docs/administration/configuring-yoda.md @@ -193,6 +193,7 @@ enable_revisions | Enable revisions: yes (1) or no (0) async_revision_verbose_mode | Enable verbose logging revision job (true/false, default: true) async_revision_delay_time | Delay after last modification to data object before revision job can process it (in seconds, default: 0) enable_revision_cleanup | Enable cleanup job for removing old revisions (true/false, default: true) +revision_cleanup_verbose_mode | Print extra information in revision cleanup job for troubleshooting (true/false, default: false) enable_async_replication | Enable asynchronous replication cronjob: yes (1) or no (0) async_replication_verbose_mode | Enable verbose logging replication job (true/false, default: true) async_replication_delay_time | Delay after last modification to data object before replication job can process it (in seconds, default: 0) diff --git a/roles/yoda_rulesets/defaults/main.yml b/roles/yoda_rulesets/defaults/main.yml index 40029454c..d5bdc9725 100644 --- a/roles/yoda_rulesets/defaults/main.yml +++ b/roles/yoda_rulesets/defaults/main.yml @@ -30,6 +30,7 @@ enable_revisions: 1 # Enable revisions: yes (1) or no (0) async_revision_verbose_mode: false async_revision_delay_time: 0 # Delay after last modification to data object before revision job can process it (sec) enable_revision_cleanup: true # Enable revision cleanup job (true/false) +revision_cleanup_verbose_mode: false # Print extra information in revision cleanup job for troubleshooting (true/false) revision_strategy: B # Revision strategy: A, B, J or Simple yoda_instance: "{{ instance }}" update_rulesets: true # Update already installed rulesets with git diff --git a/roles/yoda_rulesets/templates/cronjob-revision-cleanup.sh.j2 b/roles/yoda_rulesets/templates/cronjob-revision-cleanup.sh.j2 index 1dc851554..298c7d24d 100644 --- a/roles/yoda_rulesets/templates/cronjob-revision-cleanup.sh.j2 +++ b/roles/yoda_rulesets/templates/cronjob-revision-cleanup.sh.j2 @@ -4,4 +4,4 @@ TIMESTAMP=`date +%s` OFFSET={{ (ansible_date_time.tz_offset|int / 100)|int }} TIMESTAMP=$(( $TIMESTAMP - ($OFFSET * 60 * 60))) -/etc/irods/yoda-ruleset/tools/revision-clean-up.py ${TIMESTAMP} '{{ revision_strategy }}' +/etc/irods/yoda-ruleset/tools/revision-clean-up.py ${TIMESTAMP} '{{ revision_strategy }}' {{ "-v" if revision_cleanup_verbose_mode else "" }}