-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
File provisioner: .sock "files" are tried to be copied #2872
Comments
@vemv Thanks for the report! You've asked the file provisioner to do something and it can't, so it errors. This is preferable to the file provisioner silently ignoring things. I think it is more straightforward to resolve this either by making sure there are no socket files in your upload directory, or by creating a tarball with the files you want to upload. We do have include / exclude filtering in some other packer features but this turns out to be very confusing for people to use because you cannot inspect the list of files in advance. |
As I see it, a socket is a non-file. If I ask to copy a directory, then non-files are irrelevant and safe to skip silently (or semi-silently by logging the incident but not failing the task). Feel free to close the issue if you disagree. Cheers - Victor |
I'd disagree with this. tar knows how to store such files (as nodes). That sockets have nothing to read from when something is not listening doesn't make it any less a file in how it's accessed. They are opened/read/written/closed exactly like files, but happen to be backed by a device or socket. I don't think that makes them "non-files" at all, not in a strict filesystem sense. |
I don't think there's a good solution we can implement before 1.0. I recommend using existing tools to filter the file before uploading |
related to #1811 |
If a directory I intend to copy contains a socket (e.g. "/var/rails/testapp/tmp/sockets/unicorn.sock"), the File Provisioner will try to copy it, failing the build.
Smart behavior would be skipping these .sock files I think?
Cheers - Victor
The text was updated successfully, but these errors were encountered: