----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31035/#review72471 -----------------------------------------------------------
Ship it! I think this is a great solution for the issue. ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java <https://reviews.apache.org/r/31035/#comment118538> Bummer more server-specific logic bleeding in.. ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java <https://reviews.apache.org/r/31035/#comment118539> It seems like `KerberosHelper.validateKDCCredentials` should throw (more) specific Kerberos*Exceptions rather then the general IllegalArguementAcception. It may take a bit more work to do this, but removes the *guess work* out of determing what is acutally going on. I think of the IllegalArguement exceptions as a interface to an *external* caller not an *internal* caller. ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java <https://reviews.apache.org/r/31035/#comment118540> Your test case needs to mock up krb5-conf and kerberos-env configurations. See `org.apache.ambari.server.controller.KerberosHelperTest#testEnableKerberos(org.apache.ambari.server.serveraction.kerberos.KerberosCredential, boolean, boolean)` for an example. - Robert Levas On Feb. 13, 2015, 8 p.m., John Speidel wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31035/ > ----------------------------------------------------------- > > (Updated Feb. 13, 2015, 8 p.m.) > > > Review request for Ambari, Robert Levas, Tom Beerbower, and Yusaku Sako. > > > Bugs: AMBARI-9640 > https://issues.apache.org/jira/browse/AMBARI-9640 > > > Repository: ambari > > > Description > ------- > > Add the following properties to the Kerberos service resource which provide > the results of the validation of the KDC admin credentials stored in session: > "Services/attributes/kdc_validation_result" and > "Services/attributes/kdc_validation_failure_details". > > See the associated Jira for more details including full api responses. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java > 2e68c7d > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java > 40921f5 > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java > 210c6a4 > > Diff: https://reviews.apache.org/r/31035/diff/ > > > Testing > ------- > > Manual Functional Testing: > - Tested all possible results of the validation > - Tested when no kerberos service existed > > Unit Tests: > - Added new unit tests > - Running entire unit test suite now and will post results prior to merging > > > Thanks, > > John Speidel > >
