AMBARI-17942. Update config dependencies for Ranger KMS [for Delete service action](gautam)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c6edc40f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c6edc40f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c6edc40f Branch: refs/heads/branch-2.4 Commit: c6edc40f12cb35ad1a09aa2a576a35d7f4ca10ba Parents: 7546cc2 Author: Gautam Borad <[email protected]> Authored: Thu Jul 28 11:51:06 2016 +0530 Committer: Gautam Borad <[email protected]> Committed: Thu Jul 28 20:46:12 2016 +0530 ---------------------------------------------------------------------- .../main/resources/stacks/HDP/2.2/services/stack_advisor.py | 6 ++++++ .../src/test/python/stacks/2.2/common/test_stack_advisor.py | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/c6edc40f/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py index 1be471c..b01af59 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py @@ -285,6 +285,12 @@ class HDP22StackAdvisor(HDP21StackAdvisor): rangerEnvHdfsPluginProperty = services["configurations"]["ranger-env"]["properties"]["ranger-hdfs-plugin-enabled"] putHdfsRangerPluginProperty("ranger-hdfs-plugin-enabled", rangerEnvHdfsPluginProperty) + putHdfsSitePropertyAttribute = self.putPropertyAttribute(configurations, "hdfs-site") + putCoreSitePropertyAttribute = self.putPropertyAttribute(configurations, "core-site") + if not "RANGER_KMS" in servicesList: + putCoreSitePropertyAttribute('hadoop.security.key.provider.path','delete','true') + putHdfsSitePropertyAttribute('dfs.encryption.key.provider.uri','delete','true') + def recommendHIVEConfigurations(self, configurations, clusterData, services, hosts): super(HDP22StackAdvisor, self).recommendHiveConfigurations(configurations, clusterData, services, hosts) http://git-wip-us.apache.org/repos/asf/ambari/blob/c6edc40f/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py index a3e0e16..658d818 100644 --- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py @@ -3045,7 +3045,8 @@ class TestHDP22StackAdvisor(TestCase): 'dfs.datanode.data.dir': '/path/1,/path/2,/path/3,/path/4' }, 'property_attributes': { - 'dfs.datanode.failed.volumes.tolerated': {'maximum': '4'} + 'dfs.datanode.failed.volumes.tolerated': {'maximum': '4'}, + 'dfs.encryption.key.provider.uri': {'delete': 'true'} } }, 'ranger-hdfs-plugin-properties': { @@ -3059,6 +3060,9 @@ class TestHDP22StackAdvisor(TestCase): "hadoop.proxyuser.hdfs.groups": "*", "hadoop.proxyuser.ambari_user.hosts": ambariHostName, "hadoop.proxyuser.ambari_user.groups": "*" + }, + 'property_attributes': { + 'hadoop.security.key.provider.path': {'delete': 'true'} } } }
