You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Kevin Giles (Created) (JIRA)" <ji...@apache.org> on 2012/01/06 13:29:39 UTC

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

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


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

        

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

Posted by "Kevin Giles (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184964#comment-13184964 ] 

Kevin Giles commented on TS-1073:
---------------------------------

Yes, I'll have a go.
                
> 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
>
>         Attachments: TS-1073.patch
>
>
> 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

        

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

Posted by "Kevin Giles (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189852#comment-13189852 ] 

Kevin Giles edited comment on TS-1073 at 1/20/12 3:27 PM:
----------------------------------------------------------

I have applied the same changes to the trunk (my local copy) and it behaves differently than the 3.0.2 source
release. I will investigate it further. 
                
      was (Author: kevin01):
    I have applied the same changes to the trunk and it behaves differently than the 3.0.2 source
release. I will investigate it further. 
                  
> 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.3
>
>         Attachments: TS-1073.patch
>
>
> 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

        

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

Posted by "Kevin Giles (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Giles updated TS-1073:
----------------------------

    Attachment: TS-1073.patch

Apologies, it appears I had not applied the changes to the trunk, I must have applied them elsewhere.

I have tested it against the trunk and the fix still works. 
                
> 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.3
>
>         Attachments: TS-1073.patch
>
>
> 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

        

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

Posted by "Kevin Giles (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189852#comment-13189852 ] 

Kevin Giles commented on TS-1073:
---------------------------------

I have applied the same changes to the trunk and it behaves differently than the 3.0.2 source
release. I will investigate it further. 
                
> 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.3
>
>         Attachments: TS-1073.patch
>
>
> 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

        

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

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13181744#comment-13181744 ] 

Leif Hedstrom commented on TS-1073:
-----------------------------------

Hi Kevin!

Thanks for the bug, and patch. Would you mind attaching the patch as a real attachement? It makes review (and commiting) it a lot easier.

Cheers,
-- Leif

                
> 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
>             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

        

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

Posted by "Leif Hedstrom (Updated) (JIRA)" <ji...@apache.org>.
     [ 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

        

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

Posted by "Kevin Giles (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Giles updated TS-1073:
----------------------------

    Attachment:     (was: TS-1073.patch)
    
> 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.3
>
>
> 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

        

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

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182950#comment-13182950 ] 

Leif Hedstrom commented on TS-1073:
-----------------------------------

Hmmm, so this doesn't work with trunk, due to all the IPv6 changes... Would you be able to get it working there? If not, I'll take a stab if necessary.

Thanks!
                
> 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
>
>         Attachments: TS-1073.patch
>
>
> 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

        

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

Posted by "Leif Hedstrom (Updated) (JIRA)" <ji...@apache.org>.
     [ 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:     (was: 3.1.3)
                   3.1.2
    
> 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
>
>         Attachments: TS-1073.patch
>
>
> 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

        

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

Posted by "Leif Hedstrom (Updated) (JIRA)" <ji...@apache.org>.
     [ 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:     (was: 3.1.2)
                   3.1.3

Moving out to v3.1.3, please move back if you think it will be done in the very near future.
                
> 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.3
>
>         Attachments: TS-1073.patch
>
>
> 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

        

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

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13191276#comment-13191276 ] 

Leif Hedstrom commented on TS-1073:
-----------------------------------

Sorry to be a pain here, but should we not try to be IPv6 compatible here ? Perhaps it could be e.g.

{code}
+        if (t_state.cop_test_page)
+          ink_inet_copy(t_state.host_db_info.ip(), t_state.state_machine->ua_session->get_netvc()->get_local_addr());
{code}

Or, are the COP test pages always guaranteed to be IPv4 only (not sure how that works, but even so, at some point, I imagine IPv4 will go away completely :).

Thoughts?

                
> 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
>
>         Attachments: TS-1073.patch
>
>
> 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

        

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

Posted by "Kevin Giles (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13191126#comment-13191126 ] 

Kevin Giles edited comment on TS-1073 at 1/23/12 12:04 PM:
-----------------------------------------------------------

Apologies, it appears I had not applied the changes to the trunk, I must have applied them elsewhere.

I have tested it against the trunk and the fix still works. 

Now attaching updated patch file.
                
      was (Author: kevin01):
    Apologies, it appears I had not applied the changes to the trunk, I must have applied them elsewhere.

I have tested it against the trunk and the fix still works. 
                  
> 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.3
>
>         Attachments: TS-1073.patch
>
>
> 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

        

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

Posted by "Kevin Giles (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Giles updated TS-1073:
----------------------------

    Attachment: TS-1073.patch

The revision should be ignore as it coming from a local repository. The changes were applied to files contained within the 3.0.2 release.
                
> 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
>
>         Attachments: TS-1073.patch
>
>
> 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