ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: AMBARI-8172. Knox Gateway failed to start when Knox service account name was customized. (Sumit Gupta via yusaku)
Date Sat, 08 Nov 2014 02:02:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f9532293b -> ae2cd3d7a


AMBARI-8172. Knox Gateway failed to start when Knox service account name was customized. (Sumit
Gupta via yusaku)


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

Branch: refs/heads/trunk
Commit: ae2cd3d7aed505e5aaeb38ca087f3c6dbb4b7774
Parents: f953229
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Fri Nov 7 18:01:13 2014 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Fri Nov 7 18:02:16 2014 -0800

----------------------------------------------------------------------
 .../stacks/HDP/2.2/services/KNOX/package/scripts/knox.py          | 3 +++
 .../stacks/HDP/2.2/services/KNOX/package/scripts/params.py        | 3 +++
 .../src/test/python/stacks/2.2/KNOX/test_knox_gateway.py          | 2 ++
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ae2cd3d7/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/knox.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/knox.py
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/knox.py
index 2061db1..627462a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/knox.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/knox.py
@@ -55,6 +55,8 @@ def knox():
                       owner = params.knox_user,
                       template_tag = None
       )
+    cmd = format('chown -R {knox_user}:{knox_group} {knox_data_dir} {knox_logs_dir} {knox_pid_dir}
{knox_conf_dir}')
+    Execute(cmd)
 
     cmd = format('{knox_client_bin} create-master --master {knox_master_secret!p}')
     Execute(cmd,
@@ -69,3 +71,4 @@ def knox():
             environment={'JAVA_HOME': params.java_home},
             not_if=format('test -f {knox_cert_store_path}')
     )
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae2cd3d7/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py
index e11f287..326d678 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py
@@ -110,6 +110,9 @@ if has_oozie:
 
 # server configurations
 knox_conf_dir = '/etc/knox/conf'
+knox_data_dir = '/var/lib/knox/data'
+knox_logs_dir = '/var/log/knox'
+knox_pid_dir = status_params.knox_pid_dir
 knox_user = default("/configurations/knox-env/knox_user", "knox")
 knox_group = default("/configurations/knox-env/knox_group", "knox")
 knox_pid_file = status_params.knox_pid_file

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae2cd3d7/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
index 2c06f83..f9c6897 100644
--- a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
+++ b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
@@ -53,6 +53,8 @@ class TestKnoxGateway(RMFTestCase):
                               owner = 'knox',
                               content = InlineTemplate(self.getConfig()['configurations']['topology']['content'])
     )
+    self.assertResourceCalled('Execute', 'chown -R knox:knox /var/lib/knox/data /var/log/knox
/var/run/knox /etc/knox/conf'
+    )
     self.assertResourceCalled('Execute', '/usr/lib/knox/bin/knoxcli.sh create-master --master
sa',
                               user='knox',
                               environment={'JAVA_HOME': '/usr/jdk64/jdk1.7.0_45'},


Mime
View raw message