marclamberti commented on pull request #9371:
URL: https://github.com/apache/airflow/pull/9371#issuecomment-659400129
I got an issue yesterday with git-sync and the K8s worker pods.
If we specify:
AIRFLOW__KUBERNETES__RUN_AS_USER="50000" in values, git-sync ends up with
the following error in K8s worker pods:
`E0715 21:13:28.459419 9 main.go:347] "msg"="failed to sync repo,
aborting" "error"="error running command: exit status 128: { stdout: \"\",
stderr: \"Cloning into '/git'...\\nNo user exists for uid 50000\\r\\nfatal:
Could not read from remote repository.\\n\\nPlease make sure you have the
correct access rights\\nand the repository exists.\\n\" }" `
Nonetheless, git-sync along with the webserver and scheduler of Airflow
works since the env var AIRFLOW__KUBERNETES__RUN_AS_USER="50000" **isn't set**
which is not the case in the K8S worker pods.
To fix this, we have to define
AIRFLOW__KUBERNETES__GIT_SYNC_RUN_AS_USER="65553" corresponding to the
default uid of git-sync.
Also, we have to set the UID to 50000 otherwise Airflow fails with the
following error:
```
Traceback (most recent call last):
File "/home/airflow/.local/bin/airflow", line 23, in <module>
import argcomplete
ModuleNotFoundError: No module named 'argcomplete'
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]