Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-2983

[HOD] local_fqdn() returns None when gethostbyname_ex doesnt return any FQDNs.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.16.0
    • 0.17.0
    • contrib/hod
    • None
    • Linux, PBS

    Description

      For some reason (probably in our local DNS setup) gethostbyname_ex() does not return any fully qualified hostnames. This has never been an issue, everything has worked fully with the hostnames.

      However, this causes HOD to fail, as local_fqn() in util.py returns None.

      Python 2.5.1 (r251:54863, Sep 21 2007, 16:05:06)
      [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import socket, os
      >>> socket.gethostbyname_ex(os.uname()[1])
      ('bohol', [], ['130.209.252.70'])
      >>>
      

      The solution is to fix local_fqdn in until.py, such that it falls back to the contents of the variable me if fqdn is still None.

      Ta muchly.

      Craig

      Attachments

        1. HOD_util_local_fqdn_AL_GRANTED.patch
          0.5 kB
          Craig Macdonald
        2. HOD_util_local_fqdn.py
          0.5 kB
          Craig Macdonald

        Activity

          People

            yhemanth Hemanth Yamijala
            craigm Craig Macdonald
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: