----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29701/#review67218 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java <https://reviews.apache.org/r/29701/#comment111088> Would be nice to provide more detail to the user as this will be confusing. Explain what the credentials are any why they are needed as well as how to set them. ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java <https://reviews.apache.org/r/29701/#comment111089> More details would be nice, see previous comment. ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java <https://reviews.apache.org/r/29701/#comment111090> Is AmbariException only thrown for invalid credentials? Would be very frustrating to report back bad credentials when there was actually another issue. See earlier comment regarding a more detailed msg. ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosOperationHandler.java <https://reviews.apache.org/r/29701/#comment111093> Since principalExists() also throws AmbariException but for other reasons (true error condition?) should this case be reported back via a different exception or mechanism? ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java <https://reviews.apache.org/r/29701/#comment111095> not really because of unit testing but generally just a good design principal to inject factories. Unit testing really is just promoting good design. - John Speidel On Jan. 8, 2015, 4:29 a.m., Robert Levas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29701/ > ----------------------------------------------------------- > > (Updated Jan. 8, 2015, 4:29 a.m.) > > > Review request for Ambari, Jaimin Jetly, John Speidel, Nate Cole, and Robert > Nettleton. > > > Bugs: AMBARI-9014 > https://issues.apache.org/jira/browse/AMBARI-9014 > > > Repository: ambari > > > Description > ------- > > Provide the standard error code that will be returned along with the error > message. > > If administrative credentials are not available > { > "status" : 400, > "message" : "java.lang.IllegalArgumentException: Missing KDC administrator > credentials" > } > > If administrative credentials are not valid, for example, incorrect principal > or password (or keytab) > { > "status" : 400, > "message" : "java.lang.IllegalArgumentException: Invalid KDC administrator > credentials" > } > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java > 9662669 > > ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java > 0533228 > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosOperationHandler.java > ae2d4b2 > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosOperationHandlerFactory.java > 30e3c35 > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java > a99628c > > ambari-server/src/test/java/org/apache/ambari/server/controller/KerberosHelperTest.java > 8f39f21 > > ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KerberosOperationHandlerFactoryTest.java > 4c7e49d > > Diff: https://reviews.apache.org/r/29701/diff/ > > > Testing > ------- > > Manaully tested in test cluster > > #Jenkins Test Results > > Running org.apache.ambari.server.controller.KerberosHelperTest > Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.632 sec > > Running org.apache.ambari.server.stack.KerberosDescriptorTest > Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.19 sec > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 01:00 h > [INFO] Finished at: 2015-01-08T04:22:16+00:00 > [INFO] Final Memory: 44M/513M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Robert Levas > >