> On Oct. 28, 2016, 9:32 a.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Condition.java,
> >  lines 39-50
> > <https://reviews.apache.org/r/53251/diff/1/?file=1547980#file1547980line39>
> >
> >     Only a matter of time before someone wants to add a custom condition 
> > class.  Could add CLASS or something here with a Condition interface that 
> > can take the cluster as an argument.
> 
> Jonathan Hurley wrote:
>     That's true - we can have CLASS as a new type and enforce some contract 
> on it. However, since it wasn't being used current I didn't think we wanted 
> to enforce a design for a requirement we don't have. Do you think we need to 
> add it now?

Or rather than start this off with a constrained set of types, provide an 
intitial set of condition processor classes...  `SecurityTypeCondition`, 
`ConfigPropertyEqualsCondition`, `ConfigPropertyGreaterThanCondition`, 
`ConfigPropertyBetweenCondition`, etc... 

Forgive the example class names, this is the best I can come up with on short 
notice. ;)


- Robert


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


On Oct. 28, 2016, 10:18 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53251/
> -----------------------------------------------------------
> 
> (Updated Oct. 28, 2016, 10:18 a.m.)
> 
> 
> Review request for Ambari, Nate Cole and Robert Levas.
> 
> 
> Bugs: AMBARI-18726
>     https://issues.apache.org/jira/browse/AMBARI-18726
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Add a way to compute whether an execute-stage should be included, other than 
> the simple service/component check.  
> 
> For example some stage should only be executed if the cluster has Kerberos 
> enabled.  This can be determined using the {{cluster-env/security_enabled}} 
> flag; or (better yet) the {{Cluster}}'s {{securityType}} property, which 
> would be set to "KERBEROS".
> 
> Currently the only filter is based on service and component, which does not 
> work in the case of Kerberos since Kerberos can be enabled without needing to 
> install the KERBEROS service or the KERBEROS_CLIENT component. This will 
> happen if the Kerberos identities are managed manually rather than 
> configuring Ambari to do it by integrating with a supported KDC.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  d83aaa2 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/SecurityType.java 
> dc52c4e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
>  2f616e7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java 
> 3a2dc89 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
>  80bb26c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Condition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConditionProcessor.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java
>  be1f469 
>   
> ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml
>  e3bb29d 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml
>  87afdbc 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml
>  e082f72 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml
>  ed81582 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml 
> 3cc0a65 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml 
> e8e00f0 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml 
> 790e5dc 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
>  01e0601 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
>  2925b64 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
>  266c71b 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
>  9e141ae 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml 
> 8b00893 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml 
> 6cc1106 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml 
> b0b78a0 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml 
> adc1a29 
>   
> ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml
>  d1e1059 
>   
> ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
>  9021761 
>   
> ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
>  9c7af5a 
>   ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.4.xml 
> 390f18e 
>   ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml 
> 6af7767 
>   ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml 
> 1dea612 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
>  5e3561a 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  ea829e2 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml 
> b02cbad 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> 7b4472e 
>   
> ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
>  ca107af 
>   ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml 
> 7b4472e 
>   ambari-server/src/main/resources/upgrade-pack.xsd b02d941 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
>  d644a09 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/stack/upgrade/StageWrapperBuilderTest.java
>  267932c 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_direction.xml
>  92fd0b2 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_nonrolling_new_stack.xml
>  789df2e 
>   ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test.xml 
> 5e02b15 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_checks.xml
>  c6d8bbe 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_nonrolling.xml
>  36f8062 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_partial.xml
>  5d8ef01 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_to_new_stack.xml
>  91770fb 
>   ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml 
> 021c73a 
>   
> ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_15388.xml
>  d1dc62d 
>   
> ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
>  273f619 
>   
> ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_conditions.xml
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/upgrades/upgrade_test_15388.xml
>  905def5 
> 
> Diff: https://reviews.apache.org/r/53251/diff/
> 
> 
> Testing
> -------
> 
> Tests run: 4718, Failures: 0, Errors: 0, Skipped: 42
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 22:57 min
> [INFO] Finished at: 2016-10-28T08:49:12-04:00
> [INFO] Final Memory: 55M/762M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>

Reply via email to