You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2013/02/27 21:48:11 UTC

svn commit: r1450953 - in /incubator/ambari/trunk: CHANGES.txt ambari-agent/src/main/puppet/modules/hdp-hive/manifests/hive/service_check.pp

Author: mahadev
Date: Wed Feb 27 20:48:10 2013
New Revision: 1450953

URL: http://svn.apache.org/r1450953
Log:
AMBARI-1498. Hive service check fails on secure HDP cluster. (Siddharth Wagle via mahadev)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hive/manifests/hive/service_check.pp

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1450953&r1=1450952&r2=1450953&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed Feb 27 20:48:10 2013
@@ -666,6 +666,9 @@ Trunk (unreleased changes):
  AMBARI-1497. Fix start up option for ambari-server where there is a missing
  space. (mahadev)
 
+ AMBARI-1498. Hive service check fails on secure HDP cluster. (Siddharth Wagle
+ via mahadev)
+
 AMBARI-1.2.0 branch:
 
  INCOMPATIBLE CHANGES

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hive/manifests/hive/service_check.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hive/manifests/hive/service_check.pp?rev=1450953&r1=1450952&r2=1450953&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hive/manifests/hive/service_check.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hive/manifests/hive/service_check.pp Wed Feb 27 20:48:10 2013
@@ -23,10 +23,20 @@ class hdp-hive::hive::service_check() in
   $smoke_test_user = $hdp::params::smokeuser
   $smoke_test_sql = "/tmp/$smoke_test_sql_file"
   $smoke_test_path = "/tmp/$smoke_test_script"
+  $security_enabled = $hdp::params::security_enabled
+  $smoke_user_keytab = "${hdp-hive::params::keytab_path}/${smoke_test_user}.headless.keytab"
 
+  if ($security_enabled == true) {
+    $kinit_cmd = "${hdp::params::kinit_path_local} -kt ${smoke_user_keytab} ${smoke_test_user};"
+    $hive_principal_ext = "principal=${hive_user}/_HOST@${hdp::params::kerberos_domain}"
+    $hive_url_ext = "${hive_url}\;${hive_principal_ext}"
+  } else {
+    $kinit_cmd = ""
+    $hive_principal_ext = ""
+    $hive_url_ext = $hive_url
+  }
 
-  $smoke_cmd = "env JAVA_HOME=$hdp::params::java64_home $smoke_test_path $hive_url $smoke_test_sql"
-
+  $smoke_cmd = "${kinit_cmd} env JAVA_HOME=${hdp::params::java64_home} ${smoke_test_path} ${hive_url_ext} ${smoke_test_sql}"
 
   file { $smoke_test_path:
     ensure => present,