diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/oozie_prepare_war.py b/ambari-common/src/main/python/resource_management/libraries/functions/oozie_prepare_war.py index 74f4a65af8b..b3551f664a2 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/oozie_prepare_war.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/oozie_prepare_war.py @@ -43,13 +43,9 @@ def prepare_war(params): # DON'T CHANGE THE VALUE SINCE IT'S USED TO DETERMINE WHETHER TO RUN THE COMMAND OR NOT BY READING THE MARKER FILE. # Oozie tmp dir should be /var/tmp/oozie and is already created by a function above. - command = format( - "cd {oozie_tmp_dir} && {oozie_setup_sh} prepare-war {oozie_secure}" - ).strip() + command = format("cd {oozie_tmp_dir} && {oozie_setup_sh} {oozie_secure}").strip() # oozie_setup_sh and oozie_setup_sh_current are different during Ambaripreupload - command_to_file = format( - "cd {oozie_tmp_dir} && {oozie_setup_sh_current} prepare-war {oozie_secure}" - ).strip() + command_to_file = format("cd {oozie_tmp_dir} && {oozie_setup_sh_current} {oozie_secure}").strip() run_prepare_war = False if os.path.exists(prepare_war_cmd_file): @@ -106,10 +102,8 @@ def prepare_war(params): if output is None: output = "" - if ( - return_code != 0 or "New Oozie WAR file with added".lower() not in output.lower() - ): - message = f"Unexpected Oozie WAR preparation output {output}" + if return_code != 0: + message = "Non zero Oozie setup return code {0}".format(output) Logger.error(message) raise Fail(message)