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

Ship it!


Ship It!

- Sid Wagle


On May 9, 2014, 9:45 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21287/
> -----------------------------------------------------------
> 
> (Updated May 9, 2014, 9:45 p.m.)
> 
> 
> Review request for Ambari and Sid Wagle.
> 
> 
> Bugs: AMBARI-5723
>     https://issues.apache.org/jira/browse/AMBARI-5723
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> After submitting cluster create with a default password as well as some 
> passwords specified in BP, a 500 response is returned to the user as a result 
> of an IllegalStateException during password validation.
> 13:55:48,112 ERROR qtp752317744-20 BaseManagementHandler:62 - Caught a 
> runtime exception while attempting to create a resource
> java.lang.IllegalStateException
> at java.util.HashMap$HashIterator.remove(HashMap.java:942)
> at 
> org.apache.ambari.server.controller.internal.ClusterResourceProvider.validatePasswordProperties(ClusterResourceProvider.java:379)
> at 
> org.apache.ambari.server.controller.internal.ClusterResourceProvider.processBlueprintCreate(ClusterResourceProvider.java:333)
> at 
> org.apache.ambari.server.controller.internal.ClusterResourceProvider.createResources(ClusterResourceProvider.java:148)
> at 
> org.apache.ambari.server.controller.internal.ClusterControllerImpl.createResources(ClusterControllerImpl.java:218)
> at 
> org.apache.ambari.server.api.services.persistence.PersistenceManagerImpl.create(PersistenceManagerImpl.java:75)
> at 
> org.apache.ambari.server.api.handlers.CreateHandler.persist(CreateHandler.java:36)
> at 
> org.apache.ambari.server.api.handlers.BaseManagementHandler.handleRequest(BaseManagementHandler.java:72)
> at 
> org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:126)
> at 
> org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:80)
> at 
> org.apache.ambari.server.api.services.ClusterService.createCluster(ClusterService.java:82)
> 
> 
> This is a result of remove being called multiple times for the same iterator 
> entry if there were multiple required passwords in the same host group for 
> the same configuration type.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
>  1d05b46 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
>  616df5b 
> 
> Diff: https://reviews.apache.org/r/21287/diff/
> 
> 
> Testing
> -------
> 
> Functional Testing:
> - Ensured proper password validation in above case.
> - Successfully created cluster
> 
> Unit Tests:
> - Updated existing unit test to cover above scenario
> - All unit tests pass
> 
> Results :
> 
> Tests run: 1606, Failures: 0, Errors: 0, Skipped: 13
> ...
> Total run:550
> Total errors:0
> Total failures:0
> ...
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 19:06.573s
> [INFO] Finished at: Fri May 09 17:34:54 EDT 2014
> [INFO] Final Memory: 20M/123M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> John Speidel
> 
>

Reply via email to