ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [2/8] ambari git commit: AMBARI-18461: NiFi CA Config Files printed to ambari log (jluniya)
Date Mon, 26 Sep 2016 13:05:21 GMT
AMBARI-18461: NiFi CA Config Files printed to ambari log (jluniya)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 1fee5ed34c6c41c40b550b5961e8b37aef0599d1
Parents: 7cc1ac8
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Fri Sep 23 19:56:53 2016 -0700
Committer: Jayush Luniya <jluniya@hortonworks.com>
Committed: Fri Sep 23 19:56:53 2016 -0700

----------------------------------------------------------------------
 .../common-services/NIFI/1.0.0/package/scripts/nifi.py         | 6 +-----
 .../common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py | 5 +++--
 2 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1fee5ed3/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py
----------------------------------------------------------------------
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py
b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py
index 362a40b..6936dce 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py
@@ -75,17 +75,13 @@ class Master(Script):
          content=Template("nifi.conf.j2")
     )
 
-    
+
     ca_client_script = nifi_ca_util.get_toolkit_script('tls-toolkit.sh')
     File(ca_client_script, mode=0755)
 
 
     if params.nifi_ca_host and params.nifi_ssl_enabled:
       ca_client_json = os.path.realpath(os.path.join(params.nifi_config_dir, 'nifi-certificate-authority-client.json'))
-      File(ca_client_json,
-           owner = params.nifi_user,
-           group = params.nifi_group,
-           mode = 0600)
       ca_client_dict = nifi_ca_util.load(ca_client_json)
       if is_starting:
         if params.nifi_toolkit_tls_regenerate:

http://git-wip-us.apache.org/repos/asf/ambari/blob/1fee5ed3/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py
----------------------------------------------------------------------
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py
b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py
index 6807491..20ef81c 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py
@@ -21,6 +21,7 @@ limitations under the License.
 import json, nifi_constants, os
 from resource_management.core import sudo
 from resource_management.core.resources.system import File
+from resource_management.core.utils import PasswordString
 
 script_dir = os.path.dirname(__file__)
 files_dir = os.path.realpath(os.path.join(os.path.dirname(script_dir), 'files'))
@@ -38,8 +39,8 @@ def dump(config_json, config_dict):
     owner=params.nifi_user,
     group=params.nifi_group,
     mode=0600,
-    content=json.dumps(config_dict, sort_keys=True, indent=4)
-  ) 
+    content=PasswordString(json.dumps(config_dict, sort_keys=True, indent=4))
+  )
 
 def overlay(config_dict, overlay_dict):
   for k, v in overlay_dict.iteritems():


Mime
View raw message