Fix disk space issues on github runners#46358
Merged
jscheffl merged 10 commits intoapache:mainfrom Feb 3, 2025
Merged
Conversation
Contributor
Author
|
Mhm, not sure but smells like image constraint generation failure is un-related to this PR... at least should be... |
cbcc89d to
a85dcff
Compare
Contributor
Author
|
Docs build problems seem to be un-related, merging. Dcos will need another fix |
dabla
pushed a commit
to dabla/airflow
that referenced
this pull request
Feb 3, 2025
* Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Move docker storage to second drive in general * Cleanup debug and triaging stuff * Exception of docker volume for constraints building
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Feb 4, 2025
The apache#46358 moved docker to another mounted directory - but this directory and all files in it are owned by host user. The directory and all files inside should be owned by root in order to properly reflect permissions of the files when building docker images. The change is now simplified. Rather than passing mount directory by variable and passing it through GitHub Actions, we hard-code the location of docker in cleanup_docker.sh script - we also incorporate changing ownership and showing disk space in the same cleanup_docker.sh script and make sure that script is only called in the "real" (not composite) actions at the beginning - right after the repository is checked out - previously that script was also called in composite actions and changing the repo to be writeable was done AFTER cleanup_docker.sh - which would not work as we want the /mnt directory to be still owned by the host user, but the docker storage should be still owned by root.
potiuk
added a commit
that referenced
this pull request
Feb 4, 2025
The #46358 moved docker to another mounted directory - but this directory and all files in it are owned by host user. The directory and all files inside should be owned by root in order to properly reflect permissions of the files when building docker images. The change is now simplified. Rather than passing mount directory by variable and passing it through GitHub Actions, we hard-code the location of docker in cleanup_docker.sh script - we also incorporate changing ownership and showing disk space in the same cleanup_docker.sh script and make sure that script is only called in the "real" (not composite) actions at the beginning - right after the repository is checked out - previously that script was also called in composite actions and changing the repo to be writeable was done AFTER cleanup_docker.sh - which would not work as we want the /mnt directory to be still owned by the host user, but the docker storage should be still owned by root.
ambika-garg
pushed a commit
to ambika-garg/airflow
that referenced
this pull request
Feb 4, 2025
* Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Move docker storage to second drive in general * Cleanup debug and triaging stuff * Exception of docker volume for constraints building
niklasr22
pushed a commit
to niklasr22/airflow
that referenced
this pull request
Feb 8, 2025
* Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Move docker storage to second drive in general * Cleanup debug and triaging stuff * Exception of docker volume for constraints building
niklasr22
pushed a commit
to niklasr22/airflow
that referenced
this pull request
Feb 8, 2025
…e#46428) The apache#46358 moved docker to another mounted directory - but this directory and all files in it are owned by host user. The directory and all files inside should be owned by root in order to properly reflect permissions of the files when building docker images. The change is now simplified. Rather than passing mount directory by variable and passing it through GitHub Actions, we hard-code the location of docker in cleanup_docker.sh script - we also incorporate changing ownership and showing disk space in the same cleanup_docker.sh script and make sure that script is only called in the "real" (not composite) actions at the beginning - right after the repository is checked out - previously that script was also called in composite actions and changing the repo to be writeable was done AFTER cleanup_docker.sh - which would not work as we want the /mnt directory to be still owned by the host user, but the docker storage should be still owned by root.
ambika-garg
pushed a commit
to ambika-garg/airflow
that referenced
this pull request
Feb 17, 2025
* Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Move docker storage to second drive in general * Cleanup debug and triaging stuff * Exception of docker volume for constraints building
ambika-garg
pushed a commit
to ambika-garg/airflow
that referenced
this pull request
Feb 17, 2025
…e#46428) The apache#46358 moved docker to another mounted directory - but this directory and all files in it are owned by host user. The directory and all files inside should be owned by root in order to properly reflect permissions of the files when building docker images. The change is now simplified. Rather than passing mount directory by variable and passing it through GitHub Actions, we hard-code the location of docker in cleanup_docker.sh script - we also incorporate changing ownership and showing disk space in the same cleanup_docker.sh script and make sure that script is only called in the "real" (not composite) actions at the beginning - right after the repository is checked out - previously that script was also called in composite actions and changing the repo to be writeable was done AFTER cleanup_docker.sh - which would not work as we want the /mnt directory to be still owned by the host user, but the docker storage should be still owned by root.
jscheffl
added a commit
to jscheffl/airflow
that referenced
this pull request
Mar 15, 2025
* Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Move docker storage to second drive in general * Cleanup debug and triaging stuff * Exception of docker volume for constraints building
jscheffl
pushed a commit
to jscheffl/airflow
that referenced
this pull request
Mar 15, 2025
…e#46428) The apache#46358 moved docker to another mounted directory - but this directory and all files in it are owned by host user. The directory and all files inside should be owned by root in order to properly reflect permissions of the files when building docker images. The change is now simplified. Rather than passing mount directory by variable and passing it through GitHub Actions, we hard-code the location of docker in cleanup_docker.sh script - we also incorporate changing ownership and showing disk space in the same cleanup_docker.sh script and make sure that script is only called in the "real" (not composite) actions at the beginning - right after the repository is checked out - previously that script was also called in composite actions and changing the repo to be writeable was done AFTER cleanup_docker.sh - which would not work as we want the /mnt directory to be still owned by the host user, but the docker storage should be still owned by root.
jscheffl
added a commit
that referenced
this pull request
Mar 15, 2025
* Fix disk space issues on github runners (#46358) * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Triage disk space issues, DO NOT MERGE * Move docker storage to second drive in general * Cleanup debug and triaging stuff * Exception of docker volume for constraints building * Fix ownership of files that docker uses in mounted directories (#46428) The #46358 moved docker to another mounted directory - but this directory and all files in it are owned by host user. The directory and all files inside should be owned by root in order to properly reflect permissions of the files when building docker images. The change is now simplified. Rather than passing mount directory by variable and passing it through GitHub Actions, we hard-code the location of docker in cleanup_docker.sh script - we also incorporate changing ownership and showing disk space in the same cleanup_docker.sh script and make sure that script is only called in the "real" (not composite) actions at the beginning - right after the repository is checked out - previously that script was also called in composite actions and changing the repo to be writeable was done AFTER cleanup_docker.sh - which would not work as we want the /mnt directory to be still owned by the host user, but the docker storage should be still owned by root. --------- Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
39 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main is failing e.g. in https://github.com/apache/airflow/actions/runs/13101805105/job/36550974189 as runners are "out of disk space".
This seems to be caused as only 23GB are free on /root disk where main artifacts like docker is produced. When the runner starts the following disk space is available:
(A lot of build tools are already on CI image - see more debug info from the additional debug steps in https://github.com/apache/airflow/actions/runs/13102704519/job/36552932758 where the disk space onthe image is allocated.)
...but this means that after building the image only ~5GB are free and in some corner cases (e.g. main) the build fails. Disk space at then of building pipelines is:
...and as it seems a LOT of disk space is on the second drive in /mnt and the larged data chunk from triaging is the docker workspace, this PR adds a bind mout to use the second drive in /var/lib/docker. With this at the end of the build of the image the following free space is available:
Adding this as a function to the docker cleanup script and making this to all pipelines.
(Numbers were taken from Python 3.9)