cansjt commented on issue #21087:
URL: https://github.com/apache/airflow/issues/21087#issuecomment-1024424323


   After downgrading to 2.1.0, logs showed another error (but reported with the 
log level INFO!)
   ```
   {"asctime": "2022-01-25 17:24:18",
    "levelname": "INFO",
    "process": 1,
    "name": "airflow.executors.kubernetes_executor.KubernetesExecutor",
    "funcName": "_adopt_completed_pods",
    "lineno": 740,
    "message": "Failed to adopt pod <removed>. Reason: (403)
   Reason: Forbidden
   HTTP response headers: HTTPHeaderDict({'Audit-Id': '<removed>', 
'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 
'X-Content-Type-Options': 'nosniff', 'Date': 'Tue, 25 Jan 2022 17:24:18 GMT', 
'Content-Length': '414'})
   HTTP response body: {
     \"kind\":\"Status\",
     \"apiVersion\":\"v1\",
     \"metadata\":{},
     \"status\":\"Failure\",
     \"message\":\"pods \\\"<removed>\\\" is forbidden: User 
\\\"system:serviceaccount:<removed>\\\" cannot patch resource \\\"pods\\\" in 
API group \\\"\\\" in the namespace \\\"<removed>\\\"\",
     \"reason\":\"Forbidden\",
     \"details\":{\"name\":\"<removed>\",
                      \"kind\":\"pods\"},
     \"code\":403}
   
   "}
   ```
   Giving the missing permission to the scheduler's service account fixed the 
issue. Still need to upgrade the `cncf.kubernetes` provider again to be sure 
this was the root cause of the reported error or not.


-- 
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