[ 
https://issues.apache.org/jira/browse/YARN-5566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15439340#comment-15439340
 ] 

Junping Du commented on YARN-5566:
----------------------------------

Hi [~rkanter], thanks for reporting this issue. Unhealthy state is not a 
expected one in StatusUpdateWhenHealthyTransition if node's initial state is 
decommissioning. I am not exactly sure how update changes like attached patch 
could help here but there is indeed something wrong with our latest change.
First, I think this is a regression issue caused by YARN-4676 
(https://github.com/apache/hadoop/commit/0da69c324dee9baab0f0b9700db1cc5b623f8421#diff-29befd5a1922a2121b26766561f9e447).
 You can see we were removing the logic of detecting of app finish in 
StatusUpdateWhenHealthyTransition. We should add it back (in branch-2.9).
I assume you do your test in bit of branch-2. Isn't it?
Another issue we should fix here (in either 2.8 or 2.9) is: if NM keep 
reporting unhealthy after it is in decommissioning stage, then it will only 
ends up as decommissioning without get chance to move to decommissioned.
{noformat}
      if (!remoteNodeHealthStatus.getIsNodeHealthy()) {
        LOG.info("Node " + rmNode.nodeId +
            " reported UNHEALTHY with details: " +
            remoteNodeHealthStatus.getHealthReport());
        // if a node in decommissioning receives an unhealthy report,
        // it will keep decommissioning.
        if (isNodeDecommissioning) {
          return NodeState.DECOMMISSIONING;
        } else {
{noformat}
Instead of return NodeState.DECOMMISSIONING directly, we should also check 
running apps on that node and return decommissioned if no running apps. Isn't?

> client-side NM graceful decom doesn't trigger when jobs finish
> --------------------------------------------------------------
>
>                 Key: YARN-5566
>                 URL: https://issues.apache.org/jira/browse/YARN-5566
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager
>    Affects Versions: 2.8.0
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>         Attachments: YARN-5566.001.patch
>
>
> I was testing the client-side NM graceful decommission and noticed that it 
> was always waiting for the timeout, even if all jobs running on that node (or 
> even the cluster) had already finished.
> For example:
> # JobA is running with at least one container on NodeA
> # User runs client-side decom on NodeA at 5:00am with a timeout of 3 hours 
> --> NodeA enters DECOMMISSIONING state
> # JobA finishes at 6:00am and there are no other jobs running on NodeA
> # User's client reaches the timeout at 8:00am, and forcibly decommissions 
> NodeA
> NodeA should have decommissioned at 6:00am.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to