From 1addbc9f581e822d7f604adc91362b6e870cdba2 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Tue, 13 Nov 2012 17:14:13 +0100 Subject: Run index task for new indexes Index task need to be run for both index updates and new indexes, otherwise some current values may not be indexed and could cause issues when searching LDAP (like fqdn did). https://fedorahosted.org/freeipa/ticket/3253 --- ipaserver/install/ldapupdate.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index 90b3691a..036a5e10 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -678,13 +678,16 @@ class LDAPUpdate: root_logger.error("Update failed: %s", e) updated = False - if ("cn=index" in entry.dn and - "cn=userRoot" in entry.dn): - taskid = self.create_index_task(entry.cn) - self.monitor_index_task(taskid) - if updated: self.modified = True + + # Always run the index task for both new and updated indexes + # See https://fedorahosted.org/freeipa/ticket/3253 for related issue + if entry.dn.endswith('cn=index,cn=userRoot,cn=ldbm database,' + 'cn=plugins,cn=config'): + taskid = self.create_index_task(entry.cn) + self.monitor_index_task(taskid) + return def __delete_record(self, updates): -- cgit