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

2017-07-31 Thread jonathanhurley
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/d4fad25e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4fad25e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4fad25e

Branch: refs/heads/branch-feature-AMBARI-21450
Commit: d4fad25e0c1d768fd2073a75259246d1be2c4bf9
Parents: 0f426c1
Author: Sumit Mohanty 
Authored: Thu Jul 27 13:14:41 2017 -0700
Committer: Sumit Mohanty 
Committed: Thu Jul 27 13:15:20 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   |  1 +
 .../stacks/HDP/2.0.6/properties/stack_features.json |  5 +
 .../stacks/HDP/2.6/services/ATLAS/metainfo.xml  |  1 +
 5 files changed, 24 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4fad25e/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/d4fad25e/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 36c4598..6b5f562 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/d4fad25e/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 b83a79f..41be001 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
@@ -237,6 +237,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)


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

2017-07-31 Thread jonathanhurley
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/d4fad25e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4fad25e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4fad25e

Branch: refs/heads/branch-2.6
Commit: d4fad25e0c1d768fd2073a75259246d1be2c4bf9
Parents: 0f426c1
Author: Sumit Mohanty 
Authored: Thu Jul 27 13:14:41 2017 -0700
Committer: Sumit Mohanty 
Committed: Thu Jul 27 13:15:20 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   |  1 +
 .../stacks/HDP/2.0.6/properties/stack_features.json |  5 +
 .../stacks/HDP/2.6/services/ATLAS/metainfo.xml  |  1 +
 5 files changed, 24 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4fad25e/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/d4fad25e/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 36c4598..6b5f562 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/d4fad25e/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 b83a79f..41be001 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
@@ -237,6 +237,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)


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

2017-07-27 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 0f426c16c -> d4fad25e0


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/d4fad25e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4fad25e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4fad25e

Branch: refs/heads/branch-2.5
Commit: d4fad25e0c1d768fd2073a75259246d1be2c4bf9
Parents: 0f426c1
Author: Sumit Mohanty 
Authored: Thu Jul 27 13:14:41 2017 -0700
Committer: Sumit Mohanty 
Committed: Thu Jul 27 13:15:20 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   |  1 +
 .../stacks/HDP/2.0.6/properties/stack_features.json |  5 +
 .../stacks/HDP/2.6/services/ATLAS/metainfo.xml  |  1 +
 5 files changed, 24 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4fad25e/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/d4fad25e/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 36c4598..6b5f562 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/d4fad25e/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 b83a79f..41be001 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
@@ -237,6 +237,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)


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

2017-07-27 Thread 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 
Authored: Thu Jul 27 13:14:41 2017 -0700
Committer: Sumit Mohanty 
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)