Explorar el Código

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

Andrew Onishuk hace 10 años
padre
commit
efc7ba2e09

+ 1 - 2
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]

+ 1 - 1
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)