From 8bded6c9319370872581543325e3c98dcbedb0e1 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Wed, 17 Oct 2018 10:35:30 +0200 Subject: [PATCH] Increase the startup time of ambari-server to 180s It seems to be easy to hit timeout errors, so let's increase the value of the timeout when ambari-server is started. The option is recognized only from Ambari 2.5 onwards, but the plugin uses Ambari 2.6 for all versions but HDP 2.3. Story: 2004102 Task: 27509 Change-Id: I47c6dd14585ed20998fcf4a068cf1e7144eaf026 --- sahara/plugins/ambari/deploy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sahara/plugins/ambari/deploy.py b/sahara/plugins/ambari/deploy.py index 0680c550e0..c55e57ccb0 100644 --- a/sahara/plugins/ambari/deploy.py +++ b/sahara/plugins/ambari/deploy.py @@ -81,6 +81,11 @@ def setup_ambari(cluster): ambari_settings) sudo("ambari-server setup -s -j" " `cut -f2 -d \"=\" /etc/profile.d/99-java.sh`", timeout=1800) + # the following change must be after ambari-setup, or it would be + # overwritten (probably because it's not part of the base set of + # keywords/values handled by ambari-setup). + r.append_to_file("/etc/ambari-server/conf/ambari.properties", + "server.startup.web.timeout=180", run_as_root=True) redirect_file = "/tmp/%s" % uuidutils.generate_uuid() sudo("service ambari-server start >{rfile} && " "cat {rfile} && rm {rfile}".format(rfile=redirect_file))