The referint plug-in currently uses it's main plug-in config entry in cn=config for the referint configuration. This doesn't allow the referint configuration to be replicated across all masters in a replicated environment.
We should add support for using an alternate config area that is in a normal backend. We already do this for other plug-ins by using nsslapd-pluginConfigArea in the main plug-in config entry.
the fix looks ok, and it is nice to have meaningful configuration attributes, but the cost is a lot of additional locking, is this all required
Replying to [comment:4 lkrispen]:
Since we are using an alternate config area, that can be dynamically updated, we have to use a RW lock for the config area sdn. I know IPA wants all the plugins to be able to be dynamically updated as well(there are tickets open for this I believe).
Anyway, since 99% of the time its just reads on the config area, there shouldn't be much overhead. I created a bunch of set_ functions, but they aren't actually used, maybe that makes it look like there is a lot of locking going on. When a config update is made, only one lock is taken for the entire update. The rest of time it's just using the read lock.
ok, but do we really need to add slapi_search_internal_get_entry_ext() that takes char dn? Can you use slapi_search_internal_get_entry with Slapi_DN dn?
Replying to [comment:7 rmeggins]:
There wasn't a handy Slapi_DN to use for slapi_search_internal_get_entry(). I was trying to avoid doing another malloc/free(for the Slapi_DN) - that's why I did the extension function. I'll remove the extension function, unless you say otherwise.
Replying to [comment:8 mreynolds]:
Replying to [comment:7 rmeggins]: ok, but do we really need to add slapi_search_internal_get_entry_ext() that takes char dn? Can you use slapi_search_internal_get_entry with Slapi_DN dn? There wasn't a handy Slapi_DN to use for slapi_search_internal_get_entry(). I was trying to avoid doing another malloc/free(for the Slapi_DN) - that's why I did the extension function. I'll remove the extension function, unless you say otherwise.
It looks like this code path is only for configuration changes? If so, then it's not performance critical, and I would prefer the use of Slapi_DN. Note that, internally, the char *dn will have to be converted to a Slapi_DN anyway, so there will be an implicit malloc/free.
Replying to [comment:9 rmeggins]:
Replying to [comment:8 mreynolds]: Replying to [comment:7 rmeggins]: ok, but do we really need to add slapi_search_internal_get_entry_ext() that takes char dn? Can you use slapi_search_internal_get_entry with Slapi_DN dn? There wasn't a handy Slapi_DN to use for slapi_search_internal_get_entry(). I was trying to avoid doing another malloc/free(for the Slapi_DN) - that's why I did the extension function. I'll remove the extension function, unless you say otherwise. It looks like this code path is only for configuration changes? If so, then it's not performance critical, and I would prefer the use of Slapi_DN. Note that, internally, the char *dn will have to be converted to a Slapi_DN anyway, so there will be an implicit malloc/free.
New patch is attached.
git merge ticket47603 Updating 463f879..9357bf1 Fast-forward ldap/ldif/template-dse.ldif.in | 14 +- ldap/servers/plugins/referint/referint.c | 836 ++++++++++++++++++++++++------ 2 files changed, 672 insertions(+), 178 deletions(-)
git push origin master Counting objects: 17, done. Delta compression using up to 4 threads. Compressing objects: 100% (9/9), done. Writing objects: 100% (9/9), 6.04 KiB, done. Total 9 (delta 6), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 463f879..9357bf1 master -> master
commit 9357bf1 Author: Mark Reynolds mreynolds@redhat.com Date: Mon Dec 2 17:50:45 2013 -0500
patch after fixing rebase with master 0001-Ticket-47603-Allow-RI-plugin-to-use-alternate-config.patch
Nathan found a problem with MO plugin and how I did the alternate config area - where the preop entry is modified for config validation. This also affect the RI plugin...
attachment 0001-Ticket-47603-should-not-modify-pre-op-entry-during-c.patch
git merge ticket47603 Updating 226bad9..614b7bb Fast-forward ldap/servers/plugins/referint/referint.c | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-)
git push origin master Counting objects: 13, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 1017 bytes, done. Total 7 (delta 4), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 226bad9..614b7bb master -> master
commit 614b7bb Author: Mark Reynolds mreynolds@redhat.com Date: Fri Dec 13 10:14:41 2013 -0500
Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1044203
Metadata Update from @rmeggins: - Issue assigned to mreynolds - Issue set to the milestone: 1.3.3 - 12/13 (December)
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/940
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.