You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2018/08/29 03:43:05 UTC
[ambari] branch branch-2.7 updated: AMBARI-24540. Allow skipping
Oozie DB schema creation for sysprepped cluster (#2180)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.7 by this push:
new 9d02e74 AMBARI-24540. Allow skipping Oozie DB schema creation for sysprepped cluster (#2180)
9d02e74 is described below
commit 9d02e74ebcd04856a096fccf21acb1b72bd4c713
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Wed Aug 29 05:43:00 2018 +0200
AMBARI-24540. Allow skipping Oozie DB schema creation for sysprepped cluster (#2180)
---
.../OOZIE/4.0.0.2.0/package/scripts/oozie_service.py | 11 +++++++----
.../common-services/OOZIE/4.0.0.2.0/package/scripts/params.py | 1 +
.../resources/stacks/HDP/2.0.6/configuration/cluster-env.xml | 11 +++++++++++
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
index 612bb29..b8b7b9c 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
@@ -112,10 +112,13 @@ def oozie_service(action = 'start', upgrade_type=None):
user=params.oozie_user,
)
- Execute( format("cd {oozie_tmp_dir} && {oozie_home}/bin/ooziedb.sh create -sqlfile oozie.sql -run"),
- user = params.oozie_user, not_if = no_op_test,
- ignore_failures = True
- )
+ if params.sysprep_skip_oozie_schema_create:
+ Logger.info("Skipping creation of oozie schema as host is sys prepped")
+ else:
+ Execute( format("cd {oozie_tmp_dir} && {oozie_home}/bin/ooziedb.sh create -sqlfile oozie.sql -run"),
+ user = params.oozie_user, not_if = no_op_test,
+ ignore_failures = True
+ )
if params.security_enabled:
Execute(kinit_if_needed,
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py
index 5972396..c0257b6 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py
@@ -37,3 +37,4 @@ host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
sysprep_skip_copy_oozie_share_lib_to_hdfs = False
if host_sys_prepped:
sysprep_skip_copy_oozie_share_lib_to_hdfs = default("/configurations/cluster-env/sysprep_skip_copy_oozie_share_lib_to_hdfs", False)
+sysprep_skip_oozie_schema_create = host_sys_prepped and default("/configurations/cluster-env/sysprep_skip_oozie_schema_create", False)
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
index 0f5d76c..1c33171 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
@@ -126,6 +126,17 @@
<on-ambari-upgrade add="true"/>
</property>
<property>
+ <name>sysprep_skip_oozie_schema_create</name>
+ <display-name>Whether to skip creating the Oozie DB schema on sysprepped cluster</display-name>
+ <value>false</value>
+ <description>Whether to skip creating the Oozie DB schema on sysprepped cluster, during fresh install</description>
+ <value-attributes>
+ <overridable>true</overridable>
+ <type>boolean</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
<name>sysprep_skip_setup_jce</name>
<display-name>Whether to skip setting up the unlimited key JCE policy on sysprepped cluster</display-name>
<value>false</value>