-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Error mounting /tmp/airflowtmp... with remote docker #16806
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
Seems the same error as #16803 - we will have to take a look at fixing it for remote engine |
Yes, the guy in #16803 tries to run a container from within a container, running obviously into the same issue, as the directory created in the container he is calling from is not available on the host running the docker daemon. |
I'm facing the same issue too, actually It can access the mounting point for docker socket, but thrown error when trying to mount tmp dir |
Well, downgrade apache-airflow-providers-docker to |
I am not sure if downgrade would help. This behaviour was there like forever. I looked at this and turned the temp file mounting into optional feature that you might disable: see #16932 |
actually, I fixed it yesterday by downgrading, you should try |
Ah. OK. I see Indeed. I thin kit was because we have changed how "Mount" works and while it was not failing before, it did not work properly either (the tmp volume was not mounted). I see then how it was not detected before. Good call @sudohainguyen ! |
I don't have a complete proof for this yet (I might have to look into Docker's code for that), but from the docs (and the error message), it seems that we might be using the wrong Is it possible for anyone here to change this line to More details in this comment - #16932 (comment) |
The DockerOperator by default mounts temporary folder to inside the container in order to allow to store files bigger than default size of disk for the container, however this did not work when remote Docker engine or Docker-In-Docker solution was used. This worked before the apache#15843 change, because the /tmp has been ignored, however when we change to "Mounts", the "/tmp" mount fails when using remote docker engine. This PR adds parameter that allows to disable this temporary directory mounting (and adds a note that it can be replaced with mounting existing volumes). Also it prints a warning if the directory cannot be mounted and attempts to re-run such failed attempt without mounting the temporary directory which brings back backwards-compatible behaviour for remote engines and docker-in-docker. Fixes: apache#16803 Fixes: apache#16806
…16932) * Adds option to disable mounting temporary folder in DockerOperator The DockerOperator by default mounts temporary folder to inside the container in order to allow to store files bigger than default size of disk for the container, however this did not work when remote Docker engine or Docker-In-Docker solution was used. This worked before the #15843 change, because the /tmp has been ignored, however when we change to "Mounts", the "/tmp" mount fails when using remote docker engine. This PR adds parameter that allows to disable this temporary directory mounting (and adds a note that it can be replaced with mounting existing volumes). Also it prints a warning if the directory cannot be mounted and attempts to re-run such failed attempt without mounting the temporary directory which brings back backwards-compatible behaviour for remote engines and docker-in-docker. Fixes: #16803 Fixes: #16806
Apache Airflow version: v2.1.0
Environment:
uname -a
): 5.4.0-1051-awsWhat happened:
Task fails with error:
How to reproduce it:
Create an separate EC2 instance and forward the docker daemon:
Create dag with DockerOperator
Run the DAG.
Anything else we need to know:
To me it looks like the DockerOperator is creating a temporary directory locally and tries to bind it to the container. However as this is a remote container the directory doesn't exist. here is the code part:
I see no way of disabling this behavior without some major patching.
How are you guys using remote docker daemons? Is this a use case? Would it be possible to implement something to allow that?
The text was updated successfully, but these errors were encountered: