ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [42/50] [abbrv] ambari git commit: AMBARI-18870 Ranger PID file not being read if a custom location is provided (mugdha)
Date Thu, 17 Nov 2016 17:13:58 GMT
AMBARI-18870 Ranger PID file not being read if a custom location is provided (mugdha)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 07bdabdd021caa86e863b7b1ecf8543542ecf62e
Parents: 33d8c56
Author: Mugdha Varadkar <mugdha@apache.org>
Authored: Mon Nov 14 11:10:18 2016 +0530
Committer: Mugdha Varadkar <mugdha@apache.org>
Committed: Thu Nov 17 11:05:29 2016 +0530

----------------------------------------------------------------------
 .../0.4.0/package/scripts/setup_ranger_xml.py   | 24 ++++++++++++++++++++
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py |  8 +++++++
 .../stacks/2.5/RANGER/test_ranger_admin.py      | 14 ++++++++++++
 .../stacks/2.5/RANGER/test_ranger_tagsync.py    |  7 ++++++
 .../stacks/2.5/RANGER/test_ranger_usersync.py   |  7 ++++++
 .../stacks/2.5/RANGER_KMS/test_kms_server.py    | 14 ++++++++++++
 6 files changed, 74 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/07bdabdd/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 6462495..f1b4797 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
@@ -119,6 +119,14 @@ def setup_ranger_admin(upgrade_type=None):
     create_parents=True
   )
 
+  if params.stack_supports_pid:
+    File(format('{ranger_conf}/ranger-admin-env-piddir.sh'),
+      content = format("export RANGER_PID_DIR_PATH={ranger_pid_dir}\nexport RANGER_USER={unix_user}"),
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode=0755
+    )
+
   Directory(params.admin_log_dir,
     owner = params.unix_user,
     group = params.unix_group,
@@ -360,6 +368,14 @@ def setup_usersync(upgrade_type=None):
     create_parents=True
   )
 
+  if params.stack_supports_pid:
+    File(format('{ranger_ugsync_conf}/ranger-usersync-env-piddir.sh'),
+      content = format("export USERSYNC_PID_DIR_PATH={ranger_pid_dir}\nexport UNIX_USERSYNC_USER={unix_user}"),
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode=0755
+    )
+
   Directory(params.usersync_log_dir,
     owner = params.unix_user,
     group = params.unix_group,
@@ -475,6 +491,14 @@ def setup_tagsync(upgrade_type=None):
     cd_access = "a",
   )
 
+  if params.stack_supports_pid:
+    File(format('{ranger_tagsync_conf}/ranger-tagsync-env-piddir.sh'),
+      content = format("export TAGSYNC_PID_DIR_PATH={ranger_pid_dir}\nexport UNIX_TAGSYNC_USER={unix_user}"),
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode=0755
+    )
+
   Directory(params.tagsync_log_dir,
     create_parents = True,
     owner = params.unix_user,

http://git-wip-us.apache.org/repos/asf/ambari/blob/07bdabdd/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 0a8c7d3..7fb8ba6 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
@@ -216,6 +216,14 @@ def kms(upgrade_type=None):
       create_parents=True
     )
 
+    if params.stack_supports_pid:
+      File(format('{kms_conf_dir}/ranger-kms-env-piddir.sh'),
+        content = format("export RANGER_KMS_PID_DIR_PATH={ranger_kms_pid_dir}\nexport KMS_USER={kms_user}"),
+        owner = params.kms_user,
+        group = params.kms_group,
+        mode=0755
+      )
+
     Directory(params.kms_log_dir,
       owner = params.kms_user,
       group = params.kms_group,

http://git-wip-us.apache.org/repos/asf/ambari/blob/07bdabdd/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_admin.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_admin.py b/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_admin.py
index 10db1c8..8e8e68b 100644
--- a/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_admin.py
+++ b/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_admin.py
@@ -244,6 +244,13 @@ class TestRangerAdmin(RMFTestCase):
       create_parents=True
     )
 
+    self.assertResourceCalled('File', '/usr/hdp/current/ranger-admin/conf/ranger-admin-env-piddir.sh',
+      content = 'export RANGER_PID_DIR_PATH=/var/run/ranger\nexport RANGER_USER=ranger',
+      owner = 'ranger',
+      group = 'ranger',
+      mode = 0755
+    )
+
     self.assertResourceCalled('Directory', '/var/log/ranger/admin',
       owner='ranger',
       group='ranger',
@@ -387,6 +394,13 @@ class TestRangerAdmin(RMFTestCase):
       create_parents=True
     )
 
+    self.assertResourceCalled('File', '/usr/hdp/current/ranger-admin/conf/ranger-admin-env-piddir.sh',
+      content = 'export RANGER_PID_DIR_PATH=/var/run/ranger\nexport RANGER_USER=ranger',
+      owner = 'ranger',
+      group = 'ranger',
+      mode = 0755
+    )
+
     self.assertResourceCalled('Directory', '/var/log/ranger/admin',
       owner='ranger',
       group='ranger',

http://git-wip-us.apache.org/repos/asf/ambari/blob/07bdabdd/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_tagsync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_tagsync.py b/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_tagsync.py
index 33a4c87..f5e55b3 100644
--- a/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_tagsync.py
+++ b/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_tagsync.py
@@ -98,6 +98,13 @@ class TestRangerTagsync(RMFTestCase):
       create_parents=True
     )
 
+    self.assertResourceCalled('File', '/usr/hdp/current/ranger-tagsync/conf/ranger-tagsync-env-piddir.sh',
+      content = 'export TAGSYNC_PID_DIR_PATH=/var/run/ranger\nexport UNIX_TAGSYNC_USER=ranger',
+      owner = 'ranger',
+      group = 'ranger',
+      mode = 0755
+    )
+
     self.assertResourceCalled('Directory', '/var/log/ranger/tagsync',
       owner = 'ranger',
       group = 'ranger',

http://git-wip-us.apache.org/repos/asf/ambari/blob/07bdabdd/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_usersync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_usersync.py b/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_usersync.py
index ca510d6..36fa15b 100644
--- a/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_usersync.py
+++ b/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_usersync.py
@@ -98,6 +98,13 @@ class TestRangerUsersync(RMFTestCase):
       create_parents=True
     )
 
+    self.assertResourceCalled('File', '/usr/hdp/current/ranger-usersync/conf/ranger-usersync-env-piddir.sh',
+      content = 'export USERSYNC_PID_DIR_PATH=/var/run/ranger\nexport UNIX_USERSYNC_USER=ranger',
+      owner = 'ranger',
+      group = 'ranger',
+      mode = 0755
+    )
+
     self.assertResourceCalled('Directory', '/var/log/ranger/usersync',
       owner='ranger',
       group='ranger',

http://git-wip-us.apache.org/repos/asf/ambari/blob/07bdabdd/ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py b/ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py
index 70e3d42..3d79e0a 100644
--- a/ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py
+++ b/ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py
@@ -267,6 +267,13 @@ class TestRangerKMS(RMFTestCase):
       create_parents=True
     )
 
+    self.assertResourceCalled('File', '/usr/hdp/current/ranger-kms/conf/ranger-kms-env-piddir.sh',
+      content = 'export RANGER_KMS_PID_DIR_PATH=/var/run/ranger_kms\nexport KMS_USER=kms',
+      owner = 'kms',
+      group = 'kms',
+      mode = 0755
+    )
+
     self.assertResourceCalled('Directory', '/var/log/ranger/kms',
       owner = 'kms',
       group = 'kms',
@@ -592,6 +599,13 @@ class TestRangerKMS(RMFTestCase):
       create_parents=True
     )
 
+    self.assertResourceCalled('File', '/usr/hdp/current/ranger-kms/conf/ranger-kms-env-piddir.sh',
+      content = 'export RANGER_KMS_PID_DIR_PATH=/var/run/ranger_kms\nexport KMS_USER=kms',
+      owner = 'kms',
+      group = 'kms',
+      mode = 0755
+    )
+
     self.assertResourceCalled('Directory', '/var/log/ranger/kms',
       owner = 'kms',
       group = 'kms',


Mime
View raw message