You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (Updated) (JIRA)" <ji...@apache.org> on 2012/01/07 02:05:39 UTC

[jira] [Updated] (TS-1073) no_dns_just_forward_to_parent configuration parameter is ignored/not used.

     [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-1073:
------------------------------

    Fix Version/s: 3.1.2
         Assignee: Leif Hedstrom
    
> no_dns_just_forward_to_parent configuration parameter is ignored/not used.
> --------------------------------------------------------------------------
>
>                 Key: TS-1073
>                 URL: https://issues.apache.org/jira/browse/TS-1073
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: DNS
>    Affects Versions: 3.0.2
>         Environment: Ubuntu 10.0, Fedora 14
>            Reporter: Kevin Giles
>            Assignee: Leif Hedstrom
>             Fix For: 3.1.2
>
>
> I have two instances of trafficserver configured, one instance is configured to use the second instance as a parent proxy using the following parameters from the records.config:
> CONFIG proxy.config.http.no_dns_just_forward_to_parent INT 1
> CONFIG proxy.config.http.parent_proxy_routing_enable INT 1
> The parent config looks like this:
> dest_domain=.  parent="parent:8080"  round_robin=false
> The no_dns_just_forward_to_parent is not used in the code and as a result dns lookups are being performed in the child instance.
> The following code changes seem to fix this:
> proxy/http/HttpSM.cc
> @@ -6406,11 +6405,20 @@
>          t_state.dns_info.lookup_success = true;
>          call_transact_and_set_next_state(NULL);
>          break;
>        } else if (t_state.parent_result.r == PARENT_UNDEFINED && t_state.dns_info.lookup_success) {
>         // Already set, and we don't have a parent proxy to lookup
>         ink_assert(t_state.host_db_info.ip());
>         Debug("dns", "[HttpTransact::HandleRequest] Skipping DNS lookup, provided by plugin");
>         call_transact_and_set_next_state(NULL);
>         break;
> +      } else if (t_state.dns_info.looking_up == HttpTransact::ORIGIN_SERVER &&
> +                 t_state.http_config_param->no_dns_forward_to_parent){
> +
> +        if(t_state.cop_test_page) {
> +            t_state.host_db_info.ip() =t_state.state_machine->ua_session->get_netvc()->get_local_ip();
> +        }
> +
> +        t_state.dns_info.lookup_success = true;
> +        call_transact_and_set_next_state(NULL);
> +        break;
>        }
>  
>        HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::state_hostdb_lookup);
> to avoid reverse ns lookups
> /proxy/http/HttpTransact.cc
> @@ -1650,7 +1651,8 @@
>    } else if (s->dns_info.lookup_name[0] <= '9' &&
>               s->dns_info.lookup_name[0] >= '0' &&
>               //(s->state_machine->authAdapter.needs_rev_dns() ||
> -             ( host_rule_in_CacheControlTable() || s->parent_params->ParentTable->hostMatch)) {
> +             ( host_rule_in_CacheControlTable() || s->parent_params->ParentTable->hostMatch) &&
> +             !s->http_config_param->no_dns_forward_to_parent) {
>      // note, broken logic: ACC fudges the OR stmt to always be true,
>      // 'AuthHttpAdapter' should do the rev-dns if needed, not here .
>      TRANSACT_RETURN(REVERSE_DNS_LOOKUP, HttpTransact::StartAccessControl);
> I would like to have these changes applied to the repository if they look ok.
> I also created an empty resolv.conf and pointed ats to the empty file:
> CONFIG proxy.config.dns.resolv_conf STRING /usr/local/etc/trafficserver/resolv.conf
> When these changes are applied the child instance no longer attempts to perform dns lookups for the
> http requests that it receives. If they are not applied and the dns lookup it slow or unreliable on the
> child then the http requests are blocked by the dns lookup within the child trafficserver instance.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira