瀏覽代碼

AMBARI-2192. Fix for agent hanging during install

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1485826 13f79535-47bb-0310-9956-ffa450edef68
Nate Cole 12 年之前
父節點
當前提交
eb0ab156cd
共有 2 個文件被更改,包括 3 次插入16 次删除
  1. 2 0
      CHANGES.txt
  2. 1 16
      ambari-agent/src/main/python/ambari_agent/HostInfo.py

+ 2 - 0
CHANGES.txt

@@ -1678,6 +1678,8 @@ Trunk (unreleased changes):
  AMBARI-1657. User directories on HDFS do not get created with custom names 
  provided from Ambari UI. (swagle)
 
+ AMBARI-2192. Fix for agent hanging during install. (ncole)
+
  AMBARI-2125. Fix for UNKNOWN state failing retry on install. (ncole)
 
  AMBARI-2072. Fix to remove actual_configs from cluster response. (ncole)

+ 1 - 16
ambari-agent/src/main/python/ambari_agent/HostInfo.py

@@ -88,22 +88,7 @@ class HostInfo:
       etcList.append(confinfo)
 
   def repos(self):
-    # centos, redhat
-    try:
-      osStat = subprocess.Popen(["yum", "-C", "repolist"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-      out, err = osStat.communicate()
-      return out
-    except:
-      pass
-    # suse, only if above failed
-    try:
-      osStat = subprocess.Popen(["zypper", "repos"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-      out, err = osStat.communicate()
-      return out
-    except:
-      pass
-
-    # default, never return empty
+    # future
     return "could_not_determine"