ソースを参照

Merge branch 'branch-feature-AMBARI-18634' into trunk

Nate Cole 9 年 前
コミット
6e3e3cb226

+ 6 - 0
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java

@@ -1450,6 +1450,12 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
     Map<String, String> requestParams = new HashMap<String, String>();
     requestParams.put("command", function);
 
+    // !!! it is unclear the implications of this on rolling or express upgrade.  To turn
+    // this off, set "allow-retry" to false in the Upgrade Pack group
+    if (allowRetry && context.getType() == UpgradeType.HOST_ORDERED) {
+      requestParams.put(KeyNames.COMMAND_RETRY_ENABLED, Boolean.TRUE.toString().toLowerCase());
+    }
+
     s_commandExecutionHelper.get().addExecutionCommandsToStage(actionContext, stage, requestParams);
 
     request.addStages(Collections.singletonList(stage));

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java

@@ -170,7 +170,6 @@ public class HostOrderGrouping extends Grouping {
         StageWrapper startWrapper = new StageWrapper(StageWrapper.Type.RESTART, String.format("Start on %s", hostName),
             upgradeTasks.toArray(new TaskWrapper[upgradeTasks.size()]));
 
-
         String message = String.format("Please acknowledge that host %s has been prepared.", hostName);
 
         ManualTask mt = new ManualTask();
@@ -187,6 +186,7 @@ public class HostOrderGrouping extends Grouping {
         wrappers.add(manualWrapper);
         // !!! TODO install_packages for hdp and conf-select changes.  Hopefully these will no-op.
         wrappers.add(startWrapper);
+
       }
 
       return wrappers;

+ 0 - 3
ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java

@@ -129,14 +129,12 @@ public abstract class AbstractUpgradeCatalog implements UpgradeCatalog {
    */
   protected static final String AUTHENTICATED_USER_NAME = "ambari-upgrade";
 
-  private static final String CONFIGURATION_TYPE_HIVE_SITE = "hive-site";
   private static final String CONFIGURATION_TYPE_HDFS_SITE = "hdfs-site";
   public static final String CONFIGURATION_TYPE_RANGER_HBASE_PLUGIN_PROPERTIES = "ranger-hbase-plugin-properties";
   public static final String CONFIGURATION_TYPE_RANGER_KNOX_PLUGIN_PROPERTIES = "ranger-knox-plugin-properties";
   public static final String CONFIGURATION_TYPE_RANGER_HIVE_PLUGIN_PROPERTIES = "ranger-hive-plugin-properties";
 
   private static final String PROPERTY_DFS_NAMESERVICES = "dfs.nameservices";
-  private static final String PROPERTY_HIVE_SERVER2_AUTHENTICATION = "hive.server2.authentication";
   public static final String PROPERTY_RANGER_HBASE_PLUGIN_ENABLED = "ranger-hbase-plugin-enabled";
   public static final String PROPERTY_RANGER_KNOX_PLUGIN_ENABLED = "ranger-knox-plugin-enabled";
   public static final String PROPERTY_RANGER_HIVE_PLUGIN_ENABLED = "ranger-hive-plugin-enabled";
@@ -404,7 +402,6 @@ public abstract class AbstractUpgradeCatalog implements UpgradeCatalog {
 
           for (PropertyInfo property : properties) {
             String configType = ConfigHelper.fileNameToConfigType(property.getFilename());
-            Config clusterConfigs = cluster.getDesiredConfigByType(configType);
             PropertyUpgradeBehavior upgradeBehavior = property.getPropertyAmbariUpgradeBehavior();
 
             if (property.isDeleted()) {

+ 15 - 2
ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/host-upgrade-2.5.xml

@@ -81,18 +81,31 @@
     verification task, and the "start" commands as indicated by the processing element.
     If we get to the point where we need additional flexibility, it will get added at that time.
     -->
-    <group xsi:type="host-order" name="HOST_ORDER" title="Upgrade All Hosts"/>
-         
+    <group xsi:type="host-order" name="HOST_ORDER" title="Upgrade All Hosts">
+      <skippable>true</skippable>
+    </group>
+    
     <!--
     After processing this group, the user-specified Kerberos descriptor will be updated to work with
     the new stack-level Kerberos descriptor.
     -->
     <group xsi:type="cluster" name="UPDATE_KERBEROS_DESCRIPTORS" title="Update Kerberos Descriptors">
+      <condition xsi:type="security" type="kerberos"/>
       <execute-stage title="Update the user-specified Kerberos descriptor">
         <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.UpgradeUserKerberosDescriptor"/>
       </execute-stage>
     </group>
 
+    <group xsi:type="cluster" name="ALL_HOST_OPS" title="Finalize Hosts">
+      <scope>COMPLETE</scope>
+      <execute-stage title="Update remaining HDP stack to {{version}}">
+        <task xsi:type="execute">
+          <script>scripts/ru_set_all.py</script>
+          <function>actionexecute</function>
+        </task>
+      </execute-stage>
+    </group>
+
     <group xsi:type="cluster" name="FINALIZE_PRE_CHECK" title="Finalize {{direction.text.proper}} Pre-Check">
       <direction>UPGRADE</direction>