You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2013/06/30 03:19:17 UTC

svn commit: r1498048 - in /incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper: files/zkSmoke.sh manifests/quorum/service_check.pp manifests/zookeeper/service_check.pp

Author: swagle
Date: Sun Jun 30 01:19:16 2013
New Revision: 1498048

URL: http://svn.apache.org/r1498048
Log:
AMBARI-2522. Zookeeper smoke test failing in secure cluster. (swagle)

Modified:
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/files/zkSmoke.sh
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/quorum/service_check.pp
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/zookeeper/service_check.pp

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/files/zkSmoke.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/files/zkSmoke.sh?rev=1498048&r1=1498047&r2=1498048&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/files/zkSmoke.sh (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/files/zkSmoke.sh Sun Jun 30 01:19:16 2013
@@ -23,10 +23,15 @@
 smoke_script=$1
 smoke_user=$2
 conf_dir=$3
+security_enabled=$4
 export ZOOKEEPER_EXIT_CODE=0
 zkhosts=` grep "^server\.[[:digit:]]"  $conf_dir/zoo.cfg  | cut -f 2 -d '=' | cut -f 1 -d ':' | tr '\n' ' ' `
 zk_node1=`echo $zkhosts | tr ' ' '\n' | head -n 1`  
 echo "zk_node1=$zk_node1"
+# If security is enabled, destroy the tickets
+if [[ $security_enabled == "true" ]]; then
+  su - $smoke_user -c 'kdestroy'
+fi
 # Delete /zk_smoketest znode if exists
 su - $smoke_user -c "source $conf_dir/zookeeper-env.sh ;  echo delete /zk_smoketest | ${smoke_script} -server $zk_node1:2181"  
 # Create /zk_smoketest znode on one zookeeper server
@@ -45,7 +50,7 @@ for i in $zkhosts ; do
   fi
 done
 
-su - $zmoke_user -c "source $conf_dir/zookeeper-env.sh ; echo 'delete /zk_smoketest' | ${smoke_script} -server $zk_node1:2181"
+su - $smoke_user -c "source $conf_dir/zookeeper-env.sh ; echo 'delete /zk_smoketest' | ${smoke_script} -server $zk_node1:2181"
 if [[ "$ZOOKEEPER_EXIT_CODE" -ne "0" ]] ; then
   echo "Zookeeper Smoke Test: Failed" 
 else

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/quorum/service_check.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/quorum/service_check.pp?rev=1498048&r1=1498047&r2=1498048&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/quorum/service_check.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/quorum/service_check.pp Sun Jun 30 01:19:16 2013
@@ -22,7 +22,7 @@ class hdp-zookeeper::quorum::service_che
 {
   include hdp-zookeeper::params
   $conf_dir = $hdp-zookeeper::params::conf_dir
-
+  $security_enabled = $hdp::params::security_enabled
   $smoke_test_user = $hdp::params::smokeuser
 
   $smoke_script = $hdp::params::zk_smoke_test_script
@@ -44,7 +44,7 @@ define hdp-zookeeper::quorum_smoke_shell
   }
 
   exec { '/tmp/zkSmoke.sh':
-    command   => "sh /tmp/zkSmoke.sh ${smoke_script} ${smoke_test_user} ${conf_dir}",
+    command   => "sh /tmp/zkSmoke.sh ${smoke_script} ${smoke_test_user} ${conf_dir} ${security_enabled}",
     tries     => 3,
     try_sleep => 5,
     require   => File['/tmp/zkSmoke.sh'],

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/zookeeper/service_check.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/zookeeper/service_check.pp?rev=1498048&r1=1498047&r2=1498048&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/zookeeper/service_check.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/zookeeper/service_check.pp Sun Jun 30 01:19:16 2013
@@ -23,7 +23,7 @@ class hdp-zookeeper::zookeeper::service_
   include hdp-zookeeper::params
   $conf_dir = $hdp-zookeeper::params::conf_dir
   $smoke_script = $hdp::params::zk_smoke_test_script
-
+  $security_enabled = $hdp::params::security_enabled
   $smoke_test_user = $hdp::params::smokeuser
   $zookeeper_smoke_shell_files = ['zkService.sh']
 
@@ -43,7 +43,7 @@ define hdp-zookeeper::zookeeper_smoke_sh
   }
 
   exec { '/tmp/zkService.sh':
-    command   => "sh /tmp/zkService.sh ${smoke_script} ${smoke_test_user} ${conf_dir}",
+    command   => "sh /tmp/zkService.sh ${smoke_script} ${smoke_test_user} ${conf_dir} ${security_enabled}",
     tries     => 3,
     try_sleep => 5,
     require   => File['/tmp/zkService.sh'],