Author: swagle
Date: Fri Apr  5 21:48:40 2013
New Revision: 1465138

URL: http://svn.apache.org/r1465138
Log:
AMBARI-1729. Creating smoke test for Hue service. (swagle)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/hue/service_check.pp
    
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp
    
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py

Modified: incubator/ambari/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1465138&r1=1465137&r2=1465138&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Apr  5 21:48:40 2013
@@ -12,6 +12,8 @@ Trunk (unreleased changes):
 
  NEW FEATURES
 
+ AMBARI-1729. Creating smoke test for Hue service. (swagle)
+
  AMBARI-1776. ZooKeeper Servers needs to store correct kerberos principal 
  in zookeeper_jaas.conf. (swagle)
 

Modified: 
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/hue/service_check.pp
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/hue/service_check.pp?rev=1465138&r1=1465137&r2=1465138&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/hue/service_check.pp
 (original)
+++ 
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/hue/service_check.pp
 Fri Apr  5 21:48:40 2013
@@ -18,7 +18,30 @@
 # under the License.
 #
 #
-class hdp-hue::service_check() inherits hdp-hue::params
+class hdp-hue::hue::service_check() inherits hdp-hue::params
 {
+  $status_check_cmd = "/etc/init.d/hue status | grep 'is running'"
+  $smoke_test_cmd = "${hue_home_dir}/build/env/bin/hue smoke_test"
 
+  anchor { 'hdp-hue::hue::service_check::begin' : }
+
+  exec { 'hue-status-check':
+    command   => $status_check_cmd,
+    tries     => 3,
+    try_sleep => 5,
+    path      => '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
+    logoutput => "true"
+  }
+
+  exec { 'hue-smoke-test':
+      command   => $smoke_test_cmd,
+      tries     => 3,
+      try_sleep => 5,
+      path      => '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
+      require   => Exec['hue-status-check'],
+      before    => Anchor['hdp-hue::hue::service_check::end'],
+      logoutput => "true"
+    }
+
+  anchor { 'hdp-hue::hue::service_check::end' : }
 }
\ No newline at end of file

Modified: 
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp?rev=1465138&r1=1465137&r2=1465138&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp
 (original)
+++ 
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp
 Fri Apr  5 21:48:40 2013
@@ -29,6 +29,7 @@ class hdp-hue::params() inherits hdp::pa
   $hue_lock_file = hdp_default("hue_lock_file", "/var/lock/subsys/hue")
   $hue_server_user = hdp_default("hue_user", "hue")
   $hue_server_group = hdp_default("hue_user_group", "hadoop")
+  $hue_home_dir = hdp_default("hue_home_dir", "/usr/lib/hue")
 
   # Other properties - not exposed
 
@@ -104,4 +105,4 @@ class hdp-hue::params() inherits hdp::pa
 
   }
 
-}
\ No newline at end of file
+}

Modified: 
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py?rev=1465138&r1=1465137&r2=1465138&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
 (original)
+++ 
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
 Fri Apr  5 21:48:40 2013
@@ -147,7 +147,8 @@ servicesToPidNames = {
   'KERBEROS_SERVER': 'kadmind.pid',
   'HIVE_SERVER': 'hive-server.pid',
   'HIVE_METASTORE': 'hive.pid',
-  'MYSQL_SERVER': 'mysqld.pid'
+  'MYSQL_SERVER': 'mysqld.pid',
+  'HUE_SERVER': '/var/run/hue/supervisor.pid'
 }
 
 linuxUserPattern = '[A-Za-z0-9_-]*[$]?'


Reply via email to