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

Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, and 
Sebastian Toader.


Bugs: AMBARI-17629
    https://issues.apache.org/jira/browse/AMBARI-17629


Repository: ambari


Description
-------

When adding new services and components to a cluster that was initially created 
via Blueprints (rather than via the Ambari UI), auth-to-local rules that are 
expected to be created as indicated by the Kerberos descriptor are not.

It occurs because the components being installed are in the `INIT` state where 
the logic to determine whether to include the new auth-to-local rules or not 
expects the components to be in either the `INSTALLED` or `STARTED` states. 
This is due to logic added when resolving AMBARI-14232.

#Solution:
Allow for auth-to-local rules for new services and components to be added when 
the state of the components are  `INIT` as well as `INSTALLED` and `STARTED`, 
when the cluster was installed via Blueprints.


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
 cc48240 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/KerberosHelperTest.java
 66ed68d 

Diff: https://reviews.apache.org/r/49826/diff/


Testing
-------

Manually tested..

# Local unit tests: 
```
Running org.apache.ambari.server.controller.KerberosHelperTest
Tests run: 63, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.402 sec - in 
org.apache.ambari.server.controller.KerberosHelperTest
```

Previous existing and unrelated unit test error:
``` 
Running org.apache.ambari.server.state.ServicePropertiesTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.505 sec <<< 
FAILURE! - in org.apache.ambari.server.state.ServicePropertiesTest
validatePropertySchemaOfServiceXMLs(org.apache.ambari.server.state.ServicePropertiesTest)
  Time elapsed: 0.504 sec  <<< ERROR!
org.apache.ambari.server.AmbariException: File 
/Users/rlevas/git/ambari/ambari-server/target/test-classes/TestAmbaryServer.samples/../../../src/main/resources/common-services/RANGER/0.4.0/configuration/admin-properties.xml
 didn't pass the validation. Error message is : cvc-complex-type.3.2.2: 
Attribute 'update' is not allowed to appear in element 'on-ambari-upgrade'.
        at 
org.apache.ambari.server.state.ServicePropertiesTest.validatePropertySchemaOfServiceXMLs(ServicePropertiesTest.java:48)
```


# Jenkins unit tests: PENDING


Thanks,

Robert Levas

Reply via email to