You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2018/05/15 14:28:11 UTC

[ambari] branch trunk updated: [AMBARI-23833] viewFS : Blueprint deployed clusters doesn't have xml include content in core-site.xml (#1256)

This is an automated email from the ASF dual-hosted git repository.

dsen pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 95e86e1  [AMBARI-23833] viewFS : Blueprint deployed clusters doesn't have xml include content in core-site.xml (#1256)
95e86e1 is described below

commit 95e86e1c3e7cb34a5a2e8dce39f3b6715381bdd0
Author: Dmitry Sen <ds...@apache.org>
AuthorDate: Tue May 15 17:28:08 2018 +0300

    [AMBARI-23833] viewFS : Blueprint deployed clusters doesn't have xml include content in core-site.xml (#1256)
---
 .../libraries/functions/setup_ranger_plugin_xml.py        | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
index d463f6f..af53714 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
@@ -223,16 +223,27 @@ def setup_ranger_plugin_keystore(service_name, audit_db_is_enabled, stack_versio
     mode = 0640
   )
 
-def setup_configuration_file_for_required_plugins(component_user, component_group, create_core_site_path, configurations = {}, configuration_attributes = {}, file_name='core-site.xml'):
+def setup_configuration_file_for_required_plugins(component_user, component_group, create_core_site_path,
+                                                  configurations={}, configuration_attributes={}, file_name='core-site.xml',
+                                                  xml_include_file=None, xml_include_file_content=None):
   XmlConfig(file_name,
     conf_dir = create_core_site_path,
     configurations = configurations,
     configuration_attributes = configuration_attributes,
     owner = component_user,
     group = component_group,
-    mode = 0644
+    mode = 0644,
+    xml_include_file = xml_include_file
   )
 
+  if xml_include_file_content:
+    File(xml_include_file,
+         owner=component_user,
+         group=component_group,
+         content=xml_include_file_content
+         )
+
+
 def get_audit_configs(config):
   xa_audit_db_flavor = config['configurations']['admin-properties']['DB_FLAVOR'].lower()
   xa_db_host = config['configurations']['admin-properties']['db_host']

-- 
To stop receiving notification emails like this one, please contact
dsen@apache.org.