Repository: ambari Updated Branches: refs/heads/branch-2.0.0 2cfc618ec -> 165944598
AMBARI-9948. Oozie Service Check fails after upgrade secured cluster 1.6.1->2.0.0.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/16594459 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/16594459 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/16594459 Branch: refs/heads/branch-2.0.0 Commit: 165944598ceac8008274d354a7cd4ba21dbfffe5 Parents: 2cfc618 Author: Vitaly Brodetskyi <[email protected]> Authored: Thu Mar 5 21:47:20 2015 +0200 Committer: Vitaly Brodetskyi <[email protected]> Committed: Thu Mar 5 21:47:20 2015 +0200 ---------------------------------------------------------------------- .../4.0.0.2.0/configuration/oozie-site.xml | 7 +++++ .../4.0.0.2.0/package/files/oozieSmoke2.sh | 29 +++++++++++++------- .../4.0.0.2.0/package/scripts/service_check.py | 8 ++++-- .../stacks/2.0.6/OOZIE/test_service_check.py | 2 +- 4 files changed, 32 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/16594459/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-site.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-site.xml index e72a8be..d7ae0e9 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-site.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-site.xml @@ -279,6 +279,13 @@ <description>List of Oozie services</description> </property> <property> + <name>oozie.service.HadoopAccessorService.kerberos.enabled</name> + <value>false</value> + <description> + Indicates if Oozie is configured to use Kerberos. + </description> + </property> + <property> <name>oozie.service.URIHandlerService.uri.handlers</name> <value>org.apache.oozie.dependency.FSURIHandler,org.apache.oozie.dependency.HCatURIHandler</value> <description> http://git-wip-us.apache.org/repos/asf/ambari/blob/16594459/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh index 84f913c..63da7c9 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh @@ -20,16 +20,17 @@ # # -export oozie_lib_dir=$1 -export oozie_conf_dir=$2 -export oozie_bin_dir=$3 -export hadoop_conf_dir=$4 -export hadoop_bin_dir=$5 -export smoke_test_user=$6 -export security_enabled=$7 -export smoke_user_keytab=$8 -export kinit_path_local=$9 -export smokeuser_principal=${10} +export os_family = $1 +export oozie_lib_dir=$2 +export oozie_conf_dir=$3 +export oozie_bin_dir=$4 +export hadoop_conf_dir=$5 +export hadoop_bin_dir=$6 +export smoke_test_user=$7 +export security_enabled=$8 +export smoke_user_keytab=$9 +export kinit_path_local=${10} +export smokeuser_principal=${11} function getValueFromField { xmllint $1 | grep "<name>$2</name>" -C 2 | grep '<value>' | cut -d ">" -f2 | cut -d "<" -f1 @@ -73,6 +74,14 @@ export OOZIE_SERVER=`getValueFromField ${oozie_conf_dir}/oozie-site.xml oozie.ba # search for the oozie examples JAR and, if found, store the directory name export OOZIE_EXAMPLES_DIR=`find "${oozie_lib_dir}/" -name "oozie-examples.tar.gz" | xargs dirname` if [[ -z "$OOZIE_EXAMPLES_DIR" ]] ; then + if [ "$os_family" == "ubuntu" ] ; 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` +fi +if [[ -z "$OOZIE_EXAMPLES_DIR" ]] ; then export OOZIE_EXAMPLES_DIR='/usr/hdp/current/oozie-client/doc/' else echo "Located Oozie examples JAR at $OOZIE_EXAMPLES_DIR" http://git-wip-us.apache.org/repos/asf/ambari/blob/16594459/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py index 471cd35..de68ca5 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py @@ -42,11 +42,13 @@ def oozie_smoke_shell_file(file_name): content = StaticFile(file_name), mode = 0755 ) - + + os_family = System.get_instance().os_family + if params.security_enabled: - sh_cmd = format("{tmp_dir}/{file_name} {oozie_lib_dir} {conf_dir} {oozie_bin_dir} {hadoop_conf_dir} {hadoop_bin_dir} {smokeuser} {security_enabled} {smokeuser_keytab} {kinit_path_local} {smokeuser_principal}") + sh_cmd = format("{tmp_dir}/{file_name} {os_family} {oozie_lib_dir} {conf_dir} {oozie_bin_dir} {hadoop_conf_dir} {hadoop_bin_dir} {smokeuser} {security_enabled} {smokeuser_keytab} {kinit_path_local} {smokeuser_principal}") else: - sh_cmd = format("{tmp_dir}/{file_name} {oozie_lib_dir} {conf_dir} {oozie_bin_dir} {hadoop_conf_dir} {hadoop_bin_dir} {smokeuser} {security_enabled}") + sh_cmd = format("{tmp_dir}/{file_name} {os_family} {oozie_lib_dir} {conf_dir} {oozie_bin_dir} {hadoop_conf_dir} {hadoop_bin_dir} {smokeuser} {security_enabled}") Execute( format("{tmp_dir}/{file_name}"), command = sh_cmd, http://git-wip-us.apache.org/repos/asf/ambari/blob/16594459/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py index a478b57..58af10b 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py @@ -57,7 +57,7 @@ class TestServiceCheck(RMFTestCase): self.assertResourceCalled('Execute', '/tmp/oozieSmoke2.sh', logoutput = True, tries = 3, - command = '/tmp/oozieSmoke2.sh /var/lib/oozie /etc/oozie/conf /usr/bin /etc/hadoop/conf /usr/bin ambari-qa False', + command = '/tmp/oozieSmoke2.sh suse /var/lib/oozie /etc/oozie/conf /usr/bin /etc/hadoop/conf /usr/bin ambari-qa False', path = ['/usr/bin:/usr/bin'], try_sleep = 5, )
