-
Notifications
You must be signed in to change notification settings - Fork 107
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
mounted file "is a directory" #111
Comments
I might not need this functionality to work in the long run as we can also provides secrets differently but I still would like to know what is going on and would like to be able to fix this. |
Sorry you had problems getting this going, and the belated reply. Did you have any luck? It sounds like the best way to diagnose it would be to use a vanilla bash script to run the plain Docker commands via the agent, and see the results. |
I worked around the issue for now by passing it in as a base64 encoded environment variable and then decoding and storing it into a file in the command. Not nice but it works for now. Otherwise I had to pause progress one our buildkite ci setup for now, but hope to resume soon again. |
This is still and issue
And later if I use /destinationPath/fileName it says its a directory. It is not recognizing it as a file. |
Sorry @ritvick for the delay. I did a quick look but couldn't reproduce it, are you still having issues? did you have the issue on kubernetes? Thanks! |
Hey folks! We did some tests but couldn't reproduce the issue, so I'm closing this. Feel free to re-open this if not. Thanks! |
Hi I am still experiencing this issue. I have a file on Docker container of build agent and attempt to mount it as volume as so: steps:
- label: "Test"
command: "cat /root/.ssh/id_rsa"
plugins:
- docker#v5.9.0:
image: "busybox"
network: "host"
volumes:
- "/root/.ssh/id_rsa:/root/.ssh/id_rsa" Then will output an error that |
I think I was finally able to reproduce this issue: it happens when the source of the volume does not exist. You can even reproduce it without the plugin by running the following: $ docker run --rm -t -v $HOME/.ssh/doesnotexist:/root/.ssh/id_rsa busybox cat /root/.ssh/id_rsa
cat: read error: Is a directory Apparently, if the folder for the source exists but not the file, docker will create it as a folder (I could see |
I am just testing out buildkite running it in google kubernetes engine, following the docs and I am running into issues when wanting to mount in secrets as a file via kubernetes. This is my yaml:
Then my
pipeline.yml
:I can see that the secrets file exists in the first
ls
but for the cat command I am getting the errorcat: /home/kubernetes/flexvolume/secrets/secrets.libsonnet: Is a directory
. I can see that the kubernetes pod has the secrets file and I can read it but I have no idea why it is turned into a directory through this volume mount. Could it be in any way related to #61?The text was updated successfully, but these errors were encountered: