incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject git commit: AMBARI-2864. Host registration fails. (swagle)
Date Sat, 10 Aug 2013 03:19:18 GMT
Updated Branches:
  refs/heads/trunk 38eea5654 -> 053882789


AMBARI-2864. Host registration fails. (swagle)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/05388278
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/05388278
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/05388278

Branch: refs/heads/trunk
Commit: 053882789f04bee76d44640f25525e1beb242b60
Parents: 38eea56
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Fri Aug 9 19:56:21 2013 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Fri Aug 9 19:56:21 2013 -0700

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/HostInfo.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/05388278/ambari-agent/src/main/python/ambari_agent/HostInfo.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/HostInfo.py b/ambari-agent/src/main/python/ambari_agent/HostInfo.py
index 889129a..2130082 100644
--- a/ambari-agent/src/main/python/ambari_agent/HostInfo.py
+++ b/ambari-agent/src/main/python/ambari_agent/HostInfo.py
@@ -154,13 +154,14 @@ class HostInfo:
     osType = self.get_os_type()
     for service in services:
       svcCheckResult = {}
-      svcCheckResult['name'] = service
-      svcCheckResult['status'] = "UNKNOWN"
-      svcCheckResult['desc'] = ""
       if isinstance(service, dict):
         serviceName = service[osType]
       else:
         serviceName = service
+
+      svcCheckResult['name'] = serviceName
+      svcCheckResult['status'] = "UNKNOWN"
+      svcCheckResult['desc'] = ""
       try:
         cmd = "/sbin/service " + serviceName + " status"
         osStat = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,


Mime
View raw message