[
https://issues.apache.org/jira/browse/YARN-3705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14597176#comment-14597176
]
Masatake Iwasaki commented on YARN-3705:
----------------------------------------
bq. ResourceManager#handleTransitionToStandBy is expected to be used only when
automatic failover enabled.
This was not true. It checks not {{isAutomaticFailoverEnabled}} but
{{isHAEnabled}}. {{ResourceManager#handleTransitionToStandBy}} is no-op if
{{RMContext#isHAEnabled}} is false.
{code}
public void handleTransitionToStandBy() {
if (rmContext.isHAEnabled()) {
try {
// Transition to standby and reinit active services
LOG.info("Transitioning RM to Standby mode");
transitionToStandby(true);
adminService.resetLeaderElection();
return;
} catch (Exception e) {
LOG.fatal("Failed to transition RM to Standby mode.");
ExitUtil.terminate(1, e);
}
}
}
{code}
It seems strange that doing nothing in transitionToStandby if {{isHAEnable}} is
false affects tests for HA...
> forcemanual transitionToStandby in RM-HA automatic-failover mode should
> change elector state
> --------------------------------------------------------------------------------------------
>
> Key: YARN-3705
> URL: https://issues.apache.org/jira/browse/YARN-3705
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Masatake Iwasaki
> Assignee: Masatake Iwasaki
> Attachments: YARN-3705.001.patch, YARN-3705.002.patch,
> YARN-3705.003.patch
>
>
> Executing {{rmadmin -transitionToStandby --forcemanual}} in
> automatic-failover.enabled mode makes ResouceManager standby while keeping
> the state of ActiveStandbyElector. It should make elector to quit and rejoin
> in order to enable other candidates to promote, otherwise forcemanual
> transition should not be allowed in automatic-failover mode in order to avoid
> confusion.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)