> On Dec. 12, 2016, 7:25 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java,
> >  line 237
> > <https://reviews.apache.org/r/54665/diff/1/?file=1582045#file1582045line237>
> >
> >     Will this work with multi-level inheritence?
> >     E.g., 
> >     Stack 1 only has Spark
> >     Stack 2 only has Spark2, and inherits from Stack 1
> >     Stack 3 only has Spark3, and inherits from Stack 2
> >     
> >     Technically, Stack 3 has removed both Spark and Spark2.

Hello Alejandro,

I modified the java code to be able to resolve removed services defined in the 
parent stacks.

So a structure like this

Stack 1, Spark
Stack 2, Spark2, Spark(marked as deleted)
Stack 3, Spark3, Spark2(marked as deleted)

would result in Stack3 shows only Spark3 as a valid service, while both Spark2 
and Spark (via inheritance) are marked as deleted.


- Di


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


On Dec. 12, 2016, 4:31 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54665/
> -----------------------------------------------------------
> 
> (Updated Dec. 12, 2016, 4:31 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nate Cole, and Tim Thorpe.
> 
> 
> Bugs: AMBARI-19156
>     https://issues.apache.org/jira/browse/AMBARI-19156
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Install packages step (before RU/EU) fails with err "Cannot enumerate 
> services" if the current stack has services that have been removed in the new 
> stack. For example, mystack-1.0 has Spark, but mystakc-2.0 only has Spark2, 
> where Spark's metainfo.xml in mystack-2.0 has the <deleted>true</deleted> 
> section.
> 
> Workaround is to remove Spark before attempting the install packages.
> 
> The error is below:
> 02 Dec 2016 12:53:43,928 ERROR [ambari-client-thread-27] 
> BaseManagementHandler:61 - Caught a system exception while attempting to 
> create a resource: Cannot enumerate services
> org.apache.ambari.server.controller.spi.SystemException: Cannot enumerate 
> services
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
>  23a4a27 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
>  d417ec2 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java 
> ce606de 
>   ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java 
> ba5cb42 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
>  8263f72 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java
>  0b7d0ff 
> 
> Diff: https://reviews.apache.org/r/54665/diff/
> 
> 
> Testing
> -------
> 
> 1. unit tests
> 2. patched a cluster with the fixes, update new stack to remove Spark ( 
> leaving only  Spark 2), run Install Packages, verify it didn't fail with the 
> "Cannot enumerate services" error.
> 
> 
> Thanks,
> 
> Di Li
> 
>

Reply via email to