Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not deleting airflow logs for master node #96

Open
chetkhatri opened this issue Nov 8, 2020 · 2 comments
Open

Not deleting airflow logs for master node #96

chetkhatri opened this issue Nov 8, 2020 · 2 comments

Comments

@chetkhatri
Copy link

This util dag is not deleting airflow logs for the master node but doing a delete for all worker nodes, please guide to do delete for the master node also where It is Airflow Cluster with Celery Executor. Thanks

@hasher1705
Copy link

You can manually set up a cron job to delete log files in the master node. We have got a similar setup as yours.
find /home/ubuntu/airflow/logs/*/* -type f -mtime +7 -exec rm -rf {} \;
We run this once every day.

@prakshalj0512
Copy link
Member

@chetkhatri the DAG task deletes logs on the node on which it is running so that's the reason why only logs on worker nodes are being removed.
You can try the new airflow-log-cleanup-pwdless-ssh.py DAG and specify the hosts to run the process on Line 41.
Follow the readme for this DAG and make sure you're able to passwordless SSH onto the nodes from the worker nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants