liu bin created YARN-11990:
------------------------------
Summary: [Federation] Router-issued RM delegation token breaks
application submission
Key: YARN-11990
URL: https://issues.apache.org/jira/browse/YARN-11990
Project: Hadoop YARN
Issue Type: Bug
Components: federation, resourcemanager, router
Affects Versions: 3.4.0
Reporter: liu bin
The Router's getDelegationToken ([YARN-11158]) mints RM_DELEGATION_TOKENs
itself, signed by the RouterDelegationTokenSecretManager whose master keys live
in the FederationStateStore. However, when such a token is used as designed —
added to the application submission credentials — submission deterministically
fails: RMAppManager hands the credentials to DelegationTokenRenewer, which
renews every managed token at submission, and renewal fails with InvalidToken:
Unable to find master key for keyId=..., aborting the submission.
Root cause:
1. The token's service is either empty (the Router does not set it) or points
at the Router, so RMDelegationTokenIdentifier.Renewer#getRmClient never matches
the local RM.
2. Its fallback, ClientRMProxy.createRMProxy(conf, ...), builds the proxy from
the RM's own configuration — the renew/cancel RPC goes right back to the RM,
never to the Router that signed the token.
3. The RM's RMDelegationTokenSecretManager has no knowledge of the Router's
master keys, so the renewal cannot succeed.
This is not theoretical: Oozie's built-in yarnRM credential provider
(YarnRMCredentials) calls YarnClient#getRMDelegationToken and adds the returned
token to the action credentials, hitting exactly this path in Router-fronted
secure deployments.
Proposed fix:
1. Router: set the token's service to the Router's own address when issuing it.
2. RM: in Renewer#getRmClient, when the token's service does not match the
local RM, build the ApplicationClientProtocol proxy against the token's service
address (the Router) — this fixes both renewal and cancellation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]