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 130E21783D for ; Fri, 23 Jan 2015 00:53:19 +0000 (UTC) Received: (qmail 13173 invoked by uid 500); 23 Jan 2015 00:53:16 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 13144 invoked by uid 500); 23 Jan 2015 00:53:16 -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 13134 invoked by uid 99); 23 Jan 2015 00:53:16 -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; Fri, 23 Jan 2015 00:53:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C6E36E03A3; Fri, 23 Jan 2015 00:53:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yusaku@apache.org To: commits@ambari.apache.org Message-Id: <5bdad295d3584af78678cfe9df2c191f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-9288. Customizing smoke test user headless principal name causes HDFS service check failure and HiveServer2 start failure. (yusaku) Date: Fri, 23 Jan 2015 00:53:10 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 49b43d1d1 -> 9260d4ee5 AMBARI-9288. Customizing smoke test user headless principal name causes HDFS service check failure and HiveServer2 start failure. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9260d4ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9260d4ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9260d4ee Branch: refs/heads/trunk Commit: 9260d4ee530e660f6ffeae1f9632042873ed66bf Parents: 49b43d1 Author: Yusaku Sako Authored: Thu Jan 22 16:29:48 2015 -0800 Committer: Yusaku Sako Committed: Thu Jan 22 16:52:53 2015 -0800 ---------------------------------------------------------------------- .../common-services/HDFS/2.1.0.2.0/package/scripts/params.py | 3 ++- .../HDFS/2.1.0.2.0/package/scripts/service_check.py | 2 +- .../HIVE/0.12.0.2.0/package/scripts/hive_service.py | 2 +- .../src/test/python/stacks/2.0.6/HIVE/test_hive_server.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/9260d4ee/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py index eb315cc..4d120b1 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py @@ -149,6 +149,7 @@ webhcat_user = config['configurations']['hive-env']['hcat_user'] hcat_user = config['configurations']['hive-env']['hcat_user'] hive_user = config['configurations']['hive-env']['hive_user'] smoke_user = config['configurations']['cluster-env']['smokeuser'] +smokeuser_principal = config['configurations']['cluster-env']['smokeuser_principal_name'] mapred_user = config['configurations']['mapred-env']['mapred_user'] hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] @@ -307,4 +308,4 @@ if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0: if user_input.lower() == 'yes': enable_ranger_hdfs = True elif user_input.lower() == 'no': - enable_ranger_hdfs = False \ No newline at end of file + enable_ranger_hdfs = False http://git-wip-us.apache.org/repos/asf/ambari/blob/9260d4ee/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/service_check.py index 3dc3a1b..fc04c60 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/service_check.py @@ -41,7 +41,7 @@ class HdfsServiceCheck(Script): "{cleanup_cmd}; hadoop --config {hadoop_conf_dir} fs -put /etc/passwd {tmp_file}") test_cmd = format("fs -test -e {tmp_file}") if params.security_enabled: - Execute(format("{kinit_path_local} -kt {smoke_user_keytab} {smoke_user}"), + Execute(format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal}"), user=params.smoke_user ) ExecuteHadoop(safemode_command, http://git-wip-us.apache.org/repos/asf/ambari/blob/9260d4ee/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py index 56e968a..1ee9fc4 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py @@ -76,7 +76,7 @@ def hive_service(name, action='start', rolling_restart=False): is_service_socket_valid = False print "Waiting for the Hive server to start..." if params.security_enabled: - kinitcmd=format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser}; ") + kinitcmd=format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal}; ") else: kinitcmd=None while time.time() < end_time: http://git-wip-us.apache.org/repos/asf/ambari/blob/9260d4ee/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py index 6d211ff..249d2e6 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py @@ -140,7 +140,7 @@ class TestHiveServer(RMFTestCase): self.assertResourceCalled('Execute', '/usr/jdk64/jdk1.7.0_45/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.DBConnectionVerification \'jdbc:mysql://c6402.ambari.apache.org/hive?createDatabaseIfNotExist=true\' hive \'!`"\'"\'"\' 1\' com.mysql.jdbc.Driver', path=['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'], tries=5, try_sleep=10 ) - self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa; ', + self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa@EXAMPLE.COM; ', user = 'ambari-qa', ) self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6401.ambari.apache.org:10000/;principal=hive/_HOST@EXAMPLE.COM' -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'",