ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [1/4] ambari git commit: AMBARI-18232. Upgrade Execute: add xsd for upgrade packs (ncole)
Date Wed, 26 Oct 2016 18:54:14 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 6ee7f9fde -> 86d24d75c


http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/resources/upgrade-pack.xsd
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/upgrade-pack.xsd b/ambari-server/src/main/resources/upgrade-pack.xsd
new file mode 100644
index 0000000..b02d941
--- /dev/null
+++ b/ambari-server/src/main/resources/upgrade-pack.xsd
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.1">
+  <xs:annotation>
+    <xs:documentation>
+    This document describes the schema for an Upgrade Pack
+    </xs:documentation>
+  </xs:annotation>
+
+  <!-- FIXME case sensitivity -->
+  <xs:simpleType name="upgrade-kind-type">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="ROLLING" />
+      <xs:enumeration value="NON_ROLLING" />
+    </xs:restriction>
+  </xs:simpleType>
+  
+  <xs:simpleType name="host-target-type">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="master" />
+      <xs:enumeration value="any" />
+      <xs:enumeration value="all" />
+      <xs:enumeration value="first" />
+    </xs:restriction>
+  </xs:simpleType>
+  
+  <xs:simpleType name="direction-type">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="UPGRADE" />
+      <xs:enumeration value="DOWNGRADE" />
+    </xs:restriction>
+  </xs:simpleType>
+  
+  <xs:simpleType name="scope-type">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="COMPLETE" />
+      <xs:enumeration value="PARTIAL" />
+      <xs:enumeration value="ANY" />
+    </xs:restriction>
+  </xs:simpleType>
+  
+  <xs:complexType name="prerequisite-check-type">
+    <xs:sequence>
+      <xs:element name="check" minOccurs="0" maxOccurs="unbounded" />
+      <xs:element name="configuration" minOccurs="0">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
+              <xs:complexType>
+                <xs:simpleContent>
+                  <xs:extension base="xs:string">
+                    <xs:attribute name="name" />
+                  </xs:extension>
+                </xs:simpleContent>
+              </xs:complexType>
+            </xs:element>
+            <xs:element name="check-properties" minOccurs="0" maxOccurs="unbounded">
+            </xs:element>
+          </xs:sequence>
+          <xs:attribute name="name" />
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  
+  <xs:complexType name="abstract-group-type" abstract="true">
+    <xs:sequence>
+      <xs:element name="scope" type="scope-type" minOccurs="0" />
+      <xs:element name="direction" type="direction-type" minOccurs="0" />
+      <xs:element name="service-check" minOccurs="0" type="xs:boolean" />
+      <xs:element name="skippable" minOccurs="0" type="xs:boolean" />
+      <xs:element name="supports-auto-skip-failure" minOccurs="0" type="xs:boolean" />
+      <xs:element name="allow-retry" minOccurs="0"  type="xs:boolean"/>
+      <xs:element name="add-after-group" minOccurs="0" />
+      <xs:element name="add-after-group-entry" minOccurs="0" />
+      
+      <xs:element name="parallel-scheduler" minOccurs="0">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="max-degree-of-parallelism" minOccurs="0" />
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      
+      <xs:element name="service" minOccurs="0" maxOccurs="unbounded">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="component" minOccurs="1" maxOccurs="unbounded" />
+          </xs:sequence>
+          <xs:attribute name="name" />
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" />
+    <xs:attribute name="title" type="xs:string" />
+  </xs:complexType>
+  
+  <xs:complexType name="cluster">
+    <xs:complexContent>
+      <xs:extension base="abstract-group-type">
+        <xs:sequence>
+          <xs:element name="execute-stage" minOccurs="1" maxOccurs="unbounded">
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="colocated">
+    <xs:complexContent>
+      <xs:extension base="abstract-group-type">
+        <xs:sequence>
+          <xs:element name="batch">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="percent" />
+                <xs:element name="summary" minOccurs="0" />                
+                <xs:element name="message" />
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="service-check">
+    <xs:complexContent>
+      <xs:extension base="abstract-group-type">
+        <xs:sequence>
+          <xs:element name="priority" minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="service" minOccurs="1" maxOccurs="unbounded" />
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="exclude" minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="service" minOccurs="1" maxOccurs="unbounded" />
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="start">
+    <xs:complexContent>
+      <xs:extension base="abstract-group-type">
+        <xs:sequence />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="stop">
+    <xs:complexContent>
+      <xs:extension base="abstract-group-type">
+        <xs:sequence />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="restart">
+    <xs:complexContent>
+      <xs:extension base="abstract-group-type">
+        <xs:sequence />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="update-stack">
+    <xs:complexContent>
+      <xs:extension base="cluster">
+        <xs:sequence />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="abstract-task-type" abstract="true">
+    <xs:sequence>
+      <xs:element name="scope" minOccurs="0" type="scope-type" />
+      <xs:element name="summary" minOccurs="0" />
+    </xs:sequence>
+    <xs:attribute name="sequential" use="optional" type="xs:boolean" />
+  </xs:complexType>
+  
+  <xs:complexType name="restart-task">
+    <xs:complexContent>
+      <xs:extension base="abstract-task-type">
+        <xs:sequence />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="abstract-server-task-type">
+    <xs:complexContent>
+      <xs:extension base="abstract-task-type">
+        <xs:sequence>
+          <xs:element name="message" minOccurs="0" maxOccurs="unbounded" />
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="server_action">
+    <xs:complexContent>
+      <xs:extension base="abstract-server-task-type">
+        <xs:sequence />
+        <xs:attribute name="class" />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="manual">
+    <xs:complexContent>
+      <xs:extension base="abstract-server-task-type">
+        <xs:sequence />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="execute">
+    <xs:complexContent>
+      <xs:extension base="abstract-server-task-type">
+        <xs:sequence>
+          <xs:element name="script" />
+          <xs:element name="function" />
+        </xs:sequence>
+        <xs:attribute name="hosts" use="optional" type="host-target-type" />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="configure">
+    <xs:complexContent>
+      <xs:extension base="abstract-server-task-type">
+        <xs:sequence />
+        <xs:attribute name="id" use="required"/>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="configure_function">
+    <xs:complexContent>
+      <xs:extension base="abstract-task-type">
+        <xs:sequence />
+        <xs:attribute name="hosts" use="optional" type="host-target-type" />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="order-type">
+    <xs:sequence>
+      <xs:element name="group" minOccurs="1" maxOccurs="unbounded" />
+    </xs:sequence>
+  </xs:complexType>
+  
+  <xs:complexType name="upgrade-directive-type">
+    <xs:sequence>
+      <xs:element name="task" type="abstract-task-type" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+  
+  <xs:complexType name="processing-type">
+    <xs:sequence>
+      <xs:element name="service" minOccurs="1" maxOccurs="unbounded">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="component" minOccurs="1" maxOccurs="unbounded">
+              <xs:complexType>
+                <xs:sequence>
+                  <xs:element name="pre-upgrade" type="upgrade-directive-type" minOccurs="0"/>
+                  <xs:element name="pre-downgrade" type="upgrade-directive-type" minOccurs="0" />
+                  <xs:element name="upgrade" type="upgrade-directive-type" minOccurs="1" />
+                  <xs:element name="post-upgrade" type="upgrade-directive-type" minOccurs="0" />
+                  <xs:element name="post-downgrade" type="upgrade-directive-type" minOccurs="0" />
+                </xs:sequence>
+                <!-- 
+                Want to use <xs:assert> to make sure that a pre-downgrade is available i
+                pre-upgrade is set.  It appears as though that is not yet available to jaxb.
+                 -->
+                <xs:attribute name="name" />
+              </xs:complexType>
+            </xs:element>
+          </xs:sequence>
+          <xs:attribute name="name" />
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  
+  <xs:complexType name="upgrade-path-type">
+    <xs:sequence>
+      <xs:element name="intermediate-stack">
+        <xs:complexType>
+          <xs:sequence />
+          <xs:attribute name="version" />
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  
+
+  <xs:element name="upgrade">
+    <xs:annotation>
+      <xs:documentation>
+      This is the root element of an Upgrade Pack
+      </xs:documentation>
+    </xs:annotation>
+    
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element name="target" type="xs:string" />
+        <xs:element name="target-stack" type="xs:string" />
+        <xs:element name="skip-failures" minOccurs="0" type="xs:boolean" />
+        <xs:element name="skip-service-check-failures" minOccurs="0" type="xs:boolean" />
+        <xs:element name="downgrade-allowed" minOccurs="0" type="xs:boolean" />
+        <xs:element name="type" type="upgrade-kind-type" />
+        <xs:element name="prerequisite-checks" type="prerequisite-check-type" minOccurs="0" />
+        <xs:element name="upgrade-path" type="upgrade-path-type" minOccurs="0" /> 
+        <xs:element name="order" type="order-type" />
+        <xs:element name="processing" type="processing-type">
+          <xs:unique name="unique-by-service">
+            <xs:annotation>
+              <xs:documentation>Ensures that the element "processing" does not have duplicate services</xs:documentation>
+            </xs:annotation>
+            <xs:selector xpath="service" />
+            <xs:field xpath="@name" />
+          </xs:unique>
+          <xs:unique name="unique-by-component">
+            <xs:annotation>
+              <xs:documentation>Ensures that the element "processing" does not have duplicate components</xs:documentation>
+            </xs:annotation>
+            <xs:selector xpath="service/component" />
+            <xs:field xpath="@name" />
+          </xs:unique>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  
+
+
+</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java
index 6d3bcaa..6c81c61 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java
@@ -22,6 +22,8 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
+import java.io.File;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -33,6 +35,7 @@ import java.util.Set;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
+import org.apache.ambari.server.stack.ModuleFileUnmarshaller;
 import org.apache.ambari.server.state.stack.UpgradePack.PrerequisiteCheckConfig;
 import org.apache.ambari.server.state.stack.UpgradePack.ProcessingComponent;
 import org.apache.ambari.server.state.stack.upgrade.ClusterGrouping;
@@ -48,11 +51,16 @@ import org.apache.ambari.server.state.stack.upgrade.StopGrouping;
 import org.apache.ambari.server.state.stack.upgrade.Task;
 import org.apache.ambari.server.state.stack.upgrade.UpdateStackGrouping;
 import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.FileFilterUtils;
+import org.apache.commons.io.filefilter.IOFileFilter;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -67,6 +75,8 @@ public class UpgradePackTest {
   private Injector injector;
   private AmbariMetaInfo ambariMetaInfo;
 
+  private static final Logger LOG = LoggerFactory.getLogger(UpgradePackTest.class);
+
   @Before
   public void before() throws Exception {
     injector = Guice.createInjector(new InMemoryDefaultTestModule());
@@ -81,6 +91,58 @@ public class UpgradePackTest {
   }
 
   @Test
+  public void findAndValidateUpgradePacks() throws Exception {
+
+    IOFileFilter filter = new IOFileFilter() {
+      @Override
+      public boolean accept(File dir, String name) {
+        return false;
+      }
+
+      @Override
+      public boolean accept(File file) {
+        // file has the folder named 'upgrades', ends with '.xml' and is NOT 'config-upgrade.xml'
+        if (file.getAbsolutePath().contains("upgrades") &&
+            file.getAbsolutePath().endsWith(".xml") &&
+            !file.getAbsolutePath().contains("config-upgrade.xml")) {
+
+          return true;
+        }
+
+        return false;
+      }
+    };
+
+    List<File> files = new ArrayList<>();
+
+    files.addAll(FileUtils.listFiles(new File("src/main/resources/stacks"), filter,
+      FileFilterUtils.directoryFileFilter()));
+
+    files.addAll(FileUtils.listFiles(new File("src/test/resources/stacks"), filter,
+        FileFilterUtils.directoryFileFilter()));
+
+    files.addAll(FileUtils.listFiles(new File("src/test/resources/stacks_with_upgrade_cycle"), filter,
+        FileFilterUtils.directoryFileFilter()));
+
+    ModuleFileUnmarshaller unmarshaller = new ModuleFileUnmarshaller();
+
+    for (File file : files) {
+      String fileContent = FileUtils.readFileToString(file, "UTF-8");
+
+      // these things must be in upgrade packs for them to work anyway
+      if (fileContent.contains("<upgrade") && fileContent.contains("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"")) {
+        if (!fileContent.contains("xsi:noNamespaceSchemaLocation=\"upgrade-pack.xsd\"")) {
+          String msg = String.format("File %s appears to be an upgrade pack, but does not define 'upgrade-pack.xsd' as its schema",
+              file.getAbsolutePath());
+          Assert.fail(msg);
+        } else {
+          unmarshaller.unmarshal(UpgradePack.class, file, true);
+        }
+      }
+    }
+  }
+
+  @Test
   public void testExistence() throws Exception {
     Map<String, UpgradePack> upgrades = ambariMetaInfo.getUpgradePacks("foo", "bar");
     assertTrue(upgrades.isEmpty());

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml
index fd798da..6ac5b68 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.4.*</target>
   <target-stack>HDP-2.4.0</target-stack>
   <type>ROLLING</type>
@@ -70,6 +70,11 @@
       <service name="HBASE">
         <component>REGIONSERVER</component>
       </service>
+      <batch>
+        <percent>1</percent>
+        <summary>Summary</summary>
+        <message>Message</message>
+      </batch>
     </group>
   </order>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_bucket_test.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_bucket_test.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_bucket_test.xml
index 085ba25..8ca9df4 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_bucket_test.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_bucket_test.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.6</target-stack>
   <type>ROLLING</type>
@@ -49,16 +49,21 @@
             <message>pre-manual 1 task to run on all hosts</message>
           </task>
           <task xsi:type="execute">
-            <command>pre-ls 1 to run on all hosts</command>
+            <script>foo</script>
+            <function>bar1</function>
           </task>
           <task xsi:type="execute">
-            <command>pre-ls 2 to run on all hosts</command>
+            <script>foo</script>
+            <function>bar1</function>
           </task>
         </pre-upgrade>
         
+        <upgrade />
+        
         <post-upgrade>
           <task xsi:type="execute">
-            <command>post-ls 1 to run on all hosts</command>
+            <script>foo</script>
+            <function>bar1</function>
           </task>
           <task xsi:type="manual">
             <message>post-manual 1 task to run on all hosts</message>
@@ -67,13 +72,16 @@
             <message>post-manual 2 task to run on all hosts</message>
           </task>
           <task xsi:type="execute">
-            <command>post-ls 2 to run on all hosts</command>
+            <script>foo</script>
+            <function>bar2</function>
           </task>
           <task xsi:type="execute">
-            <command>post-ls 3 to run on all hosts</command>
+            <script>foo</script>
+            <function>bar3</function>
           </task>
           <task xsi:type="execute">
-            <command>post-ls 4 to run on all hosts</command>
+            <script>foo</script>
+            <function>bar4</function>
           </task>
           
         </post-upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_direction.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_direction.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_direction.xml
index 76e42d7..92fd0b2 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_direction.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_direction.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.5</target-stack>
   <type>ROLLING</type>
@@ -92,7 +92,7 @@
           <task xsi:type="restart-task" />
         </upgrade>
         <post-upgrade>
-          <task xsi:type="configure" />
+          <task xsi:type="configure" id="foo" />
         </post-upgrade>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_grouping_rolling.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_grouping_rolling.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_grouping_rolling.xml
index b8b5511..292976a 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_grouping_rolling.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_grouping_rolling.xml
@@ -15,15 +15,15 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.0</target-stack>
   <type>ROLLING</type>
 
   <order>
     <group xsi:type="stop" name="STOP_ZOOKEEPER" title="Stop ZooKeeper">
-      <skippable>true</skippable>
       <service-check>false</service-check>
+      <skippable>true</skippable>
       <service name="ZOOKEEPER">
         <component>ZOOKEEPER_SERVER</component>
       </service>
@@ -46,4 +46,4 @@
       </component>
     </service>
   </processing>
-</upgrade>  
\ No newline at end of file
+</upgrade>  

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_nonrolling_new_stack.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_nonrolling_new_stack.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_nonrolling_new_stack.xml
index c79c8e7..789df2e 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_nonrolling_new_stack.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_nonrolling_new_stack.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.0.1</target-stack>
   <type>NON_ROLLING</type>
@@ -59,9 +59,9 @@
 
     <group xsi:type="stop" name="STOP_HIGH_LEVEL_SERVICE_COMPONENTS" title="Stop Components for High-Level Services">
       <direction>UPGRADE</direction>
+      <service-check>false</service-check>
       <skippable>true</skippable>
       <supports-auto-skip-failure>false</supports-auto-skip-failure>
-      <service-check>false</service-check>
       <parallel-scheduler/>
 
       <service name="FLUME">
@@ -166,8 +166,8 @@
 
     <group xsi:type="stop" name="STOP_LOW_LEVEL_SERVICE_COMPONENTS" title="Stop Components for Core Services">
       <direction>UPGRADE</direction>
-      <skippable>true</skippable>
       <service-check>false</service-check>
+      <skippable>true</skippable>
       <supports-auto-skip-failure>false</supports-auto-skip-failure>
       <parallel-scheduler/>
 
@@ -281,7 +281,6 @@
       <supports-auto-skip-failure>false</supports-auto-skip-failure>
       <parallel-scheduler/>
       <service name="ZOOKEEPER">
-        <service-check>false</service-check>
         <component>ZOOKEEPER_SERVER</component>
         <component>ZOOKEEPER_CLIENT</component>
       </service>
@@ -322,13 +321,14 @@
     </group>
 
     <group xsi:type="cluster" name="HDFS_LEAVE_SAFEMODE" title="HDFS - Wait to leave Safemode">
+      <direction>UPGRADE</direction>
       <service-check>false</service-check>
       <skippable>true</skippable>
       <supports-auto-skip-failure>false</supports-auto-skip-failure>
-      <direction>UPGRADE</direction>
 
       <execute-stage service="HDFS" component="NAMENODE" title="Wait to leave Safemode">
-        <task xsi:type="execute" hosts="all" summary="Wait for NameNode to leave Safemode">
+        <task xsi:type="execute" hosts="all">
+          <summary>Wait for NameNode to leave Safemode</summary>
           <script>scripts/namenode.py</script>
           <function>wait_for_safemode_off</function>
         </task>
@@ -393,8 +393,9 @@
     </group>
 
     <group name="SERVICE_CHECK" title="All Service Checks" xsi:type="service-check">
-      <skippable>true</skippable>
       <direction>UPGRADE</direction>
+      <skippable>true</skippable>
+      
       <priority>
         <service>HDFS</service>
         <service>YARN</service>
@@ -442,7 +443,8 @@
       <skippable>true</skippable>
       <supports-auto-skip-failure>false</supports-auto-skip-failure>
       <execute-stage service="OOZIE" component="OOZIE_SERVER" title="Upgrade Oozie Database">
-        <task xsi:type="execute" hosts="any" summary="Upgrading the Oozie database and creating a new sharelib">
+        <task xsi:type="execute" hosts="any">
+          <summary>Upgrading the Oozie database and creating a new sharelib</summary>
           <script>scripts/oozie_server_upgrade.py</script>
           <function>upgrade_oozie_database_and_sharelib</function>
         </task>
@@ -454,7 +456,8 @@
       <direction>DOWNGRADE</direction>
       <skippable>true</skippable>
       <execute-stage service="OOZIE" component="OOZIE_SERVER" title="Downgrade Oozie ShareLib">
-        <task xsi:type="execute" hosts="any" summary="Upgrading the Oozie database and creating a new sharelib">
+        <task xsi:type="execute" hosts="any">
+          <summary>Upgrading the Oozie database and creating a new sharelib</summary>
           <script>scripts/oozie_server_upgrade.py</script>
           <function>create_sharelib</function>
         </task>
@@ -527,12 +530,6 @@
         <component>STORM_UI_SERVER</component>
         <component>DRPC_SERVER</component>
       </service>
-
-      <execute-stage service="STORM" component="DRPC_SERVER" title="Rebuild Storm Topology">
-        <task xsi:type="manual">
-          <message>Please rebuild your topology using the new Storm version dependencies and resubmit it using the newly created jar.</message>
-        </task>
-      </execute-stage>
     </group>
 
     <group xsi:type="restart" name="SLIDER" title="Slider">
@@ -809,14 +806,16 @@
     <service name="OOZIE">
       <component name="OOZIE_SERVER">
         <pre-upgrade>
-          <task xsi:type="execute" hosts="any" summary="Upgrading the Oozie database and creating a new sharelib">
+          <task xsi:type="execute" hosts="any">
+            <summary>Upgrading the Oozie database and creating a new sharelib</summary>
             <script>scripts/oozie_server_upgrade.py</script>
             <function>upgrade_oozie_database_and_sharelib</function>
           </task>
         </pre-upgrade>
 
         <pre-downgrade>
-          <task xsi:type="execute" hosts="any" summary="Create a new sharelib">
+          <task xsi:type="execute" hosts="any">
+            <summary>Create a new sharelib</summary>
             <script>scripts/oozie_server_upgrade.py</script>
             <function>create_sharelib</function>
           </task>
@@ -866,12 +865,14 @@
     <service name="STORM">
       <component name="NIMBUS">
         <pre-upgrade>
-          <task xsi:type="execute" summary="Removing Storm data from ZooKeeper">
+          <task xsi:type="execute">
+            <summary>Removing Storm data from ZooKeeper</summary>
             <script>scripts/storm_upgrade.py</script>
             <function>delete_storm_zookeeper_data</function>
           </task>
 
-          <task xsi:type="execute" summary="Removing local Storm data">
+          <task xsi:type="execute">
+            <summary>Removing local Storm data</summary>
             <script>scripts/storm_upgrade.py</script>
             <function>delete_storm_local_data</function>
           </task>
@@ -882,12 +883,14 @@
             <message>Before continuing, please deactivate and kill any currently running topologies.</message>
           </task>
 
-          <task xsi:type="execute" summary="Removing Storm data from ZooKeeper">
+          <task xsi:type="execute">
+            <summary>Removing Storm data from ZooKeeper</summary>
             <script>scripts/storm_upgrade.py</script>
             <function>delete_storm_zookeeper_data</function>
           </task>
 
-          <task xsi:type="execute" summary="Removing local Storm data">
+          <task xsi:type="execute">
+            <summary>Removing local Storm data</summary>
             <script>scripts/storm_upgrade.py</script>
             <function>delete_storm_local_data</function>
           </task>
@@ -900,7 +903,8 @@
 
       <component name="SUPERVISOR">
         <pre-upgrade>
-          <task xsi:type="execute" summary="Removing local Storm data">
+          <task xsi:type="execute">
+            <summary>Removing local Storm data</summary>
             <script>scripts/storm_upgrade.py</script>
             <function>delete_storm_local_data</function>
           </task>
@@ -911,7 +915,8 @@
             <message>Before continuing, please deactivate and kill any currently running topologies.</message>
           </task>
 
-          <task xsi:type="execute" summary="Removing local Storm data">
+          <task xsi:type="execute">
+            <summary>Removing local Storm data</summary>
             <script>scripts/storm_upgrade.py</script>
             <function>delete_storm_local_data</function>
           </task>
@@ -924,7 +929,8 @@
 
       <component name="STORM_UI_SERVER">
         <pre-upgrade>
-          <task xsi:type="execute" summary="Removing local Storm data">
+          <task xsi:type="execute">
+            <summary>Removing local Storm data</summary>
             <script>scripts/storm_upgrade.py</script>
             <function>delete_storm_local_data</function>
           </task>
@@ -937,7 +943,8 @@
 
       <component name="DRPC_SERVER">
         <pre-upgrade>
-          <task xsi:type="execute" summary="Removing local Storm data">
+          <task xsi:type="execute">
+            <summary>Removing local Storm data</summary>
             <script>scripts/storm_upgrade.py</script>
             <function>delete_storm_local_data</function>
           </task>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_server_action_test.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_server_action_test.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_server_action_test.xml
index b6c49e9..b9733b6 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_server_action_test.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_server_action_test.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.0</target-stack>
   <type>ROLLING</type>
@@ -54,12 +54,21 @@
       </execute-stage>
 
       <execute-stage title="Calculating Properties">
-        <task xsi:type="server_action" summary="Calculating Properties" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation" />
+        <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation" />
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Calculating HDFS Properties">
-        <task xsi:type="server_action" summary="Calculating Properties" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation" />
+        <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation" />
       </execute-stage>
 
     </group>
   </order>
-</upgrade>
\ No newline at end of file
+  
+  <processing>
+    <service name="ZOOKEEPER">
+      <component name="ZOOKEEPER_SERVER">
+        <upgrade />
+      </component>
+    </service>
+  </processing>
+  
+</upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/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 6dc143a..88bb73e 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
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.0</target-stack>
   <type>ROLLING</type>
@@ -46,7 +46,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Confirm 2">
@@ -121,7 +122,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Execute HDFS Finalize">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Save Cluster State" service="" component="">
@@ -155,7 +157,8 @@
       <component name="NAMENODE">
         <pre-upgrade>
           <task xsi:type="execute" hosts="master">
-            <command>su - {hdfs-user} -c 'dosomething'</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
           <task xsi:type="configure" id="hdp_2_1_1_nn_pre_upgrade" />
           <task xsi:type="manual">
@@ -167,7 +170,8 @@
         </upgrade>
         <post-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </post-upgrade>
       </component>
@@ -188,17 +192,21 @@
       <component name="RESOURCEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
       <component name="NODEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
           <task xsi:type="configure" id="hdp_2_1_1_nm_pre_upgrade"/>
         </pre-upgrade>
+        <upgrade />
       </component>
     </service>
     
@@ -214,6 +222,7 @@
           <task xsi:type="configure" id="hdp_2_1_1_hive_server_conditions"/>
           <task xsi:type="configure" id="hdp_2_1_1_hive_server_conditions_skip"/>
         </pre-upgrade>
+        <upgrade />
        </component>
      </service>
 
@@ -223,12 +232,14 @@
           <!-- This is important, do not remove it since UpgradeHelperTest.java :
           testUpgradeWithMultipleTasksWithMultipleHostTypes() asserts
           that these tasks each run on their own stage. -->
-          <task xsi:type="execute" hosts="all" sequential="true" summary="Shut down all Oozie servers">
+          <task xsi:type="execute" hosts="all" sequential="true">
+            <summary>Shut down all Oozie servers</summary>
             <script>scripts/oozie_server.py</script>
             <function>stop</function>
           </task>
 
-          <task xsi:type="execute" hosts="any" sequential="true" summary="Upgrading the Oozie database and creating a new sharelib">
+          <task xsi:type="execute" hosts="any" sequential="true">
+            <summary>Upgrading the Oozie database and creating a new sharelib</summary>
             <script>scripts/oozie_server_upgrade.py</script>
             <function>upgrade_oozie_database_and_sharelib</function>
           </task>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_checks.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_checks.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_checks.xml
index 85736e1..c6d8bbe 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_checks.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_checks.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.0</target-stack>
   <type>ROLLING</type>
@@ -43,7 +43,7 @@
   </prerequisite-checks>
 
   <order>
-    <group xsi:type="cluster" name="PRE_CLUSTER" title="Pre Upgrade" stage="pre">
+    <group xsi:type="cluster" name="PRE_CLUSTER" title="Pre Upgrade">
       <execute-stage title="Confirm 1">
         <task xsi:type="manual">
           <message>Foo</message>
@@ -51,7 +51,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Confirm 2">
@@ -113,7 +114,7 @@
     </group>
     
     
-    <group xsi:type="cluster" name="POST_CLUSTER" title="Finalize Upgrade" stage="post">
+    <group xsi:type="cluster" name="POST_CLUSTER" title="Finalize Upgrade">
       <execute-stage title="Confirm Finalize">
         <task xsi:type="manual">
           <message>Please confirm you are ready to finalize</message>
@@ -121,7 +122,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Execute HDFS Finalize">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Save Cluster State" service="" component="">
@@ -155,7 +157,8 @@
       <component name="NAMENODE">
         <pre-upgrade>
           <task xsi:type="execute" hosts="master">
-            <command>su - {hdfs-user} -c 'dosomething'</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
           <task xsi:type="configure" id="hdp_2_1_1_nn_pre_upgrade"/>
           <task xsi:type="manual">
@@ -167,7 +170,8 @@
         </upgrade>
         <post-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </post-upgrade>
       </component>
@@ -187,16 +191,20 @@
       <component name="RESOURCEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
       <component name="NODEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
     </service>
   </processing>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_nonrolling.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_nonrolling.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_nonrolling.xml
index 9f57ca8..36f8062 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_nonrolling.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_nonrolling.xml
@@ -16,8 +16,7 @@
    limitations under the License.
 -->
 
-
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.3</target-stack>
   <type>NON_ROLLING</type>
@@ -35,8 +34,9 @@
   </prerequisite-checks>
   <order>
     <group xsi:type="cluster" name="PRE_CLUSTER" title="Prepare Upgrade">
-      <skippable>true</skippable>
       <direction>UPGRADE</direction>
+      <skippable>true</skippable>
+      
       <execute-stage service="YARN" component="RESOURCEMANAGER" title="Stop YARN Queues">
         <task xsi:type="manual">
           <message>Before continuing, please stop all YARN queues.</message>
@@ -46,8 +46,9 @@
 
     <group xsi:type="stop" name="Stop High-Level Daemons" title="Stop Daemons for High-Level Services">
       <direction>UPGRADE</direction>
-      <skippable>true</skippable>
       <service-check>false</service-check>
+      <skippable>true</skippable>
+      
       <parallel-scheduler></parallel-scheduler>
 
       <service name="YARN">
@@ -75,8 +76,9 @@
 
     <group xsi:type="stop" name="Stop Low-Level Daemons" title="Stop Daemons for Low-Level Services">
       <direction>UPGRADE</direction>
-      <skippable>true</skippable>
       <service-check>false</service-check>
+      <skippable>true</skippable>
+      
       <parallel-scheduler></parallel-scheduler>
 
       <service name="HDFS">
@@ -126,7 +128,6 @@
 
     <group xsi:type="restart" name="ZOOKEEPER" title="Zookeeper">
       <service name="ZOOKEEPER">
-        <service-check>false</service-check>
         <component>ZOOKEEPER_SERVER</component>
         <component>ZOOKEEPER_CLIENT</component>
       </service>
@@ -187,4 +188,13 @@
       </execute-stage>
     </group>
   </order>
-</upgrade>
\ No newline at end of file
+  
+  <processing>
+    <service name="ZOOKEEPER">
+      <component name="ZOOKEEPER_SERVER">
+        <upgrade />
+      </component>
+    </service>
+  </processing>
+  
+</upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/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 23e8bbc..5d8ef01 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
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.0</target-stack>
   <type>ROLLING</type>
@@ -47,7 +47,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Confirm 2">
@@ -131,7 +132,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Execute HDFS Finalize">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Save Cluster State" service="" component="">
@@ -168,7 +170,8 @@
       <component name="NAMENODE">
         <pre-upgrade>
           <task xsi:type="execute" hosts="master">
-            <command>su - {hdfs-user} -c 'dosomething'</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
           <task xsi:type="configure" id="hdp_2_1_1_nn_pre_upgrade" />
           <task xsi:type="manual">
@@ -180,7 +183,8 @@
         </upgrade>
         <post-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </post-upgrade>
       </component>
@@ -201,17 +205,21 @@
       <component name="RESOURCEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
       <component name="NODEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
           <task xsi:type="configure" id="hdp_2_1_1_nm_pre_upgrade"/>
         </pre-upgrade>
+        <upgrade />
       </component>
     </service>
     
@@ -225,6 +233,7 @@
           <task xsi:type="configure" id="hdp_2_1_1_set_transport_mode"/>
           <task xsi:type="configure" id="hdp_2_1_1_hive_server_foo"/>
         </pre-upgrade>
+        <upgrade />
        </component>
      </service>
 
@@ -234,12 +243,14 @@
           <!-- This is important, do not remove it since UpgradeHelperTest.java :
           testUpgradeWithMultipleTasksWithMultipleHostTypes() asserts
           that these tasks each run on their own stage. -->
-          <task xsi:type="execute" hosts="all" sequential="true" summary="Shut down all Oozie servers">
+          <task xsi:type="execute" hosts="all" sequential="true">
+            <summary>Shut down all Oozie servers</summary>
             <script>scripts/oozie_server.py</script>
             <function>stop</function>
           </task>
 
-          <task xsi:type="execute" hosts="any" sequential="true" summary="Upgrading the Oozie database and creating a new sharelib">
+          <task xsi:type="execute" hosts="any" sequential="true">
+            <summary>Upgrading the Oozie database and creating a new sharelib</summary>
             <script>scripts/oozie_server_upgrade.py</script>
             <function>upgrade_oozie_database_and_sharelib</function>
           </task>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_to_new_stack.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_to_new_stack.xml b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_to_new_stack.xml
index bfd994e..91770fb 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_to_new_stack.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_to_new_stack.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.4</target-stack>
   <type>ROLLING</type>
@@ -45,7 +45,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Confirm 2">
@@ -111,7 +112,8 @@
       
       <execute-stage service="HDFS" component="NAMENODE" title="Execute HDFS Finalize">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       
@@ -122,7 +124,8 @@
       
       <execute-stage title="Run On All {{version}}">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
     </group>
@@ -151,7 +154,8 @@
       <component name="NAMENODE">
         <pre-upgrade>
           <task xsi:type="execute" hosts="master">
-            <command>su - {hdfs-user} -c 'dosomething'</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
           <task xsi:type="configure" id="hdp_2_1_1_nn_test"/>
           <task xsi:type="manual">
@@ -163,7 +167,8 @@
         </upgrade>
         <post-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </post-upgrade>
       </component>
@@ -184,16 +189,20 @@
       <component name="RESOURCEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
       <component name="NODEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
     </service>
     
@@ -207,6 +216,7 @@
 
           <task xsi:type="configure" id="hdp_2_1_1_test_properties"/>
         </pre-upgrade>
+        <upgrade />
        </component>
      </service>    
   </processing>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml
index 5d41754..021c73a 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade    xsi:noNamespaceSchemaLocation="upgrade-pack.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <target>2.2.*</target>
   <target-stack>HDP-2.2.0</target-stack>
   <type>ROLLING</type>
@@ -45,7 +45,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Confirm 2">
@@ -136,7 +137,7 @@
           <task xsi:type="restart-task" />
         </upgrade>
         <post-upgrade>
-          <task xsi:type="configure" />
+          <task xsi:type="configure" id="foo" />
         </post-upgrade>
       </component>
     </service>
@@ -145,12 +146,10 @@
       <component name="NAMENODE">
         <pre-upgrade>
           <task xsi:type="execute" hosts="master">
-            <command>su - {hdfs-user} -c 'dosomething'</command>
-          </task>
-          <task xsi:type="configure">
-            <type>hdfs-site</type>
-            <set key="myproperty" value="mynewvalue"/>
+            <script>foo</script>
+            <function>list</function>
           </task>
+          <task xsi:type="configure" id="foo" />
           <task xsi:type="manual">
             <message>{{direction.verb.proper}} your database</message>
           </task>
@@ -160,7 +159,8 @@
         </upgrade>
         <post-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </post-upgrade>
       </component>
@@ -181,16 +181,20 @@
       <component name="RESOURCEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
       <component name="NODEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
     </service>
     
@@ -201,20 +205,8 @@
             <summary>HiveServer Port Availability</summary>
             <message>The HiveServer port will now change to 10010 if hive is using a binary transfer mode or 10011 if hive is using an http transport mode. You can use "netstat -anp | grep 1001[01]" to determine if the port is available on each of following HiveServer host(s): {{hosts.all}}. If the port is not available, the process using it must be terminated.</message>
           </task>
-
-          <task xsi:type="configure">
-            <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>
-          </task>
         </pre-upgrade>
+        <upgrade />
        </component>
      </service>    
   </processing>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_15388.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_15388.xml b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_15388.xml
index 4e8e2ea..d1dc62d 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_15388.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_15388.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.4.*</target>
   <target-stack>HDP-2.4.0</target-stack>
   <type>ROLLING</type>
@@ -45,7 +45,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Confirm 2">
@@ -91,8 +92,8 @@
     </group>
 
     <group name="SERVICE_CHECK1" title="All Service Checks" xsi:type="service-check">
-      <skippable>true</skippable>
       <direction>UPGRADE</direction>
+      <skippable>true</skippable>
       <priority>
         <service>ZOOKEEPER</service>
         <service>HDFS</service>
@@ -147,7 +148,7 @@
           <task xsi:type="restart-task" />
         </upgrade>
         <post-upgrade>
-          <task xsi:type="configure" />
+          <task xsi:type="configure" id="foo" />
         </post-upgrade>
       </component>
     </service>
@@ -156,11 +157,10 @@
       <component name="NAMENODE">
         <pre-upgrade>
           <task xsi:type="execute" hosts="master">
-            <command>su - {hdfs-user} -c 'dosomething'</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
-          <task xsi:type="configure">
-            <type>hdfs-site</type>
-            <set key="myproperty" value="mynewvalue"/>
+          <task xsi:type="configure" id="foo">
           </task>
           <task xsi:type="manual">
             <message>{{direction.verb.proper}} your database</message>
@@ -171,7 +171,8 @@
         </upgrade>
         <post-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </post-upgrade>
       </component>
@@ -192,16 +193,20 @@
       <component name="RESOURCEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
       <component name="NODEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
     </service>
 
@@ -212,20 +217,8 @@
             <summary>HiveServer Port Availability</summary>
             <message>The HiveServer port will now change to 10010 if hive is using a binary transfer mode or 10011 if hive is using an http transport mode. You can use "netstat -anp | grep 1001[01]" to determine if the port is available on each of following HiveServer host(s): {{hosts.all}}. If the port is not available, the process using it must be terminated.</message>
           </task>
-
-          <task xsi:type="configure">
-            <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>
-          </task>
         </pre-upgrade>
+        <upgrade />
        </component>
      </service>
   </processing>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
index b56b935..273f619 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*.*</target>
   <target-stack>HDP-2.2.1</target-stack>
   <type>ROLLING</type>
@@ -43,7 +43,7 @@
   </prerequisite-checks>
 
   <order>
-    <group xsi:type="cluster" name="PRE_CLUSTER" title="Pre Upgrade" stage="pre">
+    <group xsi:type="cluster" name="PRE_CLUSTER" title="Pre Upgrade">
       <execute-stage title="Confirm 1">
         <task xsi:type="manual">
           <message>Foo</message>
@@ -51,7 +51,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Confirm 2">
@@ -119,7 +120,7 @@
     </group>
     
     
-    <group xsi:type="cluster" name="POST_CLUSTER" title="Finalize Upgrade" stage="post">
+    <group xsi:type="cluster" name="POST_CLUSTER" title="Finalize Upgrade">
       <execute-stage title="Confirm Finalize">
         <task xsi:type="manual">
           <message>Please confirm you are ready to finalize</message>
@@ -127,7 +128,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Execute HDFS Finalize">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Save Cluster State" service="" component="">
@@ -161,7 +163,8 @@
       <component name="NAMENODE">
         <pre-upgrade>
           <task xsi:type="execute" hosts="master">
-            <command>su - {hdfs-user} -c 'dosomething'</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
           <task xsi:type="configure" id="hdp_2_2_0_nn_pre_upgrade"/>
           <task xsi:type="manual">
@@ -173,7 +176,8 @@
         </upgrade>
         <post-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </post-upgrade>
       </component>
@@ -193,16 +197,20 @@
       <component name="RESOURCEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
       <component name="NODEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade />
       </component>
     </service>
   </processing>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_skip_failures.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_skip_failures.xml b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_skip_failures.xml
index b2c4b93..dae1c16 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_skip_failures.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_skip_failures.xml
@@ -15,8 +15,9 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*</target>
+  <target-stack>HDP-2.2</target-stack>
   <skip-failures>true</skip-failures>
   <skip-service-check-failures>true</skip-service-check-failures>
   <type>ROLLING</type>
@@ -67,7 +68,7 @@
           <task xsi:type="restart-task"/>
         </upgrade>
         <post-upgrade>
-          <task xsi:type="configure"/>
+          <task xsi:type="configure" id="foo" />
         </post-upgrade>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml b/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml
index e339399..075cb13 100644
--- a/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml
+++ b/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*</target>
   <target-stack>HDP-2.2.0</target-stack>
   <type>ROLLING</type>
@@ -69,6 +69,10 @@
       <service name="HBASE">
         <component>REGIONSERVER</component>
       </service>
+      <batch>
+        <percent>20</percent>
+        <message>Message</message>
+      </batch>
     </group>
   </order>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/upgrades/upgrade_test_15388.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/upgrades/upgrade_test_15388.xml b/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/upgrades/upgrade_test_15388.xml
index 9e935ec..905def5 100644
--- a/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/upgrades/upgrade_test_15388.xml
+++ b/ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/upgrades/upgrade_test_15388.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
   <target>2.2.*</target>
   <target-stack>HDP-2.2.0</target-stack>
   <type>ROLLING</type>
@@ -45,7 +45,8 @@
       </execute-stage>
       <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS">
         <task xsi:type="execute">
-          <command>ls</command>
+          <script>foo</script>
+          <function>list</function>
         </task>
       </execute-stage>
       <execute-stage title="Confirm 2">
@@ -91,8 +92,8 @@
     </group>
 
     <group name="SERVICE_CHECK1" title="All Service Checks" xsi:type="service-check">
-      <skippable>true</skippable>
       <direction>UPGRADE</direction>
+      <skippable>true</skippable>
       <priority>
         <service>ZOOKEEPER</service>
         <service>HDFS</service>
@@ -147,7 +148,7 @@
           <task xsi:type="restart-task" />
         </upgrade>
         <post-upgrade>
-          <task xsi:type="configure" />
+          <task xsi:type="configure" id="foo"  />
         </post-upgrade>
       </component>
     </service>
@@ -156,11 +157,10 @@
       <component name="NAMENODE">
         <pre-upgrade>
           <task xsi:type="execute" hosts="master">
-            <command>su - {hdfs-user} -c 'dosomething'</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
-          <task xsi:type="configure">
-            <type>hdfs-site</type>
-            <set key="myproperty" value="mynewvalue"/>
+          <task xsi:type="configure" id="foo">
           </task>
           <task xsi:type="manual">
             <message>{{direction.verb.proper}} your database</message>
@@ -171,7 +171,8 @@
         </upgrade>
         <post-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </post-upgrade>
       </component>
@@ -192,16 +193,24 @@
       <component name="RESOURCEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade>
+          <task xsi:type="restart-task" />
+        </upgrade>
       </component>
       <component name="NODEMANAGER">
         <pre-upgrade>
           <task xsi:type="execute">
-            <command>ls</command>
+            <script>foo</script>
+            <function>list</function>
           </task>
         </pre-upgrade>
+        <upgrade>
+          <task xsi:type="restart-task" />
+        </upgrade>
       </component>
     </service>
 
@@ -213,19 +222,10 @@
             <message>The HiveServer port will now change to 10010 if hive is using a binary transfer mode or 10011 if hive is using an http transport mode. You can use "netstat -anp | grep 1001[01]" to determine if the port is available on each of following HiveServer host(s): {{hosts.all}}. If the port is not available, the process using it must be terminated.</message>
           </task>
 
-          <task xsi:type="configure">
-            <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>
+          <task xsi:type="configure" id="foo" >
           </task>
         </pre-upgrade>
+        <upgrade />
        </component>
      </service>
   </processing>


Mime
View raw message