ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [1/3] ambari git commit: AMBARI-16687 - Configuration Tasks Are Being Skipped During Upgrade (jonathanhurley)
Date Mon, 16 May 2016 23:46:02 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 ac151fb53 -> 1209a706d


http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
index 45e2f94..1287d57 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
@@ -53,6 +53,18 @@
                      replace-with="" />
 
           </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hbase_audit_db">
+            <type>ranger-hbase-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+
         </changes>
       </component>
     </service>
@@ -68,6 +80,10 @@
             <type>tez-site</type>
             <set key="tez.lib.uris" value="/hdp/apps/${hdp.version}/tez/tez.tar.gz"/>
           </definition>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_tez_client_adjust_tez_lib_uris_property">
+            <type>tez-site</type>
+            <set key="tez.lib.uris" value="/hdp/apps/${hdp.version}/tez/tez.tar.gz"/>
+          </definition>
         </changes>
       </component>
     </service>
@@ -158,6 +174,43 @@
             <transfer operation="delete" delete-key="hive.server2.authentication.kerberos.principal" if-key="hive.server2.authentication" if-type="hive-site" if-value="custom"/>
           </definition>
 
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hive_audit_db">
+            <type>ranger-hive-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_hive_server_set_transport_mode">
+            <condition type="hive-site" key="hive.server2.transport.mode" value="binary">
+              <type>hive-site</type>
+              <key>hive.server2.thrift.port</key>
+              <value>10010</value>
+            </condition>
+            <condition type="hive-site" key="hive.server2.transport.mode" value="http">
+              <type>hive-site</type>
+              <key>hive.server2.http.port</key>
+              <value>10011</value>
+            </condition>
+          </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_hive_server_restore_transport_mode_on_downgrade">
+            <condition type="hive-site" key="hive.server2.transport.mode" value="binary">
+              <type>hive-site</type>
+              <key>hive.server2.thrift.port</key>
+              <value>10000</value>
+            </condition>
+            <condition type="hive-site" key="hive.server2.transport.mode" value="http">
+              <type>hive-site</type>
+              <key>hive.server2.http.port</key>
+              <value>10001</value>
+            </condition>
+          </definition>
+
         </changes>
       </component>
       <component name="WEBHCAT_SERVER">
@@ -170,72 +223,203 @@
             <replace key="templeton.hcat" find="/usr/hdp/current/hive-client" replace-with="/usr/hdp/${hdp.version}/hive"/>
             <set key="templeton.hive.extra.files" value="/usr/hdp/${hdp.version}/tez/conf/tez-site.xml,/usr/hdp/${hdp.version}/tez,/usr/hdp/${hdp.version}/tez/lib"/>
           </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_webhcat_server_update_configuration_paths" summary="Updating Configuration Paths">
+            <type>webhcat-site</type>
+            <replace key="templeton.jar" find="/usr/hdp/current/hive-webhcat" replace-with="/usr/hdp/${hdp.version}/hive"/>
+            <replace key="templeton.libjars" find="/usr/hdp/current/zookeeper-client" replace-with="/usr/hdp/${hdp.version}/zookeeper,/usr/hdp/${hdp.version}/hive/lib/hive-common.jar"/>
+            <replace key="templeton.hadoop" find="/usr/hdp/current/hadoop-client" replace-with="/usr/hdp/${hdp.version}/hadoop"/>
+            <replace key="templeton.hcat" find="/usr/hdp/current/hive-client" replace-with="/usr/hdp/${hdp.version}/hive"/>
+            <set key="templeton.hive.extra.files" value="/usr/hdp/${hdp.version}/tez/conf/tez-site.xml,/usr/hdp/${hdp.version}/tez,/usr/hdp/${hdp.version}/tez/lib"/>
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="RANGER">
+      <component name="RANGER_ADMIN">
+        <changes>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_flag">
+            <type>ranger-env</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db"/>
+          </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_admin_properties">
+            <type>admin-properties</type>
+            <transfer operation="delete" delete-key="audit_db_name" />
+            <transfer operation="delete" delete-key="audit_db_user" />
+            <transfer operation="delete" delete-key="audit_db_password" />
+          </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_ranger_admin_site">
+            <type>ranger-admin-site</type>
+            <set key="ranger.audit.source.type" value="solr"/>
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.driver" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.url" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.user" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.password" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.credential.alias" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.dialect" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="RANGER_KMS">
+      <component name="RANGER_KMS_SERVER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_kms_audit_db">
+            <type>ranger-kms-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="HDFS">
+      <component name="NAMENODE">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_4_0_0_namenode_ha_adjustments">
+            <type>hdfs-site</type>
+            <transfer operation="delete" delete-key="dfs.namenode.rpc-address" if-type="hdfs-site" if-key="dfs.nameservices" if-key-state="present"/>
+            <transfer operation="delete" delete-key="dfs.namenode.http-address" if-type="hdfs-site" if-key="dfs.nameservices" if-key-state="present"/>
+            <transfer operation="delete" delete-key="dfs.namenode.https-address" if-type="hdfs-site" if-key="dfs.nameservices" if-key-state="present"/>
+          </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hdfs_audit_db">
+            <type>ranger-hdfs-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="SPARK">
+      <component name="SPARK_JOBHISTORYSERVER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_4_0_0_spark_jobhistoryserver">
+            <type>spark-defaults</type>
+            <transfer operation="delete" delete-key="spark.yarn.services" />
+            <set key="spark.history.provider" value="org.apache.spark.deploy.history.FsHistoryProvider"/>
+          </definition>
+        </changes>
+      </component>
+      <component name="SPARK_THRIFTSERVER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_4_0_0_spark_thriftserver">
+            <type>spark-thrift-sparkconf</type>
+            <transfer operation="delete" delete-key="spark.yarn.executor.memoryOverhead" />
+            <transfer operation="delete" delete-key="spark.yarn.driver.memoryOverhead" />
+            <transfer operation="delete" delete-key="spark.yarn.scheduler.heartbeat.interval-ms" />
+            <transfer operation="delete" delete-key="spark.yarn.max.executor.failures" />
+            <transfer operation="delete" delete-key="spark.yarn.containerLauncherMaxThreads" />
+            <transfer operation="delete" delete-key="spark.yarn.submit.file.replication" />
+            <transfer operation="delete" delete-key="spark.yarn.preserve.staging.files" />
+            <transfer operation="delete" delete-key="spark.yarn.max.executor.failures" />
+          </definition>
         </changes>
       </component>
     </service>
-  </services>
 
-  <service name="HDFS">
-    <component name="NAMENODE">
-      <changes>
-        <definition xsi:type="configure" id="hdp_2_4_0_0_namenode_ha_adjustments">
-          <type>hdfs-site</type>
-          <transfer operation="delete" delete-key="dfs.namenode.rpc-address" if-type="hdfs-site" if-key="dfs.nameservices" if-key-state="present"/>
-          <transfer operation="delete" delete-key="dfs.namenode.http-address" if-type="hdfs-site" if-key="dfs.nameservices" if-key-state="present"/>
-          <transfer operation="delete" delete-key="dfs.namenode.https-address" if-type="hdfs-site" if-key="dfs.nameservices" if-key-state="present"/>
-        </definition>
-      </changes>
-    </component>
-  </service>
-
-  <service name="SPARK">
-    <component name="SPARK_JOBHISTORYSERVER">
-      <changes>
-        <definition xsi:type="configure" id="hdp_2_4_0_0_spark_jobhistoryserver">
-          <type>spark-defaults</type>
-          <transfer operation="delete" delete-key="spark.yarn.services" />
-          <set key="spark.history.provider" value="org.apache.spark.deploy.history.FsHistoryProvider"/>
-        </definition>
-      </changes>
-    </component>
-    <component name="SPARK_THRIFTSERVER">
-      <changes>
-        <definition xsi:type="configure" id="hdp_2_4_0_0_spark_thriftserver">
-          <type>spark-thrift-sparkconf</type>
-          <transfer operation="delete" delete-key="spark.yarn.executor.memoryOverhead" />
-          <transfer operation="delete" delete-key="spark.yarn.driver.memoryOverhead" />
-          <transfer operation="delete" delete-key="spark.yarn.scheduler.heartbeat.interval-ms" />
-          <transfer operation="delete" delete-key="spark.yarn.max.executor.failures" />
-          <transfer operation="delete" delete-key="spark.yarn.containerLauncherMaxThreads" />
-          <transfer operation="delete" delete-key="spark.yarn.submit.file.replication" />
-          <transfer operation="delete" delete-key="spark.yarn.preserve.staging.files" />
-          <transfer operation="delete" delete-key="spark.yarn.max.executor.failures" />
-        </definition>
-      </changes>
-    </component>
-  </service>
-
-  <service name="OOZIE">
-    <component name="OOZIE_SERVER">
-      <changes>
-        <definition xsi:type="configure" id="hdp_2_4_0_0_oozie_remove_service_classes" summary="Updating Oozie Service classes">
-          <type>oozie-site</type>
-          <replace key="oozie.services" find="org.apache.oozie.service.CoordinatorStoreService," replace-with="" />
-        </definition>
-      </changes>
-    </component>
-  </service>
-
-  <service name="KAFKA">
-    <component name="KAFKA_BROKER">
-      <changes>
-        <definition xsi:type="configure" id="hdp_2_4_0_0_kafka_broker_deprecate_port">
-          <type>kafka-broker</type>
-          <!-- Deprecate "port" property since "listeners" will be added. -->
-          <transfer operation="delete" delete-key="port"/>
-        </definition>
-      </changes>
-    </component>
-  </service>
+    <service name="OOZIE">
+      <component name="OOZIE_SERVER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_4_0_0_oozie_remove_service_classes" summary="Updating Oozie Service classes">
+            <type>oozie-site</type>
+            <replace key="oozie.services" find="org.apache.oozie.service.CoordinatorStoreService," replace-with="" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="KAFKA">
+      <component name="KAFKA_BROKER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_4_0_0_kafka_broker_deprecate_port">
+            <type>kafka-broker</type>
+            <!-- Deprecate "port" property since "listeners" will be added. -->
+            <transfer operation="delete" delete-key="port"/>
+          </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_kafka_audit_db">
+            <type>ranger-kafka-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+
+        </changes>
+      </component>
+    </service>
+
+    <service name="YARN">
+      <component name="RESOURCEMANAGER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_yarn_audit_db">
+            <type>ranger-yarn-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="STORM">
+      <component name="NIMBUS">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_storm_audit_db">
+            <type>ranger-storm-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="KNOX">
+      <component name="KNOX_GATEWAY">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_knox_audit_db">
+            <type>ranger-knox-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+  </services>
 
 </upgrade-config-changes>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/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 7873853..56cd6d0 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
@@ -34,7 +34,6 @@
 
   <!-- Instructs the upgrade pack how to build the configuration pack -->
   <upgrade-path>
-    <intermediate-stack version="2.3"/>
     <intermediate-stack version="2.4"/>
   </upgrade-path>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
index 1cd2ffa..1e040e6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
@@ -51,7 +51,6 @@
 
   <!-- Instructs the upgrade pack how to build the configuration pack -->
   <upgrade-path>
-    <intermediate-stack version="2.3"/>
     <intermediate-stack version="2.4"/>
   </upgrade-path>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
index f71ef1a..dd0e456 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
@@ -27,6 +27,12 @@
             <type>tez-site</type>
             <set key="tez.lib.uris" value="/hdp/apps/${hdp.version}/tez/tez.tar.gz"/>
           </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_tez_client_adjust_tez_lib_uris_property">
+            <type>tez-site</type>
+            <set key="tez.lib.uris" value="/hdp/apps/${hdp.version}/tez/tez.tar.gz"/>
+          </definition>
+
         </changes>
       </component>
     </service>
@@ -60,8 +66,20 @@
             </condition>
           </definition>
 
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hive_audit_db">
+            <type>ranger-hive-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+
         </changes>
       </component>
+
       <component name="WEBHCAT_SERVER">
         <changes>
           <definition xsi:type="configure" id="hdp_2_4_0_0_webhcat_server_update_configuration_paths" summary="Updating Configuration Paths">
@@ -76,6 +94,154 @@
       </component>
     </service>
 
+    <service name="RANGER">
+      <component name="RANGER_ADMIN">
+        <changes>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_flag">
+            <type>ranger-env</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db"/>
+          </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_admin_properties">
+            <type>admin-properties</type>
+            <transfer operation="delete" delete-key="audit_db_name" />
+            <transfer operation="delete" delete-key="audit_db_user" />
+            <transfer operation="delete" delete-key="audit_db_password" />
+          </definition>
+
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_ranger_admin_site">
+            <type>ranger-admin-site</type>
+            <set key="ranger.audit.source.type" value="solr"/>
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.driver" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.url" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.user" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.password" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.credential.alias" />
+            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.dialect" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="RANGER_KMS">
+      <component name="RANGER_KMS_SERVER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_kms_audit_db">
+            <type>ranger-kms-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="HDFS">
+      <component name="NAMENODE">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hdfs_audit_db">
+            <type>ranger-hdfs-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="YARN">
+      <component name="RESOURCEMANAGER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_yarn_audit_db">
+            <type>ranger-yarn-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="KAFKA">
+      <component name="KAFKA_BROKER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_kafka_audit_db">
+            <type>ranger-kafka-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="STORM">
+      <component name="NIMBUS">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_storm_audit_db">
+            <type>ranger-storm-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="HBASE">
+      <component name="HBASE_MASTER">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hbase_audit_db">
+            <type>ranger-hbase-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
+
+    <service name="KNOX">
+      <component name="KNOX_GATEWAY">
+        <changes>
+          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_knox_audit_db">
+            <type>ranger-knox-audit</type>
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
+            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
+            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
+          </definition>
+        </changes>
+      </component>
+    </service>
 
   </services>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
index 9c6a02d..6e27da6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
@@ -509,7 +509,6 @@
         <pre-downgrade /> <!--  no-op to prevent config changes on downgrade -->
 
         <pre-upgrade>
-          <task xsi:type="configure" id="hdp_2_4_0_0_namenode_ha_adjustments"/>
           <task xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hdfs_audit_db" />
         </pre-upgrade>
 
@@ -712,18 +711,12 @@
     <service name="SPARK">
       <component name="SPARK_JOBHISTORYSERVER">
         <pre-downgrade /> <!--  no-op to prevent config changes on downgrade -->
-        <pre-upgrade>
-          <task xsi:type="configure" id="hdp_2_4_0_0_spark_jobhistoryserver"/>
-        </pre-upgrade>
         <upgrade>
           <task xsi:type="restart-task" />
         </upgrade>
       </component>
       <component name="SPARK_THRIFTSERVER">
         <pre-downgrade /> <!--  no-op to prevent config changes on downgrade -->
-        <pre-upgrade>
-          <task xsi:type="configure" id="hdp_2_4_0_0_spark_thriftserver"/>
-        </pre-upgrade>
         <upgrade>
           <task xsi:type="restart-task"/>
         </upgrade>
@@ -738,8 +731,6 @@
     <service name="OOZIE">
       <component name="OOZIE_SERVER">
         <pre-upgrade>
-          <task xsi:type="configure" id="hdp_2_4_0_0_oozie_remove_service_classes" />
-
           <task xsi:type="server_action" summary="Adjusting Oozie properties" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"/>
 
           <task xsi:type="execute" hosts="all" sequential="true" summary="Shut down all Oozie servers">
@@ -796,7 +787,6 @@
     <service name="KAFKA">
       <component name="KAFKA_BROKER">
         <pre-upgrade>
-          <task xsi:type="configure" id ="hdp_2_4_0_0_kafka_broker_deprecate_port"/>
           <task xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_kafka_audit_db" />
         </pre-upgrade>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index a7dbba3..5211276 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -19,18 +19,6 @@
 <upgrade-config-changes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
   <services>
-
-    <service name="TEZ">
-      <component name="TEZ_CLIENT">
-        <changes>
-          <definition xsi:type="configure" id="hdp_2_5_0_0_tez_client_adjust_tez_lib_uris_property">
-            <type>tez-site</type>
-            <set key="tez.lib.uris" value="/hdp/apps/${hdp.version}/tez/tez.tar.gz"/>
-          </definition>
-        </changes>
-      </component>
-    </service>
-
     <service name="HIVE">
       <component name="HIVE_SERVER">
         <changes>
@@ -59,183 +47,9 @@
               <value>10001</value>
             </condition>
           </definition>
-
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hive_audit_db">
-            <type>ranger-hive-audit</type>
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
-            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
-          </definition>
-
-        </changes>
-      </component>
-      <component name="WEBHCAT_SERVER">
-        <changes>
-          <definition xsi:type="configure" id="hdp_2_5_0_0_webhcat_server_update_configuration_paths" summary="Updating Configuration Paths">
-            <type>webhcat-site</type>
-            <replace key="templeton.jar" find="/usr/hdp/current/hive-webhcat" replace-with="/usr/hdp/${hdp.version}/hive"/>
-            <replace key="templeton.libjars" find="/usr/hdp/current/zookeeper-client" replace-with="/usr/hdp/${hdp.version}/zookeeper,/usr/hdp/${hdp.version}/hive/lib/hive-common.jar"/>
-            <replace key="templeton.hadoop" find="/usr/hdp/current/hadoop-client" replace-with="/usr/hdp/${hdp.version}/hadoop"/>
-            <replace key="templeton.hcat" find="/usr/hdp/current/hive-client" replace-with="/usr/hdp/${hdp.version}/hive"/>
-            <set key="templeton.hive.extra.files" value="/usr/hdp/${hdp.version}/tez/conf/tez-site.xml,/usr/hdp/${hdp.version}/tez,/usr/hdp/${hdp.version}/tez/lib"/>
-          </definition>
-        </changes>
-      </component>
-    </service>
-
-    <service name="RANGER">
-      <component name="RANGER_ADMIN">
-        <changes>
-
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_flag">
-            <type>ranger-env</type>
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db"/>
-          </definition>
-
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_admin_properties">
-            <type>admin-properties</type>
-            <transfer operation="delete" delete-key="audit_db_name" />
-            <transfer operation="delete" delete-key="audit_db_user" />
-            <transfer operation="delete" delete-key="audit_db_password" />
-          </definition>
-
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_ranger_admin_site">
-            <type>ranger-admin-site</type>
-            <set key="ranger.audit.source.type" value="solr"/>
-            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.driver" />
-            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.url" />
-            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.user" />
-            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.password" />
-            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.credential.alias" />
-            <transfer operation="delete" delete-key="ranger.jpa.audit.jdbc.dialect" />
-          </definition>
-        </changes>
-      </component>
-    </service>
-
-    <service name="HDFS">
-      <component name="NAMENODE">
-        <changes>
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hdfs_audit_db">
-            <type>ranger-hdfs-audit</type>
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
-            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
-          </definition>
-        </changes>
-      </component>
-    </service>
-
-    <service name="HBASE">
-      <component name="HBASE_MASTER">
-        <changes>
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_hbase_audit_db">
-            <type>ranger-hbase-audit</type>
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
-            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
-          </definition>
-        </changes>
-      </component>
-    </service>
-
-    <service name="KNOX">
-      <component name="KNOX_GATEWAY">
-        <changes>
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_knox_audit_db">
-            <type>ranger-knox-audit</type>
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
-            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
-          </definition>
-        </changes>
-      </component>
-    </service>
-
-    <service name="STORM">
-      <component name="NIMBUS">
-        <changes>
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_storm_audit_db">
-            <type>ranger-storm-audit</type>
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
-            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
-          </definition>
-        </changes>
-      </component>
-    </service>
-
-    <service name="YARN">
-      <component name="RESOURCEMANAGER">
-        <changes>
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_yarn_audit_db">
-            <type>ranger-yarn-audit</type>
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
-            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
-          </definition>
         </changes>
       </component>
     </service>
-
-    <service name="KAFKA">
-      <component name="KAFKA_BROKER">
-        <changes>
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_kafka_audit_db">
-            <type>ranger-kafka-audit</type>
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
-            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
-          </definition>
-        </changes>
-      </component>
-    </service>
-
-    <service name="RANGER_KMS">
-      <component name="RANGER_KMS_SERVER">
-        <changes>
-          <definition xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_kms_audit_db">
-            <type>ranger-kms-audit</type>
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.url" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.user" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.password" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.jdbc.driver" />
-            <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
-            <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
-          </definition>
-        </changes>
-      </component>
-    </service>
-
   </services>
 
 </upgrade-config-changes>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
index 2e5c002..5616cb4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
@@ -283,10 +283,6 @@
         <task xsi:type="server_action" summary="Verifying LZO codec path for Tez" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/>
       </execute-stage>
 
-      <execute-stage service="TEZ" component="TEZ_CLIENT" title="Apply config changes for Tez">
-        <task xsi:type="configure" id="hdp_2_5_0_0_tez_client_adjust_tez_lib_uris_property"/>
-      </execute-stage>
-
       <!--OOZIE-->
       <execute-stage service="OOZIE" component="OOZIE_SERVER" title="Apply config changes for Oozie Server">
         <task xsi:type="server_action" summary="Adjusting Oozie properties" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"/>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
index 1745de8..d755516 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
@@ -643,8 +643,6 @@
     <service name="TEZ">
       <component name="TEZ_CLIENT">
         <pre-upgrade>
-          <task xsi:type="configure" id="hdp_2_5_0_0_tez_client_adjust_tez_lib_uris_property"/>
-
           <task xsi:type="server_action" summary="Verifying LZO codec path for Tez" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/>
         </pre-upgrade>
         <upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
index 92043f0..8f53f6a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
@@ -304,7 +304,8 @@ public class UpgradeResourceProviderTest {
     assertEquals("This is a manual task with a placeholder of placeholder-rendered-properly",
         parseSingleMessage(zookeeperUpgradeItems.get(0).getText()));
     assertEquals("Restarting ZooKeeper Server on h1", zookeeperUpgradeItems.get(1).getText());
-    assertEquals("Skipping Configuration Task 2.2.0", zookeeperUpgradeItems.get(2).getText());
+    assertEquals("Updating configuration zookeeper-newconfig",
+        zookeeperUpgradeItems.get(2).getText());
     assertEquals("Service Check ZooKeeper", zookeeperUpgradeItems.get(3).getText());
     assertEquals("Verifying Skipped Failures", zookeeperUpgradeItems.get(4).getText());
 
@@ -352,7 +353,8 @@ public class UpgradeResourceProviderTest {
     List<UpgradeItemEntity> zookeeperUpgradeItems = zookeeperGroup.getItems();
     assertEquals(3, zookeeperUpgradeItems.size());
     assertEquals("Restarting ZooKeeper Server on h1", zookeeperUpgradeItems.get(0).getText());
-    assertEquals("Skipping Configuration Task 2.2.0", zookeeperUpgradeItems.get(1).getText());
+    assertEquals("Updating configuration zookeeper-newconfig",
+        zookeeperUpgradeItems.get(1).getText());
     assertEquals("Service Check ZooKeeper", zookeeperUpgradeItems.get(2).getText());
 
     UpgradeGroupEntity postClusterGroup = upgradeGroups.get(1);
@@ -397,7 +399,8 @@ public class UpgradeResourceProviderTest {
     assertEquals(4, zookeeperUpgradeItems.size());
 
     assertEquals("Restarting ZooKeeper Server on h1", zookeeperUpgradeItems.get(0).getText());
-    assertEquals("Skipping Configuration Task 2.2.0", zookeeperUpgradeItems.get(1).getText());
+    assertEquals("Updating configuration zookeeper-newconfig",
+        zookeeperUpgradeItems.get(1).getText());
     assertEquals("Service Check ZooKeeper", zookeeperUpgradeItems.get(2).getText());
     assertEquals("Verifying Skipped Failures", zookeeperUpgradeItems.get(3).getText());
 
@@ -1236,7 +1239,7 @@ public class UpgradeResourceProviderTest {
         group.getItems().get(0).getText().contains("placeholder of placeholder-rendered-properly"));
 
     assertTrue(group.getItems().get(1).getText().contains("Restarting"));
-    assertTrue(group.getItems().get(2).getText().contains("Skipping"));
+    assertTrue(group.getItems().get(2).getText().contains("Updating"));
     assertTrue(group.getItems().get(3).getText().contains("Service Check"));
 
     ActionManager am = injector.getInstance(ActionManager.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
index 771f830..1ca486e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
@@ -25,7 +25,6 @@ import java.util.Set;
 import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.ambari.server.audit.AuditLogger;
-import org.apache.ambari.server.audit.AuditLoggerDefaultImpl;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.ControllerModule;
 import org.easymock.EasyMock;
@@ -35,6 +34,8 @@ import com.google.inject.AbstractModule;
 
 public class InMemoryDefaultTestModule extends AbstractModule {
 
+  Properties properties = new Properties();
+
   /**
    * Saves all {@link ControllerModule} logic, but changes bean discovery mechanism.
    * In this implementation scan for {@link org.apache.ambari.server.EagerSingleton}
@@ -59,8 +60,6 @@ public class InMemoryDefaultTestModule extends AbstractModule {
     }
   }
 
-  Properties properties = new Properties();
-
   @Override
   protected void configure() {
     String stacks = "src/test/resources/stacks";
@@ -72,11 +71,25 @@ public class InMemoryDefaultTestModule extends AbstractModule {
       sharedResourcesDir = ClassLoader.getSystemClassLoader().getResource("").getPath();
     }
 
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-    properties.setProperty(Configuration.METADATA_DIR_PATH, stacks);
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, version);
-    properties.setProperty(Configuration.OS_VERSION_KEY, "centos5");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, sharedResourcesDir);
+    if (!properties.containsKey(Configuration.SERVER_PERSISTENCE_TYPE_KEY)) {
+      properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
+    }
+
+    if (!properties.containsKey(Configuration.METADATA_DIR_PATH)) {
+      properties.setProperty(Configuration.METADATA_DIR_PATH, stacks);
+    }
+
+    if (!properties.containsKey(Configuration.SERVER_VERSION_FILE)) {
+      properties.setProperty(Configuration.SERVER_VERSION_FILE, version);
+    }
+
+    if (!properties.containsKey(Configuration.OS_VERSION_KEY)) {
+      properties.setProperty(Configuration.OS_VERSION_KEY, "centos5");
+    }
+
+    if (!properties.containsKey(Configuration.SHARED_RESOURCES_DIR_KEY)) {
+      properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, sharedResourcesDir);
+    }
 
     try {
       install(new BeanDefinitionsCachingTestControllerModule(properties));
@@ -88,6 +101,14 @@ public class InMemoryDefaultTestModule extends AbstractModule {
     }
   }
 
+  /**
+   * Gets the properties that will be used to initialize the system. If a
+   * property is placed here which {@link #configure()} also sets, then
+   * {@link #configure()} will not set it, and instead take the property that
+   * the test has set.
+   *
+   * @return
+   */
   public Properties getProperties() {
     return properties;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
new file mode 100644
index 0000000..0c45347
--- /dev/null
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
@@ -0,0 +1,192 @@
+/**
+ * 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.
+ */
+package org.apache.ambari.server.state.stack;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.internal.UpgradeResourceProvider.ConfigurationPackBuilder;
+import org.apache.ambari.server.orm.GuiceJpaInitializer;
+import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
+import org.apache.ambari.server.state.StackId;
+import org.apache.ambari.server.state.StackInfo;
+import org.apache.ambari.server.state.stack.UpgradePack.ProcessingComponent;
+import org.apache.ambari.server.state.stack.upgrade.ClusterGrouping;
+import org.apache.ambari.server.state.stack.upgrade.ClusterGrouping.ExecuteStage;
+import org.apache.ambari.server.state.stack.upgrade.ConfigureTask;
+import org.apache.ambari.server.state.stack.upgrade.Direction;
+import org.apache.ambari.server.state.stack.upgrade.Grouping;
+import org.apache.ambari.server.state.stack.upgrade.Task;
+import org.apache.ambari.server.state.stack.upgrade.Task.Type;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
+
+import junit.framework.Assert;
+
+/**
+ * Tests that for every upgrade pack found, that all referenced configuration
+ * IDs exist in the {@code config-upgrade.xml} which will be used/created.
+ */
+public class ConfigUpgradeValidityTest {
+
+  private static final Logger LOG = LoggerFactory.getLogger(ConfigUpgradeValidityTest.class);
+
+  private Injector injector;
+  private AmbariMetaInfo ambariMetaInfo;
+
+  private int validatedConfigCount = 0;
+
+  @Before
+  public void before() throws Exception {
+    validatedConfigCount = 0;
+
+    // ensure that we use the real stacks
+    InMemoryDefaultTestModule testModule = new InMemoryDefaultTestModule();
+    testModule.getProperties().put(Configuration.METADATA_DIR_PATH, "src/main/resources/stacks");
+
+    injector = Guice.createInjector(testModule);
+    injector.getInstance(GuiceJpaInitializer.class);
+
+    ambariMetaInfo = injector.getInstance(AmbariMetaInfo.class);
+  }
+
+  @After
+  public void teardown() {
+    injector.getInstance(PersistService.class).stop();
+  }
+
+  /**
+   * Tests that every ID specified in an upgrade pack actually exists in the
+   * created {@link ConfigUpgradePack}.
+   *
+   * @throws Exception
+   */
+  @Test
+  public void testConfigurationDefinitionsExist() throws Exception {
+    Collection<StackInfo> stacks = ambariMetaInfo.getStacks();
+    Assert.assertFalse(stacks.isEmpty());
+
+    for( StackInfo stack : stacks ){
+      if (!stack.isActive()) {
+        LOG.info("Skipping configuration validity test for {}", new StackId(stack));
+        continue;
+      }
+
+      Map<String, UpgradePack> upgradePacks = ambariMetaInfo.getUpgradePacks(stack.getName(), stack.getVersion());
+      for (String key : upgradePacks.keySet()) {
+        UpgradePack upgradePack = upgradePacks.get(key);
+        StackId sourceStack = new StackId(stack);
+
+        ConfigUpgradePack configUpgradePack = ConfigurationPackBuilder.build(upgradePack,
+            sourceStack);
+
+        // do configure tasks in the group section
+        List<Grouping> groups = upgradePack.getGroups(Direction.UPGRADE);
+        for( Grouping group : groups ){
+          if( group instanceof ClusterGrouping ){
+            ClusterGrouping clusterGrouping = (ClusterGrouping)group;
+            if( null != clusterGrouping.executionStages ){
+              for( ExecuteStage executionStage : clusterGrouping.executionStages ){
+                if( executionStage.task.getType() == Type.CONFIGURE ){
+                  ConfigureTask configureTask = (ConfigureTask) executionStage.task;
+                  assertIdDefinitionExists(configureTask.id, configUpgradePack, upgradePack,
+                      sourceStack);
+                }
+              }
+            }
+          }
+        }
+
+        // do tasks in the "processing" section
+        Map<String, Map<String, ProcessingComponent>> tasks = upgradePack.getTasks();
+        for( Map<String,ProcessingComponent> value : tasks.values() ){
+          for( ProcessingComponent processingComponent : value.values() ){
+            if (null != processingComponent.preTasks) {
+              for (Task preTask : processingComponent.preTasks) {
+                if (preTask.getType() == Type.CONFIGURE) {
+                  ConfigureTask configureTask = (ConfigureTask) preTask;
+                  assertIdDefinitionExists(configureTask.id, configUpgradePack, upgradePack,
+                      sourceStack);
+                }
+              }
+
+              if (null != processingComponent.tasks) {
+                for (Task task : processingComponent.tasks) {
+                  if (task.getType() == Type.CONFIGURE) {
+                    ConfigureTask configureTask = (ConfigureTask) task;
+                    assertIdDefinitionExists(configureTask.id, configUpgradePack, upgradePack,
+                        sourceStack);
+                  }
+                }
+              }
+
+              if (null != processingComponent.postTasks) {
+                for (Task postTask : processingComponent.postTasks) {
+                  if (postTask.getType() == Type.CONFIGURE) {
+                    ConfigureTask configureTask = (ConfigureTask) postTask;
+                    assertIdDefinitionExists(configureTask.id, configUpgradePack, upgradePack,
+                        sourceStack);
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+
+    // make sure we actually checked a bunch of configs :)
+    Assert.assertTrue(validatedConfigCount > 100);
+  }
+
+  /**
+   * Asserts that an ID exists in a {@link ConfigUpgradePack}, throwing an
+   * informative message if it does not.
+   *
+   * @param id
+   * @param configUpgradePack
+   * @param upgradePack
+   * @param sourceStackId
+   */
+  private void assertIdDefinitionExists(String id, ConfigUpgradePack configUpgradePack,
+      UpgradePack upgradePack, StackId sourceStackId) {
+    Assert.assertNotNull(id);
+
+    if (configUpgradePack.enumerateConfigChangesByID().containsKey(id)) {
+      validatedConfigCount++;
+
+      LOG.info("Validated {} from upgrade pack {} for {}", id, upgradePack.getTargetStack(),
+          sourceStackId);
+
+      return;
+    }
+
+    Assert.fail(String.format("Missing %s in upgrade from %s to %s (%s)", id, sourceStackId,
+        upgradePack.getTargetStack(), upgradePack.getType()));
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/config-upgrade.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/config-upgrade.xml
index cb034d0..44f9e02 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/config-upgrade.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/config-upgrade.xml
@@ -40,6 +40,12 @@
             <type>hdfs-site</type>
             <set key="myproperty" value="mynewvalue"/>
           </definition>
+
+          <definition xsi:type="configure" id="hdp_2_2_0_nn_pre_upgrade">
+            <type>hdfs-site</type>
+            <set key="myproperty" value="mynewvalue"/>
+          </definition>
+
           <definition xsi:type="configure" id="hdp_2_1_1_nn_test">
             <type>hdfs-site</type>
             <key>myproperty</key>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test.xml
index 623b45c..6dc143a 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test.xml
@@ -146,7 +146,7 @@
           <task xsi:type="restart-task" />
         </upgrade>
         <post-upgrade>
-          <task xsi:type="configure" id="2.2.0" />
+          <task xsi:type="configure" id="hdp_2_1_1_zookeeper_new_config_type" />
         </post-upgrade>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1209a706/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_partial.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_partial.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_partial.xml
index 4932e92..23e8bbc 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_partial.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_partial.xml
@@ -159,7 +159,7 @@
           <task xsi:type="restart-task" />
         </upgrade>
         <post-upgrade>
-          <task xsi:type="configure" id="2.2.0" />
+          <task xsi:type="configure" id="hdp_2_1_1_zookeeper_new_config_type" />
         </post-upgrade>
       </component>
     </service>


Mime
View raw message