You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2017/07/27 20:14:51 UTC

ambari git commit: AMBARI-21563. Copy Hadoop core-site.xml to Atlas conf when hadoop is configured for LDAP/AD (Vishal Suvagia via smohanty)

Repository: ambari
Updated Branches:
  refs/heads/trunk ad593b4ed -> eb2725158


AMBARI-21563. Copy Hadoop core-site.xml to Atlas conf when hadoop is configured for LDAP/AD (Vishal Suvagia via smohanty)


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

Branch: refs/heads/trunk
Commit: eb272515826f46620d1e24b1250605b614fe424d
Parents: ad593b4
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Thu Jul 27 13:14:41 2017 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Thu Jul 27 13:14:41 2017 -0700

----------------------------------------------------------------------
 .../libraries/functions/constants.py                |  1 +
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py     | 16 ++++++++++++++++
 .../ATLAS/0.1.0.2.3/package/scripts/params.py       |  3 ++-
 .../stacks/HDP/2.0.6/properties/stack_features.json |  5 +++++
 .../stacks/HDP/2.6/services/ATLAS/metainfo.xml      |  1 +
 5 files changed, 25 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/eb272515/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index c74e029..3b941ec 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -119,3 +119,4 @@ class StackFeature:
   SECURE_RANGER_SSL_PASSWORD = "secure_ranger_ssl_password"
   RANGER_KMS_SSL = "ranger_kms_ssl"
   KAFKA_ACL_MIGRATION_SUPPORT = "kafka_acl_migration_support"
+  ATLAS_CORE_SITE_SUPPORT="atlas_core_site_support"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/eb272515/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
index d424f5b..74b1688 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
@@ -197,6 +197,22 @@ def metadata(type='server'):
     else:
       File(format('{conf_dir}/hdfs-site.xml'), action="delete")
 
+    '''
+    Atlas requires hadoop core-site.xml to resolve users/groups synced in HadoopUGI for
+    authentication and authorization process. Earlier the core-site.xml was available in
+    Hbase conf directory which is a part of Atlas class-path, from stack 2.6 onwards,
+    core-site.xml is no more available in Hbase conf directory. Hence need to create
+    core-site.xml in Atlas conf directory.
+    '''
+    if params.stack_supports_atlas_core_site and params.has_namenode:
+      XmlConfig("core-site.xml",
+        conf_dir=params.conf_dir,
+        configurations=params.config['configurations']['core-site'],
+        configuration_attributes=params.config['configuration_attributes']['core-site'],
+        owner=params.metadata_user,
+        group=params.user_group,
+        mode=0644
+      )
 
 def upload_conf_set(config_set, jaasFile):
   import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/eb272515/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index 3ed469a..96041e6 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -78,7 +78,7 @@ def configs_for_ha(atlas_hosts, metadata_port, is_atlas_ha_enabled, metadata_pro
     additional_props["atlas.server.ha.enabled"] = "true"
 
   return additional_props
-  
+
 # server configurations
 config = Script.get_config()
 exec_tmp_dir = Script.get_tmp_dir()
@@ -240,6 +240,7 @@ for host in zookeeper_hosts:
     zookeeper_quorum += ","
 
 stack_supports_atlas_hdfs_site_on_namenode_ha = check_stack_feature(StackFeature.ATLAS_HDFS_SITE_ON_NAMENODE_HA, version_for_stack_feature_checks)
+stack_supports_atlas_core_site = check_stack_feature(StackFeature.ATLAS_CORE_SITE_SUPPORT,version_for_stack_feature_checks)
 
 atlas_server_xmx = default("configurations/atlas-env/atlas_server_xmx", 2048)
 atlas_server_max_new_size = default("configurations/atlas-env/atlas_server_max_new_size", 614)

http://git-wip-us.apache.org/repos/asf/ambari/blob/eb272515/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
index 31cf0c8..f2c9afc 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
@@ -423,6 +423,11 @@
         "name": "nifi_jaas_conf_create",
         "description": "Create NIFI jaas configuration when kerberos is enabled",
         "min_version": "2.6.0.0"
+      },
+      {
+        "name": "atlas_core_site_support",
+        "description": "Need to create core-site under Atlas conf directory.",
+        "min_version": "2.6.0.0"
       }
     ]
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/eb272515/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml
index 6e1a52e..3a57a47 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml
@@ -30,6 +30,7 @@
       </themes>
       <configuration-dependencies>
         <config-type>hdfs-site</config-type>
+        <config-type>core-site</config-type>
       </configuration-dependencies>
     </service>
   </services>