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

Review request for Ambari, Di Li and Jayush Luniya.


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


Repository: ambari


Description
-------

Description

For a given service if the theme.json file is not properly formatted, Ambari 
server will still start 'successfully' but attempts to add that service to the 
cluster will fail.

The Ambari server start will log the theme error. Although it neglects to 
mention which theme file and service are in error.

When you attempt to add the service, it will query for the service's themes:

api/v1/stacks/<stack>/versions/<version>/services?StackServices/service_name.in(HDFS,YARN,MAPREDUCE2,ZOOKEEPER,RANGER,RANGER_KMS,SLIDER)&themes/ThemeInfo/default=true&fields=themes/*

This will return something like the following for the invalid theme:

"ThemeInfo" :
{ "default" : true, "file_name" : "theme_version_2.json", "service_name" : 
"RANGER_KMS", "stack_name" : "BigInsights", "stack_version" : "4.3", 
"theme_data" : null }

where the theme_data is null.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java 
650bdf1 
  
ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerExtensionTest.java
 044f2c4 
  
ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/metainfo.xml
 ab67178 
  
ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/themes/working_theme.json
 PRE-CREATION 
  
ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/metainfo.xml
 9ae4f4b 
  
ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/themes/broken_theme.json
 PRE-CREATION 

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


Testing
-------

mvn test -Dtest=StackManagerExtensionTest -DskipPythonTests

passes without errors

mvn test

Failed tests:
  UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1107
  Unexpected method call 
AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
org.apache.ambari.server.state.Cluster, EasyMock for interface 
org.apache.ambari.server.state.Service):
    AmbariManagementController.getClusters(): expected: at least 0, actual: 1
    AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
org.apache.ambari.server.state.Service): expected: 1, actual: 0
  DataStoreImplTest.testFind:526 expected:<class 
DS_DataStoreImplTest$TestEntity_1> but was:<class 
DS_DataStoreImplTest$TestSubEntity_1>
  DataStoreImplTest.testRemove:475 expected:<class 
DS_DataStoreImplTest$TestEntity_1> but was:<class 
DS_DataStoreImplTest$TestSubEntity_1>
  DataStoreImplTest.testStore_update:357 expected:<class 
DS_DataStoreImplTest$TestEntity_1> but was:<class 
DS_DataStoreImplTest$TestSubEntity_1>
  DataStoreImplTest.testStore_update_longStringValue:426
  Expectation failure on verify:
    DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
Tests in error:
  KerberosCheckerTest.testCheckFailed »  Unexpected exception, 
expected<org.apac...
  KerberosCheckerTest.testCheckPassed:62 » ClassCast class 
sun.security.provider...
  AmbariAuthenticationFilterTest.testOnSuccessfulAuthentication:98 » Linkage 
loa...

Tests run: 4660, Failures: 5, Errors: 3, Skipped: 34


Thanks,

Tim Thorpe

Reply via email to