Explorar o código

AMBARI-3058: Enable Security wizard: oozie smoke test fails with HDP-1.x stack. (jaimin)

Jaimin Jetly %!s(int64=11) %!d(string=hai) anos
pai
achega
205bd5695a

+ 1 - 6
ambari-agent/src/main/puppet/modules/hdp-oozie/files/oozieSmoke.sh

@@ -58,10 +58,7 @@ export hadoop_conf_dir=$2
 export smoke_test_user=$3
 export security_enabled=$4
 export smoke_user_keytab=$5
-export realm=$6
-export JTPRINC=$7
-export NNPRINC=$8
-export kinit_path_local=$9
+export kinit_path_local=$6
 
 export OOZIE_EXIT_CODE=0
 export JOBTRACKER=`getValueFromField ${hadoop_conf_dir}/mapred-site.xml mapred.job.tracker`
@@ -79,8 +76,6 @@ sed -i "s|oozie.wf.application.path=hdfs://localhost:9000|oozie.wf.application.p
 
 if [[ $security_enabled == "true" ]]; then
   kinitcmd="${kinit_path_local} -kt ${smoke_user_keytab} ${smoke_test_user}; "
-  echo "dfs.namenode.kerberos.principal=${NNPRINC}" >> examples/apps/map-reduce/job.properties
-  echo "mapreduce.jobtracker.kerberos.principal=${JTPRINC}" >> examples/apps/map-reduce/job.properties
 else 
   kinitcmd=""
 fi

+ 1 - 5
ambari-agent/src/main/puppet/modules/hdp-oozie/files/oozieSmoke2.sh

@@ -58,9 +58,7 @@ export hadoop_conf_dir=$2
 export smoke_test_user=$3
 export security_enabled=$4
 export smoke_user_keytab=$5
-export realm=$6
-export JTHOST=$7
-export NNHOST=$8
+export kinit_path_local=$6
 
 export OOZIE_EXIT_CODE=0
 export JOBTRACKER=`getValueFromField ${hadoop_conf_dir}/yarn-site.xml yarn.resourcemanager.address`
@@ -79,8 +77,6 @@ sed -i "s|oozie.wf.application.path=hdfs://localhost:9000|oozie.wf.application.p
 
 if [[ $security_enabled == "true" ]]; then
   kinitcmd="${kinit_path_local} -kt ${smoke_user_keytab} ${smoke_test_user}; "
-  echo "dfs.namenode.kerberos.principal=nn/`echo ${NNHOST} | tr '[:upper:]' '[:lower:]'`@${realm}" >> examples/apps/map-reduce/job.properties
-  echo "mapreduce.jobtracker.kerberos.principal=jt/`echo ${JTHOST} | tr '[:upper:]' '[:lower:]'`@${realm}" >> examples/apps/map-reduce/job.properties
 else 
   kinitcmd=""
 fi

+ 2 - 3
ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/oozie/service_check.pp

@@ -47,8 +47,7 @@ define hdp-oozie::smoke_shell_file(
   $conf_dir = $hdp::params::oozie_conf_dir
   $hadoopconf_dir = $hdp::params::hadoop_conf_dir 
   $security_enabled=$hdp::params::security_enabled
-  $jt_host=$hdp::params::jtnode_host
-  $nn_host=$hdp::params::namenode_host
+  $kinit_path_local = $hdp::params::kinit_path_local
   if ($security_enabled == true) {
     $security = "true"
   } else {
@@ -64,7 +63,7 @@ define hdp-oozie::smoke_shell_file(
   }
 
   exec { "/tmp/${smoke_shell_file_name}":
-    command   => "sh /tmp/${smoke_shell_file_name} ${conf_dir} ${hadoopconf_dir} ${smoke_test_user} ${security} ${smoke_user_keytab} ${realm} $jt_host $nn_host",
+    command   => "sh /tmp/${smoke_shell_file_name} ${conf_dir} ${hadoopconf_dir} ${smoke_test_user} ${security} ${smoke_user_keytab} ${kinit_path_local}",
     tries     => 3,
     try_sleep => 5,
     require   => File["/tmp/${smoke_shell_file_name}"],