You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2014/06/11 16:42:57 UTC
git commit: AMBARI-6082. ambari-server setup does not check that
custom jdk path is jdk.(vbrodetskyi)
Repository: ambari
Updated Branches:
refs/heads/trunk 7d875fbac -> 451e61c34
AMBARI-6082. ambari-server setup does not check that custom jdk path is jdk.(vbrodetskyi)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/451e61c3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/451e61c3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/451e61c3
Branch: refs/heads/trunk
Commit: 451e61c3419eb211018d73974c338ee4b18da544
Parents: 7d875fb
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Wed Jun 11 08:49:46 2014 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Wed Jun 11 08:50:03 2014 +0300
----------------------------------------------------------------------
ambari-server/src/main/python/ambari-server.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/451e61c3/ambari-server/src/main/python/ambari-server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index 38d6133..1ec8ec3 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -1785,8 +1785,8 @@ def download_jdk(args):
print_warning_msg("JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.")
print_warning_msg(jcePolicyWarn)
args.java_home = get_validated_string_input("Path to JAVA_HOME: ", None, None, None, False, False)
- if not os.path.exists(args.java_home):
- err = "Java home path is unavailable. Please put correct path to java home."
+ if not os.path.exists(args.java_home) or not os.path.isfile(os.path.join(args.java_home, "bin", "java")):
+ err = "Java home path or java binary file is unavailable. Please put correct path to java home."
raise FatalException(1, err)
print "Validating JDK on Ambari Server...done."
write_property(JAVA_HOME_PROPERTY, args.java_home)