ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject git commit: AMBARI-5537. Fix Oozie failing on Ubuntu (aonishuk)
Date Wed, 23 Apr 2014 12:10:31 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7a5c891e6 -> 3ad84982e


AMBARI-5537. Fix Oozie failing on Ubuntu (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3ad84982
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3ad84982
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3ad84982

Branch: refs/heads/trunk
Commit: 3ad84982ea4f0e7be7156f86e75ae7b37f0ee27e
Parents: 7a5c891
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Apr 23 15:08:55 2014 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Apr 23 15:08:55 2014 +0300

----------------------------------------------------------------------
 .../stacks/HDP/2.0.6/services/OOZIE/metainfo.xml    |  4 ++++
 .../services/OOZIE/package/files/oozieSmoke2.sh     | 16 ++++++++++++++--
 .../services/OOZIE/package/scripts/service_check.py |  6 ++++--
 3 files changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3ad84982/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml
index 14b3cf3..07da285 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml
@@ -80,6 +80,10 @@
               <type>rpm</type>
               <name>extjs</name>
             </package>
+            <package>
+              <type>rpm</type>
+              <name>libxml2-utils</name>
+            </package>
           </packages>
         </osSpecific>
         

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ad84982/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/oozieSmoke2.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/oozieSmoke2.sh
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/oozieSmoke2.sh
index 2b65c4a..ade464e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/oozieSmoke2.sh
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/oozieSmoke2.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +19,10 @@
 # under the License.
 #
 #
+
+os_family=$1
+shift
+
 function getValueFromField {
   xmllint $1 | grep "<name>$2</name>" -C 2 | grep '<value>' | cut -d ">"
-f2 | cut -d "<" -f1
   return $?
@@ -64,7 +68,15 @@ export OOZIE_EXIT_CODE=0
 export JOBTRACKER=`getValueFromField ${hadoop_conf_dir}/yarn-site.xml yarn.resourcemanager.address`
 export NAMENODE=`getValueFromField ${hadoop_conf_dir}/core-site.xml fs.defaultFS`
 export OOZIE_SERVER=`getValueFromField ${oozie_conf_dir}/oozie-site.xml oozie.base.url |
tr '[:upper:]' '[:lower:]'`
-export OOZIE_EXAMPLES_DIR=`rpm -ql oozie-client | grep 'oozie-examples.tar.gz$' | xargs dirname`
+
+if [ "$os_family" == "debian" ] ; then
+  LIST_PACKAGE_FILES_CMD='dpkg-query -L'
+else
+  LIST_PACKAGE_FILES_CMD='rpm -ql'
+fi
+  
+
+export OOZIE_EXAMPLES_DIR=`$LIST_PACKAGE_FILES_CMD oozie-client | grep 'oozie-examples.tar.gz$'
| xargs dirname`
 cd $OOZIE_EXAMPLES_DIR
 
 tar -zxf oozie-examples.tar.gz

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ad84982/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
index 857270d..892ab11 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
@@ -40,10 +40,12 @@ def oozie_smoke_shell_file(
     mode = 0755
   )
   
+  os_family = System.get_instance().os_family
+  
   if params.security_enabled:
-    sh_cmd = format("sh /tmp/{file_name} {conf_dir} {hadoop_conf_dir} {smokeuser} {security_enabled}
{smokeuser_keytab} {kinit_path_local}")
+    sh_cmd = format("/tmp/{file_name} {os_family} {conf_dir} {hadoop_conf_dir} {smokeuser}
{security_enabled} {smokeuser_keytab} {kinit_path_local}")
   else:
-    sh_cmd = format("sh /tmp/{file_name} {conf_dir} {hadoop_conf_dir} {smokeuser} {security_enabled}")
+    sh_cmd = format("/tmp/{file_name} {os_family} {conf_dir} {hadoop_conf_dir} {smokeuser}
{security_enabled}")
 
   Execute( format("/tmp/{file_name}"),
     command   = sh_cmd,


Mime
View raw message