Browse Source

AMBARI-12218. Host check for JDK does not fail when custom JDK is not found (rlevas)

Robert Levas 10 years ago
parent
commit
c7455ea8a1
1 changed files with 5 additions and 0 deletions
  1. 5 0
      ambari-server/src/main/python/ambari_server/serverSetup.py

+ 5 - 0
ambari-server/src/main/python/ambari_server/serverSetup.py

@@ -414,6 +414,11 @@ class JDKSetup(object):
           properties.removeOldProp(JDK_NAME_PROPERTY)
           properties.removeOldProp(JCE_NAME_PROPERTY)
 
+          # Make sure any previously existing JDK and JCE name properties are removed. These will
+          # confuse things in a Custom JDK scenario
+          properties.removeProp(JDK_NAME_PROPERTY)
+          properties.removeProp(JCE_NAME_PROPERTY)
+
           self._ensure_java_home_env_var_is_set(args.java_home)
           self.jdk_index = self.custom_jdk_number
           return