From 1a3016c2b7f901f649fd239122bba19d6a4298ed Mon Sep 17 00:00:00 2001 From: kkalev Date: Mon, 9 Sep 2002 13:27:48 +0000 Subject: [PATCH] Add a new config directive, ldap_write_server. If it is set then when we update the directory we try to connect to that one instead of the ldap_server. That way we can read from the fast read-only replicas and write to a slower master. --- Changelog | 3 +++ conf/admin.conf | 7 +++++++ lib/ldap/change_attrs.php3 | 5 ++++- lib/ldap/change_info.php3 | 5 ++++- lib/ldap/change_passwd.php3 | 5 ++++- lib/ldap/create_user.php3 | 5 ++++- lib/ldap/defaults.php3 | 2 +- lib/ldap/delete_user.php3 | 5 ++++- 8 files changed, 31 insertions(+), 6 deletions(-) diff --git a/Changelog b/Changelog index 085a1d4..a5ce87f 100644 --- a/Changelog +++ b/Changelog @@ -47,6 +47,9 @@ Ver 1.59: * Only connect and bind to the ldap server if we haven't done that before. * Remove previous change. It was causing problems * In the user test page ignore comments from the auth.request file +* Add a new config directive, ldap_write_server. If it is set then when we update the directory we try to + connect to that one instead of the ldap_server. That way we can read from the fast read-only replicas and + write to a slower master. Ver 1.55: * Update the FAQ about missing attributes from the user/group edit pages and add a few comments in the configuration files diff --git a/conf/admin.conf b/conf/admin.conf index d6276f2..700b5cb 100644 --- a/conf/admin.conf +++ b/conf/admin.conf @@ -79,6 +79,13 @@ nas3_port_num: 210 nas3_community: public ldap_server: ldap.%{general_domain} +# +# There are many cases where we have a small write master and +# a lot of fast read only replicas. If that is the case uncomment +# ldap_write_server and point it to the write master. It will be +# used only when writing to the directory, not when reading +# +#ldap_write_server: master.%{general_domain} ldap_base: dc=company,dc=com ldap_binddn: cn=Directory Manager ldap_bindpw: XXXXXXX diff --git a/lib/ldap/change_attrs.php3 b/lib/ldap/change_attrs.php3 index 937d70c..2c2aa23 100644 --- a/lib/ldap/change_attrs.php3 +++ b/lib/ldap/change_attrs.php3 @@ -1,6 +1,9 @@