The Samba-Bugzilla – Attachment 14749 Details for
Bug 13655
dlz_bind9: logging improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
backported patch for 4.9
0001-dns-dlz_bind9-reference-count-logging.patch (text/plain), 2.31 KB, created by
Andrew Bartlett
on 2018-12-20 08:40:35 UTC
(
hide
)
Description:
backported patch for 4.9
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2018-12-20 08:40:35 UTC
Size:
2.31 KB
patch
obsolete
>From 16a41fe9e2fa6cc8f437205a3bea41b2d4bfb858 Mon Sep 17 00:00:00 2001 >From: Aaron Haslett <aaronhaslett@catalyst.net.nz> >Date: Mon, 15 Oct 2018 16:52:40 +1300 >Subject: [PATCH] dns: dlz_bind9 reference count logging > >dlz_bind9 has to count the number of times the plugin is 'created' by bind's >plugin manager so it doesn't repeat setup. Logging doesn't reflect this >reference counting logic properly and so messages like "samba_dlz: shutdown" >can, confusingly, come up when the database connection has not actually been >severed. This patch adds the necessary logging. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13655 >Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit 3713905f8b4baa56b1bf571f71009cd77ccda6eb) >--- > source4/dns_server/dlz_bind9.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c >index 5f9a71d..987e109 100644 >--- a/source4/dns_server/dlz_bind9.c >+++ b/source4/dns_server/dlz_bind9.c >@@ -618,6 +618,9 @@ _PUBLIC_ isc_result_t dlz_create(const char *dlzname, > char *errstring = NULL; > > if (dlz_bind9_state != NULL) { >+ dlz_bind9_state->log(ISC_LOG_ERROR, >+ "samba_dlz: dlz_create ignored, #refs=%d", >+ dlz_bind9_state_ref_count); > *dbdata = dlz_bind9_state; > dlz_bind9_state_ref_count++; > return ISC_R_SUCCESS; >@@ -743,6 +746,10 @@ _PUBLIC_ isc_result_t dlz_create(const char *dlzname, > return ISC_R_SUCCESS; > > failed: >+ state->log(ISC_LOG_INFO, >+ "samba_dlz: FAILED dlz_create call result=%d #refs=%d", >+ result, >+ dlz_bind9_state_ref_count); > talloc_free(state); > return result; > } >@@ -753,13 +760,17 @@ failed: > _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"); > > dlz_bind9_state_ref_count--; > if (dlz_bind9_state_ref_count == 0) { >+ state->log(ISC_LOG_INFO, "samba_dlz: shutting down"); > talloc_unlink(state, state->samdb); > talloc_free(state); > dlz_bind9_state = NULL; >+ } else { >+ state->log(ISC_LOG_INFO, >+ "samba_dlz: dlz_destroy called. %d refs remaining.", >+ dlz_bind9_state_ref_count); > } > } > >-- >2.7.4 >
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 Raw
Flags:
abartlet
:
review?
(
gary
)
Actions:
View
Attachments on
bug 13655
: 14749