You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by jacksontj <gi...@git.apache.org> on 2016/05/12 15:15:20 UTC

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

GitHub user jacksontj opened a pull request:

    https://github.com/apache/trafficserver/pull/631

    TS-4436: Move hosts file implementation to `do_dns`

    This moves the hosts file overrides down to the DNS layer instead of the HostDBInfo layer. This means that each port will get its own entry in hostdb, which will exist as its own HostDBInfo just like all the rest of the entries. This also means we only have to do the check in the map on DNS lookup instead of on each probe()
    
    In addition to fixing the down status issues, this also means we no longer need to keep old copies of the strings etc. since they are copied once lookup_done is called.
    
    
    Note: This patch is currently setting the TTL of the hosts file entry in HostDBInfo as `HOST_DB_TIMEOUT_INTERVAL` Ideally this would be the time remaining until the next hosts file sync, but I'm not sure if thats necessary-- thoughts?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jacksontj/trafficserver TS-4436

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/631.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #631
    
----
commit 6b8b86a2ec8329181649d56c6853a1d79d595a07
Author: Thomas Jackson <ja...@gmail.com>
Date:   2016-05-11T02:59:24Z

    TS-4436: Move hosts file implementation to `do_dns`
    
    This moves the hosts file overrides down to the DNS layer instead of the HostDBInfo layer. This means that each port will get its own entry in hostdb, which will exist as its own HostDBInfo just like all the rest of the entries. This also means we only have to do the check in the map on DNS lookup instead of on each probe()
    
    In addition to fixing the down status issues, this also means we no longer need to keep old copies of the strings etc. since they are copied once lookup_done is called.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by jacksontj <gi...@git.apache.org>.
Github user jacksontj commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218790124
  
    @zwoop looks like @atsci is having some sort of issue: 
    ```GitHub pull request #631 of commit 6b8b86a2ec8329181649d56c6853a1d79d595a07, no merge conflicts.
    Building remotely on Linux-Github2 (github_linux) in workspace /var/jenkins/workspace/Github-Linux
     > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
    Fetching changes from the remote Git repository
     > /usr/bin/git config remote.origin.url https://github.com/apache/trafficserver.git # timeout=10
    Cleaning workspace
     > /usr/bin/git rev-parse --verify HEAD # timeout=10
    Resetting working tree
     > /usr/bin/git reset --hard # timeout=10
    ERROR: Error fetching remote repo 'origin'
    hudson.plugins.git.GitException: Failed to fetch from https://github.com/apache/trafficserver.git
    	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
    	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066)
    	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
    	at hudson.scm.SCM.checkout(SCM.java:485)
    	at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
    	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    	at hudson.model.Run.execute(Run.java:1738)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    	at hudson.model.ResourceController.execute(ResourceController.java:98)
    	at hudson.model.Executor.run(Executor.java:410)
    Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git reset --hard" returned status code 128:
    stdout: 
    stderr: fatal: Could not parse object 'HEAD'.```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218807940
  
    Linux (CentOS7) build finished successfully. Details on https://ci.trafficserver.apache.org/job/Github-Linux/29/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by jacksontj <gi...@git.apache.org>.
Github user jacksontj commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-219066555
  
    @SolidWallOfCode (might be interested in this-- as we quickly discussed this at the summit)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218808343
  
    FreeBSD v10 build finished successfully. Details on https://ci.trafficserver.apache.org/job/Github-FreeBSD/11/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218804213
  
    Linux (CentOS7) build failed! Details on https://ci.trafficserver.apache.org/job/Github-Linux/27/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218805119
  
    Linux (CentOS7) build failed! Details on https://ci.trafficserver.apache.org/job/Github-Linux/28/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218796438
  
    [approve ci]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218789806
  
    Linux (CentOS7) build failed! Details on https://ci.trafficserver.apache.org/job/Github-Linux/22/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218799509
  
    Linux (CentOS7) build finished successfully. Details on https://ci.trafficserver.apache.org/job/Github-Linux/25/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #631: TS-4436: Move hosts file implementation to ...

Posted by SolidWallOfCode <gi...@git.apache.org>.
Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/631#discussion_r65959288
  
    --- Diff: iocore/hostdb/HostDB.cc ---
    @@ -1998,6 +1988,19 @@ HostDBContinuation::do_dns()
           hostdb_cont_free(this);
           return;
         }
    +    ts::ConstBuffer hname(md5.host_name, md5.host_len);
    +    Ptr<RefCountedHostsFileMap> current_host_file_map = hostDB.hosts_file_ptr;
    +    HostsFileMap::iterator find_result = current_host_file_map->hosts_file_map.find(hname);
    +    if (find_result != current_host_file_map->hosts_file_map.end()) {
    +      if (action.continuation) {
    +        // Set the TTL based on how much time remains until the next sync
    +        HostDBInfo *r = lookup_done(IpAddr(find_result->second), md5.host_name, false,
    +                                    current_host_file_map->next_sync_time - Thread::get_hrtime(), NULL);
    --- End diff --
    
    Isn't that value to `lookup_done` TTL in seconds, not nanoseconds?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218805451
  
    FreeBSD v10 build finished successfully. Details on https://ci.trafficserver.apache.org/job/Github-FreeBSD/10/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218808069
  
    FreeBSD v10 build finished successfully. Details on https://ci.trafficserver.apache.org/job/Github-FreeBSD/12/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218803315
  
    Linux (CentOS7) build failed! Details on https://ci.trafficserver.apache.org/job/Github-Linux/26/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218791900
  
    FreeBSD v10 build failed! Details on https://ci.trafficserver.apache.org/job/Github-FreeBSD/7/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by jacksontj <gi...@git.apache.org>.
Github user jacksontj closed the pull request at:

    https://github.com/apache/trafficserver/pull/631


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-4436: Move hosts file implementatio...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the pull request:

    https://github.com/apache/trafficserver/pull/631#issuecomment-218798722
  
    FreeBSD v10 build finished successfully. Details on https://ci.trafficserver.apache.org/job/Github-FreeBSD/9/
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---