diff options
author | Martin Kosek <mkosek@redhat.com> | 2012-11-13 17:14:13 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-11-14 08:25:18 +0100 |
commit | 1addbc9f581e822d7f604adc91362b6e870cdba2 (patch) | |
tree | 3e6ed68b4528427d88a13c653cdf5044566a42c7 | |
parent | d479151087dd39f69df032bfad748cabb97e048c (diff) | |
download | freeipa.git-1addbc9f581e822d7f604adc91362b6e870cdba2.tar.gz freeipa.git-1addbc9f581e822d7f604adc91362b6e870cdba2.tar.xz freeipa.git-1addbc9f581e822d7f604adc91362b6e870cdba2.zip |
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
-rw-r--r-- | ipaserver/install/ldapupdate.py | 13 |
1 files 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): |