Savonitar commented on code in PR #28639:
URL: https://github.com/apache/flink/pull/28639#discussion_r3536780852


##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java:
##########
@@ -427,6 +430,14 @@ public CompletableFuture<RegistrationResponse> 
registerJobMaster(
                             jobMasterIdFuture,
                             (JobMasterGateway jobMasterGateway, JobMasterId 
leadingJobMasterId) -> {
                                 if (Objects.equals(leadingJobMasterId, 
jobMasterId)) {
+                                    // Register with the delegation token 
manager first; a
+                                    // provider failure rejects this 
registration so the job
+                                    // never starts without the tokens it 
requires.
+                                    try {
+                                        
delegationTokenManager.registerJob(jobId, jobConfiguration);
+                                    } catch (Exception e) {
+                                        return new 
RegistrationResponse.Failure(e);

Review Comment:
   > oncall guys
   
   I'm something of an on-call guy myself...
   
   Yes, it is logged in 
https://github.com/apache/flink/pull/28639/changes#diff-d32f89982ba30269ab9438d993d9deb3b29d046792b6cc5ea35a277eaacfb287R629
  
(flink-runtime/src/main/java/org/apache/flink/runtime/security/token/DefaultDelegationTokenManager.java
 registerJob() 
   ```
   LOG.error("Failed to register job {}", jobId, e);
   ```
   
   Example:
   ```
   ERROR org.apache.flink.runtime.security.token.DefaultDelegationTokenManager 
- Failed to register job 50bfee4c5d12d0154333bc23410c92c3q9
     java.lang.IllegalArgumentException
         at ...ExceptionThrowingDelegationTokenProvider.registerJob(...)
         at 
...DefaultDelegationTokenManager.registerJob(DefaultDelegationTokenManager.java:617)
   ```
   
   And moreover, we already have the failing **provider** in stack trace. 
   The rollback path has its own `ERROR log too ("Failed to roll back 
registration of job {}")`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to