From 6329a0aa736383f095d61527583e65b904e90b8e Mon Sep 17 00:00:00 2001 From: Vitaly Gridnev Date: Wed, 11 May 2016 16:07:47 +0300 Subject: [PATCH] workaround to fix ambari start on centos7 Change-Id: I1a0383861db50ae5136e8dff9de4119b566606f1 Closes-bug: 1579187 --- releasenotes/notes/ambari-server-start-856403bc280dfba3.yaml | 3 +++ sahara/plugins/ambari/deploy.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/ambari-server-start-856403bc280dfba3.yaml diff --git a/releasenotes/notes/ambari-server-start-856403bc280dfba3.yaml b/releasenotes/notes/ambari-server-start-856403bc280dfba3.yaml new file mode 100644 index 00000000..84f81f8e --- /dev/null +++ b/releasenotes/notes/ambari-server-start-856403bc280dfba3.yaml @@ -0,0 +1,3 @@ +--- +fixes: + - Starting Ambari clusters on Centos 7 is fixed. diff --git a/sahara/plugins/ambari/deploy.py b/sahara/plugins/ambari/deploy.py index 234d6ced..2869c5a5 100644 --- a/sahara/plugins/ambari/deploy.py +++ b/sahara/plugins/ambari/deploy.py @@ -55,7 +55,9 @@ def setup_ambari(cluster): sudo = functools.partial(r.execute_command, run_as_root=True) sudo("ambari-server setup -s -j" " `cut -f2 -d \"=\" /etc/profile.d/99-java.sh`", timeout=1800) - sudo("service ambari-server start") + redirect_file = "/tmp/%s" % uuidutils.generate_uuid() + sudo("service ambari-server start >{rfile} && " + "cat {rfile} && rm {rfile}".format(rfile=redirect_file)) LOG.debug("Ambari management console installed")