Yiming Jin created YARN-12027:
---------------------------------
Summary: Multi-node scheduling
(ResourceUsageMultiNodeLookupPolicy) places or reserves containers on
DECOMMISSIONING nodes, which can leave AMs stuck in ACCEPTED
Key: YARN-12027
URL: https://issues.apache.org/jira/browse/YARN-12027
Project: Hadoop YARN
Issue Type: Bug
Components: capacity scheduler, resourcemanager
Affects Versions: 3.4.0, 3.3.0, 3.2.0
Reporter: Yiming Jin
With multi-node placement and the resource-usage sorting policy enabled, nodes
in the DECOMMISSIONING state (graceful decommission) are still offered for new
placements.
A draining node runs few containers, and its total resource is shrunk to what
it currently runs. It therefore sorts first when nodes are ordered by allocated
resource, emptiest first. It can never fit a new container, so the allocator
either reserves on it or skips it. When it skips it, allocation can stop for
that pass. Pending AMs behind it can stay in ACCEPTED even though other nodes
have free capacity.
*Steps to reproduce (these follow the unit test in the patch)*
1. Enable multi-node placement with ResourceUsageMultiNodeLookupPolicy.
2. Register two NMs (8 GB, 8 vCores each).
3. Run an app on NM1 so it has allocated resources.
4. Send RMNodeEventType.GRACEFUL_DECOMMISSION for NM1 and wait for state
DECOMMISSIONING.
5. Re-sort the cluster nodes. NM1 is still in the sorted set for the partition,
and a new AM request can be placed or reserved on it.
Expected: DECOMMISSIONING nodes are not candidates for new placements or
reservations.
Actual: they are in the sorted candidate set, and the allocator can reserve on
one or skip it.
*Proposed fix*
- ResourceUsageMultiNodeLookupPolicy.addAndRefreshNodesSet excludes nodes whose
RMNode state is DECOMMISSIONING. The sort order is otherwise unchanged.
- RegularContainerAllocator skips a draining node when it is not allocating a
reserved container, so it never places or reserves a new container there. When
fulfilling a reserved container on a node that has started draining, it
releases the reservation (QUEUE_SKIPPED).
- Tests cover the sorter excluding draining nodes, no AM placement on a
draining node, and the reservation release.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]