This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new 1f05db9 AMBARI-24540. Allow skipping Oozie DB schema creation for
sysprepped cluster (#2171)
1f05db9 is described below
commit 1f05db9a322433ce7dc252288fb835133f281407
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Aug 28 08:52:19 2018 +0200
AMBARI-24540. Allow skipping Oozie DB schema creation for sysprepped
cluster (#2171)
---
.../OOZIE/4.0.0.2.0/package/scripts/oozie_service.py | 11 +++++++----
.../OOZIE/4.0.0.2.0/package/scripts/params_linux.py | 2 ++
.../resources/stacks/HDP/2.0.6/configuration/cluster-env.xml | 11 +++++++++++
3 files changed, 20 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 7b15a63..4a229ab 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
@@ -109,10 +109,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_linux.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
index 8f38843..1c318e8 100644
---
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
+++
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
@@ -68,6 +68,8 @@ stack_name_uppercase = stack_name.upper()
upgrade_direction = default("/commandParams/upgrade_direction", None)
agent_stack_retry_on_unavailability =
config['hostLevelParams']['agent_stack_retry_on_unavailability']
agent_stack_retry_count = expect("/hostLevelParams/agent_stack_retry_count",
int)
+host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+sysprep_skip_oozie_schema_create = host_sys_prepped and
default("/configurations/cluster-env/sysprep_skip_oozie_schema_create", False)
stack_root = status_params.stack_root
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 ed1f30d..ed5322a 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 both fresh install and stack upgrade</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>