Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-19448

Role Command Order For HOU Is Different For Some Components

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.5.0
    • 2.5.0
    • ambari-server
    • None

    Description

      As of AMBARI-19435, HOU now uses the role command ordering to determine how to start components on a host. This is because some components (such as NodeManager and DataNode) require their masters to be online first in order to register correctly. When co-located on the same host, masters and slaves must be started in the correct order.

      However, some ordering defined on the stack will not work for HOU. For example, the stack doesn't enforce that NameNode start before DataNode. This is because in a normal start command, the DataNode can wait for up to 30 minutes for the NameNode to come online. During an upgrade, the upgrade logic waits to ensure that the DataNode is online and registered before moving on. Since the role ordering allows DataNode to start first, this start always fails during an upgrade.

      There are several ways of implementing this:

      • "Adding a new section to existing role_command_order.json
        {
          "_comment" : "Record format:",
          "_comment" : "blockedRole-blockedCommand: [blockerRole1-blockerCommand1 ... ",
          "general_deps" : {
          ...
          },
          "host_ordered_upgrade" : {
              "DATANODE-START": ["NAMENODE-START"]
          }
        
      • "JSON directly in the upgrade pack
        <group xsi:type="host-order" name="HOST_ORDER" title="Upgrade All Hosts">
          <skippable>true</skippable>
          <role-command-order>
            <section name="general_deps">
              "DATANODE-START": ["NAMENODE-START"]
            </section>
          </role-command-order>
        </group>
        
      • "A separate JSON file to keep the JSON out of the upgrade pack and the stack role_command_order.json
        <group xsi:type="host-order" name="HOST_ORDER" title="Upgrade All Hosts">
          <skippable>true</skippable>
          <role-command-order file="host-upgrades-role-command-order.json/>
        </group>
        

      Attachments

        1. AMBARI-19448.patch
          26 kB
          Jonathan Hurley
        2. AMBARI-19448.patch
          26 kB
          Jonathan Hurley

        Issue Links

          Activity

            People

              jonathanhurley Jonathan Hurley
              jonathanhurley Jonathan Hurley
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: