ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Speidel" <jspei...@hortonworks.com>
Subject Review Request 21287: IllegalStateException when provisioning cluster via blueprint during password validation
Date Fri, 09 May 2014 21:45:21 GMT

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

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message