-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61168/#review181653
-----------------------------------------------------------


Ship it!




Thanks for making the changes. I think this will cover all of the cases where 
auth-to-local rules may be incorrect. 

My comments are just comments, so feel feel to ignore.  I tend to be paranoid 
about nulls. :)


ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FixAuthToLocalMappingAction.java
Lines 67 (patched)
<https://reviews.apache.org/r/61168/#comment257285>

    I would be really surprised if a configuration type has multiple properties 
that were auth-to-local rule sets.... as would you. :)  But I would have been a 
been a bit more cautions and made this a `Map<String, Set<String>>`.  
    
    You are probably good to go though.



ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FixAuthToLocalMappingAction.java
Lines 105 (patched)
<https://reviews.apache.org/r/61168/#comment257284>

    It is most-likely that the property value will not be `null`, but I tend to 
be a bit more paranoid...
    
    Maybe the following would be better, but feel free to ignore since the 
likelyhood that the value is null is really small...
    
    ```
    String authToLocalRules = properties.get(property);
    if(!StringUtils.isEmpty(authToLocalRules)) {
      authToLocalRules = authToLocalRules.replaceAll(SPNEGO_PRINC_PATTERN, "");
      ...
    }


- Robert Levas


On July 28, 2017, 12:16 a.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61168/
> -----------------------------------------------------------
> 
> (Updated July 28, 2017, 12:16 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Alejandro Fernandez, Jonathan 
> Hurley, Robert Levas, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-21577
>     https://issues.apache.org/jira/browse/AMBARI-21577
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Hive Service check is failing :- 
> 
> {code}
> HTTP/[email protected] is not allowed to 
> impersonate ambari-qa
> {code}
> 
> Patch executes custom action to remove offending rules.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FixAuthToLocalMappingAction.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
>  684acfa 
>   
> ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
>  484e459 
>   
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/FixAuthToLocalMappingActionTest.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/61168/diff/6/
> 
> 
> Testing
> -------
> 
> Manually verified.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>

Reply via email to