ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-8580. Broken repo for CentOS5 2.0.0 (aonishuk)
Date Mon, 08 Dec 2014 15:36:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 77cf8b605 -> efc7ba2e0


AMBARI-8580. Broken repo for CentOS5 2.0.0 (aonishuk)


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

Branch: refs/heads/trunk
Commit: efc7ba2e09017a71da01a27df6a9073c78d50d82
Parents: 77cf8b6
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Dec 8 17:35:52 2014 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Dec 8 17:35:52 2014 +0200

----------------------------------------------------------------------
 ambari-common/src/main/python/ambari_commons/os_check.py | 3 +--
 ambari-server/src/main/python/setupAgent.py              | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/efc7ba2e/ambari-common/src/main/python/ambari_commons/os_check.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/ambari_commons/os_check.py b/ambari-common/src/main/python/ambari_commons/os_check.py
index a7eb987..7e71b10 100644
--- a/ambari-common/src/main/python/ambari_commons/os_check.py
+++ b/ambari-common/src/main/python/ambari_commons/os_check.py
@@ -20,7 +20,6 @@ limitations under the License.
 
 import os
 import sys
-import json
 import platform
 
 # path to resources dir
@@ -84,7 +83,7 @@ class OS_CONST_TYPE(type):
     try:
       fpath = os.path.join(RESOURCES_DIR, OSFAMILY_JSON_RESOURCE)
       f = open(fpath)
-      json_data = json.load(f)
+      json_data = eval(f.read())
       f.close()
       for family in json_data:
         cls.FAMILY_COLLECTION += [family]

http://git-wip-us.apache.org/repos/asf/ambari/blob/efc7ba2e/ambari-server/src/main/python/setupAgent.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/setupAgent.py b/ambari-server/src/main/python/setupAgent.py
index ede83c5..69be139 100755
--- a/ambari-server/src/main/python/setupAgent.py
+++ b/ambari-server/src/main/python/setupAgent.py
@@ -75,7 +75,7 @@ def configureAgent(server_hostname, user_run_as):
 
 def runAgent(passPhrase, expected_hostname, user_run_as):
   os.environ[AMBARI_PASSPHRASE_VAR] = passPhrase
-  agent_retcode = subprocess.call("su - {0} -c '/usr/sbin/ambari-agent restart --expected-hostname={1}'".format(user_run_as,
expected_hostname)
+  agent_retcode = subprocess.call("su - %1s -c '/usr/sbin/ambari-agent restart --expected-hostname=%2s'"
% (user_run_as, expected_hostname)
                                   , shell=True)
   for i in range(3):
     time.sleep(1)


Mime
View raw message