[Freeipa-devel] [PATCH] 0008 Documentation improvement, configuration check

Petr Spacek pspacek at redhat.com
Tue Feb 28 14:21:58 UTC 2012


On 02/28/2012 02:46 PM, Adam Tkac wrote:
> On 02/28/2012 02:44 PM, Petr Spacek wrote:
>> On 02/24/2012 01:42 PM, Petr Spacek wrote:
>>> Hello,
>>>
>>> this patch is documentation improvement & configuration check for
>>> situations, where persistent search and zone refresh are enabled at same
>>> time. (Which is not allowed.)
>>>
>>> It's related to fix https://fedorahosted.org/bind-dyndb-ldap/ticket/43 -
>>> hold bind and plugin global settings in LDAP.
>>>
>>
>> ... there is the forgotten patch :-)
>
> Ack, push it to master, please.
Pushed to master.

https://fedorahosted.org/bind-dyndb-ldap/changeset/bcc30ec90ad06d8d27a5842d15a7513c65389010/

-- 
Petr^2 Spacek

>
>>
>>
>> bind-dyndb-ldap-pspacek-0008-Documentation-improvement-add-configuration-check.patch
>>
>>
>>
>> From 2e4165fd1d8ee3efd5b61c5a1da76e73ea8385d7 Mon Sep 17 00:00:00 2001
>> From: Petr Spacek<pspacek at redhat.com>
>> Date: Fri, 24 Feb 2012 13:37:04 +0100
>> Subject: [PATCH] Documentation improvement, add configuration check.
>> Signed-off-by: Petr Spacek<pspacek at redhat.com>
>>
>> ---
>> README | 16 ++++++++++------
>> src/zone_manager.c | 10 +++++++++-
>> 2 files changed, 19 insertions(+), 7 deletions(-)
>>
>> diff --git a/README b/README
>> index 2770c46..914abdc 100644
>> --- a/README
>> +++ b/README
>> @@ -179,10 +179,11 @@ cache_ttl (default 120)
>>
>> zone_refresh (default 0)
>> Interval (in seconds) of how often the LDAP driver should query the
>> - LDAP server for changes in zone settings. Currently, this is only
>> - the idnsUpdatePolicy attribute which specifies the update policy for
>> - a zone. If this option is set to 0, the LDAP driver will never refresh
>> - the settings.
>> + LDAP server for changes in zone settings. If this option is set to 0,
>> + the LDAP driver will never refresh the settings.
>> + Currently, global settings in idnsConfigObject and zone specific
>> + settings in idnsZone attributes are refreshed.
>> + Value is ignored if persistent search (psearch) is enabled.
>>
>> timeout (default 10)
>> Timeout (in seconds) of the queries to the LDAP server. If the LDAP
>> @@ -197,8 +198,10 @@ fake_mname (default "")
>>
>> psearch (default no)
>> Set this option to "yes" if you would like to use persistent search
>> - query for zone records. When server supports persistent search
>> - your zones will be automatically update when they change in LDAP.
>> + query for zone records and global settings. When server supports
>> + persistent search your zones and configuration will be automatically
>> + update when they change in LDAP.
>> + Enabling psearch disables zone_refresh.
>>
>> reconnect_interval (default 60)
>> Time (in seconds) after that the plugin should try to connect to LDAP
>> @@ -260,6 +263,7 @@ sync_ptr = idnsAllowSyncPTR
>> zone_refresh = idnsZoneRefresh
>>
>> Forward policy option cannot be set without setting forwarders at the
>> same time.
>> +Zone refresh interval is ignored on target server if psearch is enabled.
>>
>>
>> 6. License
>> diff --git a/src/zone_manager.c b/src/zone_manager.c
>> index 5ca47fd..c8a144f 100644
>> --- a/src/zone_manager.c
>> +++ b/src/zone_manager.c
>> @@ -113,12 +113,14 @@ manager_create_db_instance(isc_mem_t *mctx,
>> const char *name,
>> isc_result_t result;
>> db_instance_t *db_inst = NULL;
>> unsigned int zone_refresh;
>> + isc_boolean_t psearch;
>> isc_timermgr_t *timer_mgr;
>> isc_interval_t interval;
>> isc_timertype_t timer_type = isc_timertype_inactive;
>> isc_task_t *task;
>> setting_t manager_settings[] = {
>> { "zone_refresh", default_uint(0) },
>> + { "psearch", default_boolean(0) },
>> end_of_settings
>> };
>>
>> @@ -140,6 +142,7 @@ manager_create_db_instance(isc_mem_t *mctx, const
>> char *name,
>>
>> /* Parse settings. */
>> manager_settings[0].target =&zone_refresh;
>> + manager_settings[1].target =&psearch;
>> CHECK(set_settings(manager_settings, argv));
>>
>> CHECKED_MEM_GET_PTR(mctx, db_inst);
>> @@ -158,7 +161,12 @@ manager_create_db_instance(isc_mem_t *mctx, const
>> char *name,
>> timer_mgr = dns_dyndb_get_timermgr(dyndb_args);
>> isc_interval_set(&interval, zone_refresh, 0);
>>
>> - if (zone_refresh) {
>> + if (zone_refresh&& psearch) {
>> + log_error("Zone refresh and persistent search are enabled at same
>> time! "
>> + "Only persistent search will be used.");
>> + }
>> +
>> + if (zone_refresh&& !psearch) {
>> timer_type = isc_timertype_ticker;
>> } else {
>> timer_type = isc_timertype_inactive;
>




More information about the Freeipa-devel mailing list