Whirr
  1. Whirr
  2. WHIRR-262

Services should not have to do reverse DNS lookups

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently Hadoop and HBase use DNSUtil to do reverse DNS lookups to get the correct public hostname, but the other services don't which means they may not run correctly in some environments (such as when launched from within EC2, see WHIRR-128 for background). The framework should do these lookups on the service's behalf.

      1. WHIRR-262.patch
        13 kB
        Tom White
      2. WHIRR-262.patch
        25 kB
        Tom White

        Activity

        Hide
        Tom White added a comment -

        Here's a patch which constructs the InetAddress instances with the correctly resolved hostname. We already do a reverse lookup for each host to write the instances file, so this shouldn't make things slower.

        On the other hand, we might consider making this lazier, by adding methods like getPublicIP(), getPublicHostName(), getPrivateIP(), getPrivateHostName() to Instance so that reverse lookups are performed only for the instances that need it. We could replace the public hostname in the instances file with an IP address.

        Show
        Tom White added a comment - Here's a patch which constructs the InetAddress instances with the correctly resolved hostname. We already do a reverse lookup for each host to write the instances file, so this shouldn't make things slower. On the other hand, we might consider making this lazier, by adding methods like getPublicIP(), getPublicHostName(), getPrivateIP(), getPrivateHostName() to Instance so that reverse lookups are performed only for the instances that need it. We could replace the public hostname in the instances file with an IP address.
        Hide
        Tom White added a comment -

        This patch takes the second approach, minimizing reverse DNS lookups.

        Show
        Tom White added a comment - This patch takes the second approach, minimizing reverse DNS lookups.
        Hide
        Andrei Savu added a comment -

        +1 integration tests for HBase are passing on AWS

        Show
        Andrei Savu added a comment - +1 integration tests for HBase are passing on AWS
        Hide
        Tom White added a comment -

        I've just committed this. Thanks for the review Andrei.

        Show
        Tom White added a comment - I've just committed this. Thanks for the review Andrei.

          People

          • Assignee:
            Tom White
            Reporter:
            Tom White
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development