You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Junda Yang <yo...@gmail.com> on 2019/03/13 23:54:48 UTC

Calling sudo to remove temp cfg file failed

Hi all,

Is there any reason Airflow needs to call *sudo* to remove the temp cfg
file based on
https://github.com/apache/airflow/blob/5a303ebbc572cee7c9c30be84ebf625357360d4b/airflow/task_runner/base_task_runner.py#L155-#L160
?
We use a non-root user to run Airflow worker and I think the command called
in the on_finish function failed.

If there is indeed a reason to use *sudo*, is there any recommendation /
configuration I can utilize to run Airflow worker as a non-root user?

Thanks,
Junda

Re: Calling sudo to remove temp cfg file failed

Posted by Deng Xiaodong <xd...@gmail.com>.
Tried to have a quick check. Seems sudo will only be required when you use
the “run_as_user” option in your task.

May you confirm if it’s the case? If yes, possibly try not to use
“run_as_user” if you don’t have root permission.


XD


On Thu, Mar 14, 2019 at 07:55 Junda Yang <yo...@gmail.com> wrote:

> Hi all,
>
> Is there any reason Airflow needs to call *sudo* to remove the temp cfg
> file based on
>
> https://github.com/apache/airflow/blob/5a303ebbc572cee7c9c30be84ebf625357360d4b/airflow/task_runner/base_task_runner.py#L155-#L160
> ?
> We use a non-root user to run Airflow worker and I think the command called
> in the on_finish function failed.
>
> If there is indeed a reason to use *sudo*, is there any recommendation /
> configuration I can utilize to run Airflow worker as a non-root user?
>
> Thanks,
> Junda
>