Repository: ambari Updated Branches: refs/heads/branch-2.4 9750eae96 -> 34bbd3eaa
AMBARI-17935. EU to HDP 2.5 failed since config type 'sqoop-atlas-application.properties' has not been created (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/34bbd3ea Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/34bbd3ea Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/34bbd3ea Branch: refs/heads/branch-2.4 Commit: 34bbd3eaac4584bd17873eeb90d5a0aed04f8048 Parents: 9750eae Author: Alejandro Fernandez <[email protected]> Authored: Thu Jul 28 10:55:36 2016 -0700 Committer: Alejandro Fernandez <[email protected]> Committed: Thu Jul 28 14:05:10 2016 -0700 ---------------------------------------------------------------------- .../serveraction/upgrades/ConfigureAction.java | 3 ++ .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml | 4 +- .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml | 12 ++--- .../sqoop-atlas-application.properties.xml | 47 ++++++++++++++++++++ 4 files changed, 60 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/34bbd3ea/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java index f7de8a9..ab6614d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java @@ -237,6 +237,9 @@ public class ConfigureAction extends AbstractServerAction { Map<String, DesiredConfig> desiredConfigs = cluster.getDesiredConfigs(); DesiredConfig desiredConfig = desiredConfigs.get(configType); Config config = cluster.getConfig(configType, desiredConfig.getTag()); + if (config == null) { + throw new AmbariException("Could not find desired config type with name " + configType); + } StackId currentStack = cluster.getCurrentStackVersion(); StackId targetStack = cluster.getDesiredStackVersion(); http://git-wip-us.apache.org/repos/asf/ambari/blob/34bbd3ea/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml index 7197e29..9daced9 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml @@ -313,10 +313,12 @@ </execute-stage> <!-- SQOOP --> - <execute-stage service="SQOOP" component="SQOOP" title="Apply config changes for Sqoop"> + <execute-stage service="SQOOP" component="SQOOP" title="Apply config changes for Sqoop to remove Atlas Configs"> <!-- Remove Atlas configs that were incorrectly added to sqoop-site instead of Atlas' application.properties. --> <task xsi:type="configure" id="hdp_2_5_0_0_remove_sqoop_atlas_configs"/> + </execute-stage> + <execute-stage service="SQOOP" component="SQOOP" title="Apply config changes for Sqoop if the cluster is Kerberized"> <!-- If cluster is Kerberized, add configs to sqoop-atlas-application.properties, which will be written to the local file system if Atlas is present. --> <task xsi:type="configure" id="hdp_2_5_0_0_add_sqoop_atlas_security_configs" /> http://git-wip-us.apache.org/repos/asf/ambari/blob/34bbd3ea/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml index 902c421..64c58d8 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml @@ -36,7 +36,7 @@ <group xsi:type="cluster" name="PRE_CLUSTER" title="Prepare Upgrade"> <direction>UPGRADE</direction> - <skippable>true</skippable> + <skippable>true</skippable> <supports-auto-skip-failure>false</supports-auto-skip-failure> <execute-stage service="YARN" component="RESOURCEMANAGER" title="Stop YARN Queues"> @@ -71,7 +71,7 @@ <parallel-scheduler/> <service-check>false</service-check> - <!-- TODO, Atlas doesn't yet support upgrades and the client doesn't exist in hdp-select. --> + <!-- TODO, Atlas doesn't yet support upgrades and the client doesn't exist in hdp-select. --> <service name="ATLAS"> <component>ATLAS_SERVER</component> </service> @@ -79,7 +79,7 @@ <service name="FLUME"> <component>FLUME_HANDLER</component> </service> - + <service name="ACCUMULO"> <component>ACCUMULO_TRACER</component> <component>ACCUMULO_GC</component> @@ -87,7 +87,7 @@ <component>ACCUMULO_MONITOR</component> <component>ACCUMULO_MASTER</component> </service> - + <service name="STORM"> <component>DRPC_SERVER</component> <component>STORM_UI_SERVER</component> @@ -335,10 +335,12 @@ </execute-stage> <!-- SQOOP --> - <execute-stage service="SQOOP" component="SQOOP" title="Apply config changes for Sqoop"> + <execute-stage service="SQOOP" component="SQOOP" title="Apply config changes for Sqoop to remove Atlas Configs"> <!-- Remove Atlas configs that were incorrectly added to sqoop-site instead of Atlas' application.properties. --> <task xsi:type="configure" id="hdp_2_5_0_0_remove_sqoop_atlas_configs"/> + </execute-stage> + <execute-stage service="SQOOP" component="SQOOP" title="Apply config changes for Sqoop if the cluster is Kerberized"> <!-- If cluster is Kerberized, add configs to sqoop-atlas-application.properties, which will be written to the local file system if Atlas is present. --> <task xsi:type="configure" id="hdp_2_5_0_0_add_sqoop_atlas_security_configs" /> http://git-wip-us.apache.org/repos/asf/ambari/blob/34bbd3ea/ambari-server/src/main/resources/stacks/HDP/2.5/services/SQOOP/configuration/sqoop-atlas-application.properties.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SQOOP/configuration/sqoop-atlas-application.properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SQOOP/configuration/sqoop-atlas-application.properties.xml new file mode 100644 index 0000000..1364776 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SQOOP/configuration/sqoop-atlas-application.properties.xml @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<configuration> + <!-- + These two security properties will only be read if the cluster is Kerberized, but ok to add them even without Kerberos. + It's important to have at least one property in this config file so it gets added while merging configs during EU/RU + from an earlier stack to HDP 2.5+. + Also, it allows a fresh install with Sqoop to expose this config type in the UI. + --> + <property> + <name>atlas.jaas.KafkaClient.option.useTicketCache</name> + <value>true</value> + <description> + Set this to "true" if you want the TGT to be obtained from the ticket cache. + Set this option to "false" if you do not want this module to use the ticket cache. + </description> + <on-ambari-upgrade add="false"/> + </property> + <property> + <name>atlas.jaas.KafkaClient.option.renewTicket</name> + <value>true</value> + <description> + Set this to "true" if you want the TGT to renew the ticket when it expires. + Set this option to "false" if you do not want this module to renew tickets. + </description> + <on-ambari-upgrade add="false"/> + </property> +</configuration>
