Browse Source

AMBARI-15269. Stack Advisor recommends properties with empty values related to kerberos descriptor. (aonishuk)

Andrew Onishuk 9 years ago
parent
commit
b187984b07

+ 4 - 2
ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py

@@ -499,8 +499,10 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
         putHiveSitePropertyAttribute("hive.server2.authentication.ldap.url", "delete", "true")
 
     if hive_server2_auth == "kerberos":
-      putHiveSiteProperty("hive.server2.authentication.kerberos.keytab", "")
-      putHiveSiteProperty("hive.server2.authentication.kerberos.principal", "")
+      if "hive-site" in services["configurations"] and "hive.server2.authentication.kerberos.keytab" not in services["configurations"]["hive-site"]["properties"]:
+        putHiveSiteProperty("hive.server2.authentication.kerberos.keytab", "")
+      if "hive-site" in services["configurations"] and "hive.server2.authentication.kerberos.principal" not in services["configurations"]["hive-site"]["properties"]:
+        putHiveSiteProperty("hive.server2.authentication.kerberos.principal", "")
     elif "KERBEROS" not in servicesList: # Since 'hive_server2_auth' cannot be relied on within the default, empty recommendations request
       if ("hive.server2.authentication.kerberos.keytab" in configurations["hive-site"]["properties"]) or \
               ("hive-site" not in services["configurations"]) or \