From c08c7e115682eaf5a605043c8fd10b1e080365ac Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Mon, 17 Aug 2020 09:28:26 -0400 Subject: [PATCH] Increase replication changelog trimming to 30 days A long time ago the DS team recommended that the changelog trimming interval be set to 7 days. However, more recently we tend to see more time skews on certain platforms, and issues where it appears changes were trimmed too early (which can break replication). It would be better to set the trimming interval to 30 days. This still prevents the changelog from getting too large, and it should help with some of the other issues we are now seeing. Fixes: https://pagure.io/freeipa/issue/8464 Signed-off-by: Mark Reynolds Reviewed-By: Florence Blanc-Renaud --- ipaserver/install/plugins/update_changelog_maxage.py | 2 +- ipaserver/install/replication.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ipaserver/install/plugins/update_changelog_maxage.py b/ipaserver/install/plugins/update_changelog_maxage.py index e9b6c407c..929894302 100644 --- a/ipaserver/install/plugins/update_changelog_maxage.py +++ b/ipaserver/install/plugins/update_changelog_maxage.py @@ -20,7 +20,7 @@ class update_changelog_maxage(Updater): def update_entry(self, cl_entry, conn): maxage = cl_entry.single_value.get('nsslapd-changelogmaxage') if maxage is None: - cl_entry['nsslapd-changelogmaxage'] = '7d' + cl_entry['nsslapd-changelogmaxage'] = '30d' conn.update_entry(cl_entry) def execute(self, **options): diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py index 76eb1a31b..e8407f39b 100644 --- a/ipaserver/install/replication.py +++ b/ipaserver/install/replication.py @@ -609,7 +609,7 @@ class ReplicationManager: 'objectclass': ["top", "extensibleobject"], 'cn': ["changelog5"], 'nsslapd-changelogdir': [os.path.join(dbdir, "cldb")], - 'nsslapd-changelogmaxage': ['7d'], + 'nsslapd-changelogmaxage': ['30d'], } ) try: @@ -618,7 +618,7 @@ class ReplicationManager: return else: # Set the changelog trimming - cl_entry['nsslapd-changelogmaxage'] = '7d' + cl_entry['nsslapd-changelogmaxage'] = '30d' try: conn.update_entry(cl_entry) except errors.EmptyModlist: