Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Jan 20, 2022

Seems that when AUFS is a backing storage for Docker, changing
the script to executable and executing it right after during the
build phase might cause an error: 'text file busy'

moby/moby#13594

Workaround for that is to add extra sync command after changing
the executable flag to make sure that the filesystem change has
propageted to the underlying AUFS storage.

This PR adds the sync and also makes sure that both CI And PROD
image use same formatting, executable bits and && between
commands rather than ;. The && is better to separate the
commands because it will not continue with execution steps in the
same bash command after previous command fails. This caused
confusion as to what is the reason for docker build failure.

The problem was raised in the #20971 discussion.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@potiuk potiuk requested review from ashb and mik-laj as code owners January 20, 2022 13:44
@boring-cyborg boring-cyborg bot added area:dev-tools area:production-image Production image improvements and fixes labels Jan 20, 2022
@potiuk potiuk requested a review from uranusjr January 20, 2022 13:44
@potiuk potiuk requested a review from dstandish January 20, 2022 13:46
@potiuk potiuk added this to the Airflow 2.2.4 milestone Jan 20, 2022
@potiuk potiuk requested a review from kaxil January 20, 2022 13:52
Copy link
Contributor

@V0lantis V0lantis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @potiuk for this bug fix. LGTM

@potiuk potiuk force-pushed the fix-aufs-sync-limitations branch from db8bdd4 to 1f34589 Compare January 20, 2022 15:26
@potiuk
Copy link
Member Author

potiuk commented Jan 20, 2022

Even better now!

Seems that when AUFS is a backing storage for Docker, changing
the script to executable and executing it right after during the
build phase might cause an error: 'text file busy'

moby/moby#13594

Workaround for that is to add extra `sync` command after changing
the executable flag to make sure that the filesystem change has
propageted to the underlying AUFS storage.

This PR adds the sync and also makes sure that both CI And PROD
image use same formatting, executable bits and `&&` between
commands rather than `;`. The `&&` is better to separate the
commands because it will not continue with execution steps in the
same bash command after previous command fails. This caused
confusion as to what is the reason for docker build failure.

The problem was raised in the apache#20971 discussion.
@potiuk potiuk force-pushed the fix-aufs-sync-limitations branch from 1f34589 to e8a54de Compare January 20, 2022 16:06
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Jan 20, 2022
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@potiuk
Copy link
Member Author

potiuk commented Jan 20, 2022

Images built and verified - looks good. Merging :)

@potiuk potiuk merged commit c135581 into apache:main Jan 20, 2022
@potiuk potiuk deleted the fix-aufs-sync-limitations branch January 20, 2022 16:44
potiuk added a commit that referenced this pull request Jan 22, 2022
…20987)

Seems that when AUFS is a backing storage for Docker, changing
the script to executable and executing it right after during the
build phase might cause an error: 'text file busy'

moby/moby#13594

Workaround for that is to add extra `sync` command after changing
the executable flag to make sure that the filesystem change has
propageted to the underlying AUFS storage.

This PR adds the sync and also makes sure that both CI And PROD
image use same formatting, executable bits and `&&` between
commands rather than `;`. The `&&` is better to separate the
commands because it will not continue with execution steps in the
same bash command after previous command fails. This caused
confusion as to what is the reason for docker build failure.

The problem was raised in the #20971 discussion.

(cherry picked from commit c135581)
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Jan 25, 2022
jedcunningham pushed a commit that referenced this pull request Jan 27, 2022
…20987)

Seems that when AUFS is a backing storage for Docker, changing
the script to executable and executing it right after during the
build phase might cause an error: 'text file busy'

moby/moby#13594

Workaround for that is to add extra `sync` command after changing
the executable flag to make sure that the filesystem change has
propageted to the underlying AUFS storage.

This PR adds the sync and also makes sure that both CI And PROD
image use same formatting, executable bits and `&&` between
commands rather than `;`. The `&&` is better to separate the
commands because it will not continue with execution steps in the
same bash command after previous command fails. This caused
confusion as to what is the reason for docker build failure.

The problem was raised in the #20971 discussion.

(cherry picked from commit c135581)
@jedcunningham jedcunningham added changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) and removed type:bug-fix Changelog: Bug Fixes labels Feb 14, 2022
@potiuk potiuk restored the fix-aufs-sync-limitations branch April 26, 2022 20:46
@potiuk potiuk deleted the fix-aufs-sync-limitations branch July 29, 2022 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools area:production-image Production image improvements and fixes changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants