Univention Bugzilla – Attachment 7099 Details for
Bug 39139
rndc reload against dlz_bind9 takes three minutes (plus segfault)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
dlz_bind9_rndc_reload.patch
dlz_bind9_rndc_reload.patch (text/plain), 3.29 KB, created by
Arvid Requate
on 2015-08-11 21:57:02 CEST
(
hide
)
Description:
dlz_bind9_rndc_reload.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2015-08-11 21:57:02 CEST
Size:
3.29 KB
patch
obsolete
>--- a/source4/dns_server/dlz_bind9.c 2015-08-05 08:14:32.000000000 +0200 >+++ b/source4/dns_server/dlz_bind9.c 2015-08-05 08:07:08.400000000 +0200 >@@ -627,6 +627,7 @@ > if (dlz_bind9_state != NULL) { > *dbdata = dlz_bind9_state; > dlz_bind9_state_ref_count++; >+ dlz_bind9_state->log(ISC_LOG_INFO, "samba_dlz: dlz_create (%d)", dlz_bind9_state_ref_count); > return ISC_R_SUCCESS; > } > >@@ -746,10 +747,11 @@ > _PUBLIC_ void dlz_destroy(void *dbdata) > { > struct dlz_bind9_data *state = talloc_get_type_abort(dbdata, struct dlz_bind9_data); >- state->log(ISC_LOG_INFO, "samba_dlz: shutting down"); >+ state->log(ISC_LOG_INFO, "samba_dlz: dlz_destroy called"); > > dlz_bind9_state_ref_count--; > if (dlz_bind9_state_ref_count == 0) { >+ state->log(ISC_LOG_INFO, "samba_dlz: dlz_destroy shutting down"); > talloc_unlink(state, state->samdb); > talloc_free(state); > dlz_bind9_state = NULL; >@@ -1135,6 +1137,27 @@ > return true; > } > >+static bool b9_zone_del(struct dlz_bind9_data *state, const char *name) >+{ >+ struct b9_zone *zone = state->zonelist; >+ >+ zone->name = talloc_strdup(zone, name); >+ if (zone->name == NULL) { >+ talloc_free(zone); >+ return false; >+ } >+ >+ while (zone != NULL) { >+ if (strcasecmp(name, zone->name) == 0) { >+ DLIST_REMOVE(state->zonelist, zone); >+ break; >+ } >+ zone = zone->next; >+ } >+ >+ return true; >+} >+ > static bool b9_zone_exists(struct dlz_bind9_data *state, const char *name) > { > struct b9_zone *zone = state->zonelist; >@@ -1165,6 +1188,7 @@ > struct dlz_bind9_data *state = talloc_get_type_abort(dbdata, struct dlz_bind9_data); > TALLOC_CTX *tmp_ctx; > struct ldb_dn *dn; >+ struct zone_partition_relation *known_zone; > int i; > > state->log(ISC_LOG_INFO, "samba_dlz: starting configure"); >@@ -1173,6 +1197,29 @@ > return ISC_R_FAILURE; > } > >+ /* Do reload >+ if (state->zone->next) { >+ for (known_zone = state->zone; known_zone->next; known_zone = known_zone->next) { >+#if DLZ_DLOPEN_VERSION < 3 >+ state->writeable_zone(view, known_zone->id); >+#else >+ state->writeable_zone(view, dlzdb, known_zone->id); >+#endif >+ } >+ state->log(ISC_LOG_INFO, "samba_dlz: Done reload"); >+ return ISC_R_SUCCESS; >+ } >+ */ >+ >+ /* forget known zones (for reload) */ >+ while (state->zone->next) { >+ known_zone = state->zone; >+ state->zone = state->zone->next; >+ b9_zone_del(state, known_zone->id); >+ talloc_free(known_zone); >+ } >+ /* */ >+ > tmp_ctx = talloc_new(state); > > for (i=0; zone_prefixes[i]; i++) { >@@ -1197,6 +1244,7 @@ > continue; > } > >+ state->log(ISC_LOG_INFO, "samba_dlz: dlz_configure: %d zones in partition %s", res->count, zone_prefixes[i]); > for (j=0; j<res->count; j++) { > isc_result_t result; > const char *zone = ldb_msg_find_attr_as_string(res->msgs[j], "name", NULL); >@@ -1205,6 +1253,7 @@ > if (zone == NULL) { > continue; > } >+ state->log(ISC_LOG_INFO, "samba_dlz: dlz_configure: zone: '%s'", zone); > /* Ignore zones that are not handled in BIND */ > if ((strcmp(zone, "RootDNSServers") == 0) || > (strcmp(zone, "..TrustAnchors") == 0)) { >@@ -1269,9 +1318,12 @@ > } > > // skip the application partitions if there is a pre-2k3 zone on the domain partition >+ /* > if (!strcmp(zone_prefixes[i], "CN=MicrosoftDNS,CN=System") && state->zone->next) { >+ state->log(ISC_LOG_INFO, "samba_dlz: Skipping other partitions"); > break; > } >+ */ > } > > talloc_free(tmp_ctx);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 39139
: 7099