Jonathan Hurley created AMBARI-19448:
----------------------------------------

             Summary: Role Command Order For HOU Is Different For Some 
Components
                 Key: AMBARI-19448
                 URL: https://issues.apache.org/jira/browse/AMBARI-19448
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.5.0
            Reporter: Jonathan Hurley
            Assignee: Jonathan Hurley
            Priority: Critical
             Fix For: 2.5.0


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:

- 
{code:title="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"]
  }
{code}

- 
{code:title="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>
{code}

- {code:title="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>
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to