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-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 GMT
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 <yusaku@hortonworks.com>
Authored: Thu Jan 22 16:29:48 2015 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
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'",


Mime
View raw message