You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Parhy (Jira)" <ji...@apache.org> on 2020/10/15 19:32:00 UTC

[jira] [Comment Edited] (AIRFLOW-1973) Scheduler log dirs permission issue since airflow 1.9.0

    [ https://issues.apache.org/jira/browse/AIRFLOW-1973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17214940#comment-17214940 ] 

Parhy edited comment on AIRFLOW-1973 at 10/15/20, 7:31 PM:
-----------------------------------------------------------

We are running airflow on k8s. We have version 1.10.10 and we saw the same issue yesterday for the first time.

/usr/local/airflow/logs/scheduler/2020-10-15/ directory was owned by root and scheduler was unable to write to this folder. We also see a mixture file/folder ownerships. Some are owned by root and some by the application user. (airflow in our case)

Both our scheduler and webserver pods run as airflow(app) user.

We had previously 1.10.3 and we never see this issue and all the files were owned by airflow.

Please let me know if there is a fix for this in the future version?

 


was (Author: sparklearner):
We are running airflow on k8s. We have version 1.10.10 and we saw the same issue yesterday for the first time.

/usr/local/airflow/logs/scheduler/2020-10-15/ directory was owned by root and scheduler was unable to write to this folder. We also see a mixture file/folder ownerships. Some are owned by root and some by the application user. (airflow in our case)

We had previously 1.10.3 and we never see this issue and all the files were owned by airflow.

Please let me know if there is a fix for this in the future version?

 

> Scheduler log dirs permission issue since airflow 1.9.0
> -------------------------------------------------------
>
>                 Key: AIRFLOW-1973
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1973
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: scheduler, webserver
>    Affects Versions: 1.9.0
>            Reporter: Ikar Pohorsky
>            Priority: Major
>
> I'm having a weird (cannot safely reproduce) issue with scheduler log permissions since version 1.9.0.
> *Problem description:*
> sometimes (not always) it happens that a new log dir for scheduler is created with root set as owner (and group) which leads to the scheduler being unable to write to the logs and therefor no task is scheduled and no task is executed.
> Example:
> {code}
> ubuntu@airflow-admin-master:~$ ls -l airflow/logs/scheduler/
> total 24
> drwxr-xr-x 3 ubuntu ubuntu 4096 Jan  3 13:46 2018-01-03
> drwxr-xr-x 3 ubuntu ubuntu 4096 Jan  4 07:16 2018-01-04
> drwxr-xr-x 4 ubuntu ubuntu 4096 Jan  5 12:08 2018-01-05
> drwxr-xr-x 2 root   root   4096 Jan  6 00:00 2018-01-06  # fail
> drwxr-xr-x 4 ubuntu ubuntu 4096 Jan  7 00:00 2018-01-07
> drwxr-xr-x 4 ubuntu ubuntu 4096 Jan  8 00:00 2018-01-08
> lrwxrwxrwx 1 ubuntu ubuntu   46 Jan  8 00:00 latest -> /home/ubuntu/airflow/logs/scheduler/2018-01-08
> {code}
> the other machine:
> {code}
> ubuntu@airflow-client-master:~$ ls -l airflow/logs/scheduler/
> total 24
> drwxr-xr-x 3 ubuntu ubuntu 4096 Jan  3 00:00 2018-01-03
> drwxr-xr-x 3 ubuntu ubuntu 4096 Jan  4 00:00 2018-01-04
> drwxr-xr-x 3 ubuntu ubuntu 4096 Jan  5 12:25 2018-01-05
> drwxr-xr-x 2 ubuntu ubuntu 4096 Jan  6 00:00 2018-01-06
> drwxr-xr-x 2 root   root   4096 Jan  7 00:00 2018-01-07  # fail
> drwxr-xr-x 2 ubuntu ubuntu 4096 Jan  8 00:00 2018-01-08
> lrwxrwxrwx 1 ubuntu ubuntu   46 Jan  8 00:00 latest -> /home/ubuntu/airflow/logs/scheduler/2018-01-08
> {code}
> *My setup:*
> - _scheduler_ runs on EC2 machine under {{ubuntu:ubuntu}} from systemd service
> - _webapp_ runs on the same machine under {{root:root}} in order to be able to serve on port :80
> - _workers_ run on different machines - actually this is irrelevant info;)
> Also there are two different "environments" - one for "client" and one for "admin". The admin one is a fresh installation of airflow 1.9.0. The client one is an upgrade from 1.8.2 to 1.9.0. Both encounter the permissions problems.
> I'm not aware of these problems with 1.8.2 version.
> Workaround:
> let's get dirty, add following row into root's crontab:
> {code}
> 1 0 * * * chown ubuntu:ubuntu -Rc /home/airflow/logs/scheduler
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)