Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CD64A200BD0 for ; Wed, 30 Nov 2016 21:52:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CBF5E160B06; Wed, 30 Nov 2016 20:52:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1E860160B13 for ; Wed, 30 Nov 2016 21:52:00 +0100 (CET) Received: (qmail 94692 invoked by uid 500); 30 Nov 2016 20:52:00 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 94668 invoked by uid 99); 30 Nov 2016 20:52:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2016 20:52:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0E095DFCF9; Wed, 30 Nov 2016 20:52:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smohanty@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-18994. In HA cluster copy the hdfs-site.xml and hbase-site.xml to Ranger conf directory (Mugdha Varadkar via smohanty) Date: Wed, 30 Nov 2016 20:52:00 +0000 (UTC) archived-at: Wed, 30 Nov 2016 20:52:02 -0000 Repository: ambari Updated Branches: refs/heads/branch-2.5 7632917d5 -> 037ed6326 AMBARI-18994. In HA cluster copy the hdfs-site.xml and hbase-site.xml to Ranger conf directory (Mugdha Varadkar via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/037ed632 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/037ed632 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/037ed632 Branch: refs/heads/branch-2.5 Commit: 037ed63264c21d723bbba6b0acd3724f0eed687b Parents: 7632917 Author: Sumit Mohanty Authored: Wed Nov 30 12:51:46 2016 -0800 Committer: Sumit Mohanty Committed: Wed Nov 30 12:51:46 2016 -0800 ---------------------------------------------------------------------- .../RANGER/0.4.0/package/scripts/params.py | 14 +++++++++++++ .../0.4.0/package/scripts/setup_ranger_xml.py | 21 ++++++++++++++++++++ .../common-services/RANGER/0.6.0/metainfo.xml | 2 ++ 3 files changed, 37 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/037ed632/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py index 6debaf1..e27b363 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py @@ -385,3 +385,17 @@ if audit_solr_enabled and is_solrCloud_enabled: # Check external solrCloud if is_external_solrCloud_enabled and is_external_solrCloud_kerberos: ranger_is_solr_kerberised = "true" + +hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", []) +is_hbase_ha_enabled = True if len(hbase_master_hosts) > 1 else False +is_namenode_ha_enabled = True if len(namenode_hosts) > 1 else False +ranger_hbase_plugin_enabled = False +ranger_hdfs_plugin_enabled = False + + +if is_hbase_ha_enabled: + if not is_empty(config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled']): + ranger_hbase_plugin_enabled = config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled'].lower() == 'yes' +if is_namenode_ha_enabled: + if not is_empty(config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled']): + ranger_hdfs_plugin_enabled = config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled'].lower() == 'yes' \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/037ed632/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py index f1b4797..6386778 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py +++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py @@ -198,6 +198,27 @@ def setup_ranger_admin(upgrade_type=None): create_core_site_xml(ranger_conf) + if params.stack_supports_ranger_kerberos and params.security_enabled: + if params.is_hbase_ha_enabled and params.ranger_hbase_plugin_enabled: + XmlConfig("hbase-site.xml", + conf_dir=ranger_conf, + configurations=params.config['configurations']['hbase-site'], + configuration_attributes=params.config['configuration_attributes']['hbase-site'], + owner=params.unix_user, + group=params.unix_group, + mode=0644 + ) + + if params.is_namenode_ha_enabled and params.ranger_hdfs_plugin_enabled: + XmlConfig("hdfs-site.xml", + conf_dir=ranger_conf, + configurations=params.config['configurations']['hdfs-site'], + configuration_attributes=params.config['configuration_attributes']['hdfs-site'], + owner=params.unix_user, + group=params.unix_group, + mode=0644 + ) + def setup_ranger_db(stack_version=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/037ed632/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml index f330bc9..12fde7e 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml @@ -110,6 +110,8 @@ admin-log4j usersync-log4j + ranger-hdfs-plugin-properties + ranger-hbase-plugin-properties