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 34157: Provide host predicate property validation for blueprint requests
Date Wed, 13 May 2015 03:41:07 GMT

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

Review request for Ambari, Robert Levas and Robert Nettleton.


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


Repository: ambari


Description
-------

When specifying a host predicate via the "host_predicate" property in the cluster creation
template, the predicate is compiled using the API predicate compiler which will report syntactic
errors in the predicate but the property names aren't validated. So, if an invalid property
name is specified in the predicate, the host group will never get matched to any host meaning
that the host group will never be deployed.
This is critical that this is fixed for 2.1 as it will cause great frustration to anyone who
attempts to provision or scale a cluster and specifies a host predicate with an invalid proper
name.
When an invalid property name is specified a host predicate, this should result in a 400 response
to the the user with a message which indicates the invalid properties.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java 77f6d2c

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseClusterRequest.java
PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
47a4ce0 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
a1a0ac6 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
1530a3e 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
acfd426 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
PRE-CREATION 

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


Testing
-------

Functional Testing:
Provisioned and scaled clusters with combination of explicit host names, host counts and host
predicates and host registrations prior to and after cluster/scaling operations.

Unit Tests:
New Tests and all existing tests pass.

Results :

Tests run: 2978, Failures: 0, Errors: 0, Skipped: 20
...
Total run:739
Total errors:0
Total failures:0


Thanks,

John Speidel


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