incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject svn commit: r1456169 - in /incubator/ambari/trunk: CHANGES.txt ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/params.pp ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp
Date Wed, 13 Mar 2013 21:55:52 GMT
Author: swagle
Date: Wed Mar 13 21:55:51 2013
New Revision: 1456169

URL: http://svn.apache.org/r1456169
Log:
AMBARI-1625. Oozie start fails on secure cluster. (swagle)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/params.pp
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1456169&r1=1456168&r2=1456169&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed Mar 13 21:55:51 2013
@@ -458,6 +458,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1625. Oozie start fails on secure cluster. (swagle)
+
  AMBARI-1592. Fix configuration propagation.
 
  AMBARI-1619. Fix for category path separators.

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/params.pp?rev=1456169&r1=1456168&r2=1456169&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/params.pp
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/params.pp
Wed Mar 13 21:55:51 2013
@@ -47,6 +47,9 @@ class hdp-oozie::params() inherits hdp::
   
   ### oozie-site
   $keytab_path = hdp_default("keytab_path","/etc/security/keytabs")
+  $oozie_service_keytab = hdp_default("oozie.service.HadoopAccessorService.keytab.file",
"${keytab_path}/oozie.service.keytab")
+  $oozie_principal = hdp_default("oozie.service.HadoopAccessorService.kerberos.principal",
"oozie")
+
   if ($security_enabled == true) {
     $oozie_sasl_enabled = "true"
     $oozie_security_type = "kerberos"

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp?rev=1456169&r1=1456168&r2=1456169&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp
Wed Mar 13 21:55:51 2013
@@ -34,6 +34,16 @@ class hdp-oozie::service(
   $pid_file = "${hdp-oozie::params::oozie_pid_dir}/oozie.pid" 
   $jar_location = $hdp::params::hadoop_jar_location
   $ext_js_path = "/usr/share/HDP-oozie/ext.zip"
+
+  $security = $hdp::params::security_enabled
+  $oozie_keytab = $hdp-oozie::params::oozie_service_keytab
+  $oozie_principal = $hdp-oozie::params::oozie_principal
+
+  if ($security == true) {
+    $kinit_if_needed = "${hdp::params::kinit_path_local} -kt ${oozie_keytab} ${oozie_principal}"
+  } else {
+    $kinit_if_needed = "echo 0"
+  }
   
   if ($lzo_enabled == true) {
     $lzo_jar_suffix = "-jars /usr/lib/hadoop/lib/hadoop-lzo-0.5.0.jar"
@@ -46,7 +56,7 @@ class hdp-oozie::service(
   $cmd3 =  "cd /usr/lib/oozie && chown ${user}:${hdp::params::user_group} ${oozie_tmp}"
   
   $cmd4 =  "cd ${oozie_tmp} && /usr/lib/oozie/bin/oozie-setup.sh -hadoop 0.20.200
$jar_location -extjs $ext_js_path $lzo_jar_suffix"
   $cmd5 =  "cd ${oozie_tmp} && /usr/lib/oozie/bin/ooziedb.sh create -sqlfile oozie.sql
-run ; echo 0"
-  $cmd6 =  "su - ${user} -c 'hadoop dfs -put /usr/lib/oozie/share ${oozie_hdfs_user_dir}
; hadoop dfs -chmod -R 755 ${oozie_hdfs_user_dir}/share'"
+  $cmd6 =  "su - ${user} -c '${kinit_if_needed}; hadoop dfs -put /usr/lib/oozie/share ${oozie_hdfs_user_dir}
; hadoop dfs -chmod -R 755 ${oozie_hdfs_user_dir}/share'"
   #$cmd7 = "/usr/lib/oozie/bin/oozie-start.sh"
 
   if ($ensure == 'installed_and_configured') {
@@ -78,7 +88,7 @@ class hdp-oozie::service(
   } elsif ($ensure == 'running') {
     hdp::exec { "exec $cmd6" :
       command => $cmd6,
-      unless => "hadoop dfs -ls /user/oozie/share | awk 'BEGIN {count=0;} /share/ {count++}
END {if (count > 0) {exit 0} else {exit 1}}'"
+      unless => "${kinit_if_needed}; hadoop dfs -ls /user/oozie/share | awk 'BEGIN {count=0;}
/share/ {count++} END {if (count > 0) {exit 0} else {exit 1}}'"
     }
     hdp::exec { "exec $start_cmd":
       command => $start_cmd,



Mime
View raw message