You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jr...@apache.org on 2020/01/23 20:50:12 UTC

[trafficserver] branch master updated: Fixes an issue where a debug build of ATS will fail the assertion in HttpTransact::handle_parent_died() when proxy.config.http.no_dns_just_forward_to_parent is enabled and there is no parent.config or strategy rule for the request. Also this provides a log warning for both debug and release builds of this condition.

This is an automated email from the ASF dual-hosted git repository.

jrushford pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new aa27fea  Fixes an issue where a debug build of ATS will fail the assertion in HttpTransact::handle_parent_died() when proxy.config.http.no_dns_just_forward_to_parent is enabled and there is no parent.config or strategy rule for the request. Also this provides a log warning for both debug and release builds of this condition.
aa27fea is described below

commit aa27feaae844d211313e9209a4494eb3c9c6c2b4
Author: John Rushford <jr...@apache.org>
AuthorDate: Thu Jan 23 20:02:19 2020 +0000

    Fixes an issue where a debug build of ATS will fail
    the assertion in HttpTransact::handle_parent_died() when
    proxy.config.http.no_dns_just_forward_to_parent is enabled
    and there is no parent.config or strategy rule for the request.
    Also this provides a log warning for both debug and release
    builds of this condition.
---
 proxy/http/HttpTransact.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index ffd5814..0ca1763 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -538,6 +538,13 @@ find_server_and_update_current_info(HttpTransact::State *s)
     return HttpTransact::HOST_NONE;
 
   case PARENT_DIRECT:
+    // if the configuration does not allow the origin to be dns'd
+    // we're unable to go direct to the origin.
+    if (s->http_config_param->no_dns_forward_to_parent) {
+      Warning("no available parents and the config proxy.config.http.no_dns_just_forward_to_parent, prevents origin lookups.");
+      s->parent_result.result = PARENT_FAIL;
+      return HttpTransact::HOST_NONE;
+    }
   /* fall through */
   default:
     update_current_info(&s->current, &s->server_info, HttpTransact::ORIGIN_SERVER, (s->current.attempts)++);