Browse Source

HADOOP-2983. [HOD] Fixes the problem - local_fqdn() returns None when gethostbyname_ex doesnt return any FQDNs. Contributed by Craig Macdonald.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@641279 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 17 years ago
parent
commit
12a558583d
2 changed files with 5 additions and 1 deletions
  1. 3 0
      CHANGES.txt
  2. 2 1
      src/contrib/hod/hodlib/Common/util.py

+ 3 - 0
CHANGES.txt

@@ -355,6 +355,9 @@ Trunk (unreleased changes)
     HADOOP-3086. Adds the testcase missed during commit of hadoop-3040.
     (Amareshwari Sriramadasu via ddas)
 
+    HADOOP-2983. [HOD] Fixes the problem - local_fqdn() returns None when 
+    gethostbyname_ex doesnt return any FQDNs. (Craig Macdonald via ddas)
+
 Release 0.16.2 - Unreleased
 
   BUG FIXES

+ 2 - 1
src/contrib/hod/hodlib/Common/util.py

@@ -159,7 +159,8 @@ def local_fqdn():
     for name in nameInfo[1]:
         if name.count(".") and name.startswith(me):
             fqdn = name
-
+    if fqdn == None:
+        fqdn = me
     return(fqdn)
   
 def need_to_allocate(allocated, config, command):