Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A5001035C for ; Tue, 17 Feb 2015 21:07:19 +0000 (UTC) Received: (qmail 35544 invoked by uid 500); 17 Feb 2015 21:07:19 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 35512 invoked by uid 500); 17 Feb 2015 21:07:19 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 35503 invoked by uid 99); 17 Feb 2015 21:07:19 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Feb 2015 21:07:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 47CBCE0779; Tue, 17 Feb 2015 21:07:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: srimanth@apache.org To: commits@ambari.apache.org Message-Id: <2d328ab74c2345d9bc5e214223ea69c9@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Tue Feb 17 13:06:44 2015 -0800 Committer: Srimanth Gunturi 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',