Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 2505856df -> 366b7d690
  refs/heads/trunk 07b423677 -> de34d9965


AMBARI-17794. Oozie Server Start is failed after upgrade from 2.2.2.0 to 
2.4.0.0 (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/de34d996
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/de34d996
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/de34d996

Branch: refs/heads/trunk
Commit: de34d9965d385659bd139a74b19a04fb0d2dc219
Parents: 07b4236
Author: Lisnichenko Dmitro <[email protected]>
Authored: Thu Jul 21 16:10:30 2016 +0300
Committer: Lisnichenko Dmitro <[email protected]>
Committed: Thu Jul 21 16:10:30 2016 +0300

----------------------------------------------------------------------
 .../stacks/HDP/2.5/services/stack_advisor.py    | 11 +++++
 .../stacks/2.5/common/test_stack_advisor.py     | 52 ++++++++++++++++++++
 2 files changed, 63 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/de34d996/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 5e380d8..1bd8206 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -153,6 +153,17 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
                                 "item": self.getErrorItem(
                                     "If HBASE is not installed then the audit 
hbase zookeeper quorum configuration must be specified.")})
 
+    elif application_properties['atlas.graph.storage.backend'] == 'hbase' and 
'hbase-site' not in services[
+      'configurations']:
+      if not application_properties['atlas.graph.storage.hostname']:
+        validationItems.append({"config-name": "atlas.graph.storage.hostname",
+                                "item": self.getErrorItem(
+                                  "Atlas is not configured to use the HBase 
installed in this cluster. If you would like Atlas to use another HBase 
instance, please configure this property and HBASE_CONF_DIR variable in 
atlas-env appropriately.")})
+      if not application_properties['atlas.audit.hbase.zookeeper.quorum']:
+        validationItems.append({"config-name": 
"atlas.audit.hbase.zookeeper.quorum",
+                                "item": self.getErrorItem(
+                                  "If HBASE is not installed then the audit 
hbase zookeeper quorum configuration must be specified.")})
+
     validationProblems = 
self.toConfigurationValidationProblems(validationItems, 
"application-properties")
     return validationProblems
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/de34d996/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 
b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
index 502d1a4..f0a1c87 100644
--- a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
@@ -6705,6 +6705,58 @@ class TestHDP25StackAdvisor(TestCase):
     self.stackAdvisor.recommendAtlasConfigurations(configurations, 
clusterData, services, hosts)
     self.assertEquals(configurations, expected)
 
+  def test_validationAtlasConfigs(self):
+    servicesInfo = [
+      {
+        "name": "ATLAS",
+        "components": []
+      }
+    ]
+    services = self.prepareServices(servicesInfo)
+    services["configurations"] = {"application-properties": {"properties": 
{"atlas.graph.storage.backend": "hbase",
+                                                                            
"atlas.authentication.method.ldap.type": "",
+                                                                            
"atlas.graph.index.search.backend": "",
+                                                                            
"atlas.kafka.bootstrap.servers": "",
+                                                                            
"atlas.kafka.zookeeper.connect": "",
+                                                                            
"atlas.graph.storage.hostname": "",
+                                                                            
"atlas.audit.hbase.zookeeper.quorum": ""
+                                                                            }}}
+    hosts = self.prepareHosts([])
+    result = self.stackAdvisor.validateConfigurations(services, hosts)
+    expectedItems = [
+      {'message': 'If KAFKA is not installed then the Kafka bootstrap servers 
configuration must be specified.',
+       'level': 'ERROR'},
+      {'message': 'If KAFKA is not installed then the Kafka zookeeper quorum 
configuration must be specified.',
+       'level': 'ERROR'},
+      {
+        'message': 'Atlas is not configured to use the HBase installed in this 
cluster. If you would like Atlas to use another HBase instance, please 
configure this property and HBASE_CONF_DIR variable in atlas-env 
appropriately.',
+        'level': 'ERROR'},
+      {'message': 'If HBASE is not installed then the audit hbase zookeeper 
quorum configuration must be specified.',
+       'level': 'ERROR'}
+    ]
+    self.assertValidationResult(expectedItems, result)
+    services["configurations"]["hbase-site"] = {"properties": 
{"hbase.zookeeper.quorum": "h1",}}
+    
services["configurations"]["application-properties"]["properties"]["atlas.kafka.bootstrap.servers"]
 = "test"
+    
services["configurations"]["application-properties"]["properties"]["atlas.kafka.zookeeper.connect"]
 = "test"
+    expectedItems = [
+      {'message': 'If HBASE is not installed then the hbase zookeeper quorum 
configuration must be specified.',
+       'level': 'ERROR'},
+      {'message': 'If HBASE is not installed then the audit hbase zookeeper 
quorum configuration must be specified.',
+       'level': 'ERROR'}
+    ]
+    result = self.stackAdvisor.validateConfigurations(services, hosts)
+    self.assertValidationResult(expectedItems, result)
+    
services["configurations"]["application-properties"]["properties"]["atlas.graph.storage.hostname"]
 = "h1"
+    expectedItems = [
+      {
+        'message': 'Atlas is configured to use the HBase installed in this 
cluster. If you would like Atlas to use another HBase instance, please 
configure this property and HBASE_CONF_DIR variable in atlas-env 
appropriately.',
+        'level': 'WARN'},
+      {'message': 'If HBASE is not installed then the audit hbase zookeeper 
quorum configuration must be specified.',
+       'level': 'ERROR'}
+    ]
+    result = self.stackAdvisor.validateConfigurations(services, hosts)
+    self.assertValidationResult(expectedItems, result)
+
   def test_phoenixQueryServerSecureConfigsAppendProxyuser(self):
     self.maxDiff = None
     phoenix_query_server_hosts = ["c6401.ambari.apache.org", 
"c6402.ambari.apache.org"]

Reply via email to