You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/08/13 13:40:00 UTC

[jira] [Updated] (YARN-11984) Federation mock sub-cluster and router do not stop cleanly on SIGTERM

     [ https://issues.apache.org/jira/browse/YARN-11984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated YARN-11984:
----------------------------------
    Labels: pull-request-available  (was: )

> Federation mock sub-cluster and router do not stop cleanly on SIGTERM
> ---------------------------------------------------------------------
>
>                 Key: YARN-11984
>                 URL: https://issues.apache.org/jira/browse/YARN-11984
>             Project: Hadoop YARN
>          Issue Type: Test
>          Components: test
>            Reporter: Jose Luis López
>            Priority: Minor
>              Labels: pull-request-available
>
> Goal: the federation mock sub-cluster and mock router terminate cleanly when
> the test harness stops them.
>  
> TestMockSubCluster and TestMockRouter are not tests - they have no @Test
> methods. TestFederationSubCluster launches them as separate JVMs through
> JavaProcess and stops them with Process#destroy, i.e. SIGTERM, which runs
> shutdown hooks. Neither registers one, so the JVM dies with its
> ResourceManagers, NodeManagers and Router services still running: no service
> stop, and the ZooKeeper session and state directories are left to expire on
> their own.
>  
> Fix:
> * Register a CompositeServiceShutdownHook in both, before init/start, so a
> failure part-way through startup still tears down whatever came up.
> Router#main already does exactly this; TestMockRouter starts the Router
> directly and skips it.
> * TestMockRouter also closes the ZooKeeper-backed FederationStateStore it
> hands to FederationStateStoreFacade, which never closes it. That hook runs
> at lower priority than the Router's - ShutdownHookManager runs highest
> first - so the Router is fully stopped before its store goes away.
>  
> This is not a mini-cluster leak (see YARN-11983): these clusters are meant to
> outlive the method that starts them. The defect is unclean termination.
>  
> Test-scope only; no production code is touched.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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