Преглед изворни кода

AMBARI-5061. Ambari Upgrade stack command failed. (swagle)

Siddharth Wagle пре 11 година
родитељ
комит
9320e9d2ae
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      ambari-server/src/main/python/ambari-server.py

+ 2 - 2
ambari-server/src/main/python/ambari-server.py

@@ -2613,7 +2613,7 @@ def run_stack_upgrade(stackName, stackVersion, repo_url, repo_url_os):
 
 
   command = STACK_UPGRADE_HELPER_CMD.format(jdk_path, get_conf_dir(), get_ambari_classpath(),
   command = STACK_UPGRADE_HELPER_CMD.format(jdk_path, get_conf_dir(), get_ambari_classpath(),
                                              "updateStackId",
                                              "updateStackId",
-                                            json.dumps(stackId))
+                                            "'" + json.dumps(stackId) + "'")
   (retcode, stdout, stderr) = run_os_command(command)
   (retcode, stdout, stderr) = run_os_command(command)
   print_info_msg("Return code from stack upgrade command, retcode = " + str(retcode))
   print_info_msg("Return code from stack upgrade command, retcode = " + str(retcode))
   if retcode > 0:
   if retcode > 0:
@@ -2631,7 +2631,7 @@ def run_metainfo_upgrade(keyValueMap = None):
   if keyValueMap:
   if keyValueMap:
     command = STACK_UPGRADE_HELPER_CMD.format(jdk_path, get_conf_dir(), get_ambari_classpath(),
     command = STACK_UPGRADE_HELPER_CMD.format(jdk_path, get_conf_dir(), get_ambari_classpath(),
                                               'updateMetaInfo',
                                               'updateMetaInfo',
-                                              json.dumps(keyValueMap))
+                                              "'" + json.dumps(keyValueMap) + "'")
     (retcode, stdout, stderr) = run_os_command(command)
     (retcode, stdout, stderr) = run_os_command(command)
     print_info_msg("Return code from stack upgrade command, retcode = " + str(retcode))
     print_info_msg("Return code from stack upgrade command, retcode = " + str(retcode))
     if retcode > 0:
     if retcode > 0: