You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/08/06 04:28:11 UTC
ambari git commit: AMBARI-12630. Handle Ranger KMS install for umask
027 (Gautam Borad via alejandro)
Repository: ambari
Updated Branches:
refs/heads/trunk 209b61b60 -> daf8ed5d3
AMBARI-12630. Handle Ranger KMS install for umask 027 (Gautam Borad via alejandro)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/daf8ed5d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/daf8ed5d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/daf8ed5d
Branch: refs/heads/trunk
Commit: daf8ed5d33dfabcf904971129d5bb38fbbf89a88
Parents: 209b61b
Author: Alejandro Fernandez <af...@hortonworks.com>
Authored: Wed Aug 5 19:27:36 2015 -0700
Committer: Alejandro Fernandez <af...@hortonworks.com>
Committed: Wed Aug 5 19:27:40 2015 -0700
----------------------------------------------------------------------
.../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py | 45 ++++++++++++--------
1 file changed, 27 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/daf8ed5d/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
index 5cdb1ec..8f8be17 100755
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
@@ -41,26 +41,29 @@ def setup_kms_db():
if params.has_ranger_admin:
File(params.downloaded_custom_connector,
- content = DownloadSource(params.driver_curl_source)
+ content = DownloadSource(params.driver_curl_source),
+ mode = 0644
)
Directory(params.java_share_dir,
mode=0755
)
+
+ Execute(('cp', '--remove-destination', params.downloaded_custom_connector, params.driver_curl_target),
+ path=["/bin", "/usr/bin/"],
+ sudo=True)
- if not os.path.isfile(params.driver_curl_target):
- Execute(('cp', '--remove-destination', params.downloaded_custom_connector, params.driver_curl_target),
- path=["/bin", "/usr/bin/"],
- sudo=True)
+ File(params.driver_curl_target, mode=0644)
Directory(os.path.join(params.kms_home, 'ews', 'lib'),
mode=0755
)
+
+ Execute(('cp', '--remove-destination', params.downloaded_custom_connector, os.path.join(params.kms_home, 'ews', 'webapp', 'lib')),
+ path=["/bin", "/usr/bin/"],
+ sudo=True)
- if not os.path.isfile(os.path.join(params.kms_home, 'ews', 'webapp', 'lib', params.jdbc_jar_name)):
- Execute(('cp', '--remove-destination', params.downloaded_custom_connector, os.path.join(params.kms_home, 'ews', 'webapp', 'lib')),
- path=["/bin", "/usr/bin/"],
- sudo=True)
+ File(os.path.join(params.kms_home, 'ews', 'webapp', 'lib', params.jdbc_jar_name), mode=0644)
ModifyPropertiesFile(format("/usr/hdp/current/ranger-kms/install.properties"),
properties = params.config['configurations']['kms-properties']
@@ -118,13 +121,15 @@ def kms():
if params.has_ranger_admin:
File(params.downloaded_connector_path,
- content = DownloadSource(params.driver_source)
+ content = DownloadSource(params.driver_source),
+ mode = 0644
)
- if not os.path.isfile(params.driver_target):
- Execute(('cp', '--remove-destination', params.downloaded_connector_path, params.driver_target),
- path=["/bin", "/usr/bin/"],
- sudo=True)
+ Execute(('cp', '--remove-destination', params.downloaded_connector_path, params.driver_target),
+ path=["/bin", "/usr/bin/"],
+ sudo=True)
+
+ File(params.driver_target, mode=0644)
Directory(os.path.join(params.kms_home, 'ews', 'webapp', 'WEB-INF', 'classes', 'lib'),
mode=0755,
@@ -178,7 +183,8 @@ def kms():
configurations=params.config['configurations']['dbks-site'],
configuration_attributes=params.config['configuration_attributes']['dbks-site'],
owner=params.kms_user,
- group=params.kms_group
+ group=params.kms_group,
+ mode=0644
)
XmlConfig("ranger-kms-site.xml",
@@ -186,7 +192,8 @@ def kms():
configurations=params.config['configurations']['ranger-kms-site'],
configuration_attributes=params.config['configuration_attributes']['ranger-kms-site'],
owner=params.kms_user,
- group=params.kms_group
+ group=params.kms_group,
+ mode=0644
)
XmlConfig("kms-site.xml",
@@ -194,13 +201,15 @@ def kms():
configurations=params.config['configurations']['kms-site'],
configuration_attributes=params.config['configuration_attributes']['kms-site'],
owner=params.kms_user,
- group=params.kms_group
+ group=params.kms_group,
+ mode=0644
)
File(os.path.join(params.kms_conf_dir, "kms-log4j.properties"),
owner=params.kms_user,
group=params.kms_group,
- content=params.kms_log4j
+ content=params.kms_log4j,
+ mode=0644
)
def enable_kms_plugin():