From: Pavel Filipenský Date: Wed, 18 Oct 2023 09:32:57 +0000 (+0200) Subject: s3:libads: Improve logging for failover scenarios X-Git-Tag: talloc-2.4.2~1234 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14600a3128c6b66de4f9291eeec52e34725030c5;p=thirdparty%2Fsamba.git s3:libads: Improve logging for failover scenarios Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider Autobuild-User(master): Pavel Filipensky Autobuild-Date(master): Wed Oct 18 15:47:09 UTC 2023 on atb-devel-224 --- diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 509196834ae..acf558a7ab3 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -478,6 +478,12 @@ again: num_requests += 1; } + DBG_DEBUG("Try to create %zu netlogon connections for domain '%s' " + "(provided count of addresses was %zu).\n", + num_requests, + domain, + count); + if (num_requests == 0) { status = NT_STATUS_NO_LOGON_SERVERS; DBG_WARNING("domain[%s] num_requests[%zu] for count[%zu] - %s\n", @@ -855,6 +861,8 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) bool ok = false; struct sockaddr_storage ss; + DBG_DEBUG("Resolving name of LDAP server '%s'.\n", + ads->server.ldap_server); ok = resolve_name(ads->server.ldap_server, &ss, 0x20, true); if (!ok) { DEBUG(5,("ads_connect: unable to resolve name %s\n", @@ -900,6 +908,8 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) * Keep trying to find a server and fall through * into ads_find_dc() again. */ + DBG_DEBUG("Failed to connect to DC via LDAP server IP address, " + "trying to find another DC.\n"); } ntstatus = ads_find_dc(ads);