ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject ambari git commit: AMBARI-9556. Knox installation does not create correct gateway-identity cert (Sumit Gupta via srimanth)
Date Tue, 17 Feb 2015 21:07:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b27c266aa -> bed8260b3


AMBARI-9556. Knox installation does not create correct gateway-identity cert (Sumit Gupta
via srimanth)


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

Branch: refs/heads/trunk
Commit: bed8260b354962b060b4312ea7ba3a5a1aea3e0a
Parents: b27c266
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Tue Feb 17 13:06:44 2015 -0800
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Tue Feb 17 13:06:44 2015 -0800

----------------------------------------------------------------------
 .../common-services/KNOX/0.5.0.2.2/package/scripts/knox.py     | 6 ++++--
 .../src/test/python/stacks/2.2/KNOX/test_knox_gateway.py       | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bed8260b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py
index 7f341c5..108ebb2 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py
@@ -106,7 +106,7 @@ def knox():
 
     cmd = format('{knox_client_bin} create-master --master {knox_master_secret!p}')
     master_secret_exist = as_user(format('test -f {knox_master_secret_path}'), params.knox_user)
-    
+
     Execute(cmd,
             user=params.knox_user,
             environment={'JAVA_HOME': params.java_home},
@@ -114,9 +114,11 @@ def knox():
     )
 
     cmd = format('{knox_client_bin} create-cert --hostname {knox_host_name_in_cluster}')
+    cert_store_exist = as_user(format('test -f {knox_cert_store_path}'), params.knox_user)
+
     Execute(cmd,
             user=params.knox_user,
             environment={'JAVA_HOME': params.java_home},
-            not_if=master_secret_exist,
+            not_if=cert_store_exist,
     )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed8260b/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 3d0ca6e..bc16c01 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
@@ -76,7 +76,7 @@ class TestKnoxGateway(RMFTestCase):
     )
     self.assertResourceCalled('Execute', '/usr/lib/knox/bin/knoxcli.sh create-cert --hostname
c6401.ambari.apache.org',
         environment = {'JAVA_HOME': u'/usr/jdk64/jdk1.7.0_45'},
-        not_if = "/usr/bin/sudo su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test
-f /var/lib/knox/data/security/master'",
+        not_if = "/usr/bin/sudo su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test
-f /var/lib/knox/data/security/keystores/gateway.jks'",
         user = 'knox',
     )
     self.assertResourceCalled('File', '/etc/knox/conf/ldap-log4j.properties',


Mime
View raw message