[ 
https://issues.apache.org/jira/browse/AMBARI-12207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14606716#comment-14606716
 ] 

Sumit Mohanty commented on AMBARI-12207:
----------------------------------------

The assumption is that its a working configuration pre-RU. So addition of the 
new configs such as {{"hive.server2.authentication.kerberos.keytab" = ""}} are 
not a requirement. However, they get added as RU automatically merges default 
config with the current. So the fix is to conditionally delete fields that are 
not needed:

{code}
  if hive.server2.authentication == "ldap":
      
putHiveSitePropertyAttribute("hive.server2.authentication.kerberos.keytab", 
"delete", "true")
      
putHiveSitePropertyAttribute("hive.server2.authentication.kerberos.principal", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.pam.services", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.custom.authentication.class", 
"delete", "true")

    if hive.server2.authentication == "kerberos":
      putHiveSitePropertyAttribute("hive.server2.authentication.pam.services", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.ldap.url", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.ldap.baseDN", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.custom.authentication.class", 
"delete", "true")

    if hive.server2.authentication == "pam":
      
putHiveSitePropertyAttribute("hive.server2.authentication.kerberos.keytab", 
"delete", "true")
      
putHiveSitePropertyAttribute("hive.server2.authentication.kerberos.principal", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.ldap.url", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.ldap.baseDN", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.custom.authentication.class", 
"delete", "true")

    if hive.server2.authentication == "custom":
      putHiveSitePropertyAttribute("hive.server2.authentication.pam.services", 
"delete", "true")
      
putHiveSitePropertyAttribute("hive.server2.authentication.kerberos.keytab", 
"delete", "true")
      
putHiveSitePropertyAttribute("hive.server2.authentication.kerberos.principal", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.ldap.url", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.ldap.baseDN", 
"delete", "true")

    if hive.server2.authentication == "NONE":
      putHiveSitePropertyAttribute("hive.server2.custom.authentication.class", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.pam.services", 
"delete", "true")
      
putHiveSitePropertyAttribute("hive.server2.authentication.kerberos.keytab", 
"delete", "true")
      
putHiveSitePropertyAttribute("hive.server2.authentication.kerberos.principal", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.ldap.url", 
"delete", "true")
      putHiveSitePropertyAttribute("hive.server2.authentication.ldap.baseDN", 
"delete", "true")
{code}

> Hive Configs page cannot be saved
> ---------------------------------
>
>                 Key: AMBARI-12207
>                 URL: https://issues.apache.org/jira/browse/AMBARI-12207
>             Project: Ambari
>          Issue Type: Bug
>          Components: rolling-upgrade
>    Affects Versions: 2.1.0
>            Reporter: Sumit Mohanty
>            Assignee: Sumit Mohanty
>            Priority: Critical
>             Fix For: 2.1.0
>
>
> This is Ambari 2.1.0 and HDP 2.3.0.0 after upgrading from Ambari 2.0.1 and 
> HDP 2.2.4.2.
> User is trying to modify a Hive setting. But before user does anything, it 
> shows there are 3 issues. But even if the user types a space into each of the 
> problematic field, it still shows there are 2 issues.
> So I think we have two problems here:
> 1. After upgrade, those 3 fields are not populated;
> 2. There are two hidden fields which are not set.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to