-
Notifications
You must be signed in to change notification settings - Fork 931
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
cf push fails when you have a read only js file bigger than 64KB #685
Comments
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/108545872. |
and some additional CF_TRACE output.... REQUEST: [2015-11-19T10:45:46-05:00] [{"sha1":"5836ac31b71d3e0b2a33f169572d5f450cf9a830","size":2238},{"sha1":"8ff8685bc59a7b2beb02f668c00a1d7c1ca3a3b0","size":2700},{"sha1":"3bd06a3c74f2541727913432672eef7f8425fced","size":3384},{"sha1" RESPONSE: [2015-11-19T10:45:46-05:00] [{"sha1":"1fea5a87bf4c7846f6677753b14b3a2de65891ea","size":71965}] |
Hi Brad, I cannot reproduce the error:
Even if I use cygwin About the Cheers, |
Strange. It happens for me every time. C:\RouteTest>cf delete dev-routetest Really delete the app dev-routetest?> y C:\RouteTest>cf push dev-routetest --no-start Creating app dev-routetest in org removed-org / space development as removed@domain.com... Using route dev-routetest.cfapps.io Uploading dev-routetest... C:\RouteTest>attrib *.js C:\RouteTest>attrib -r apiserver.js C:\RouteTest>cf push dev-routetest --no-start Updating app dev-routetest in org removed-org / space development as removed@domain.com... Uploading dev-routetest... C:\RouteTest>dir apiserver.js Directory of C:\RouteTest 2015-11-20 16:54 82,697 apiserver.js C:\RouteTest>cf --version C:\RouteTest> |
and the changelog for version 6.13 includes 6 changes with the words 'file mode' |
Sorry, my bad - I had forgotten to make the file RO with attrib before I started my test.
We'll investigate. |
Hi @bveenvliet: This change was made as part of the switch to using the new Cloud Foundry runtime, Diego. The file mode must be at least 0600. For completeness, the original story in the Cloud Foundry API backlog for the feature here, the code that (correctly) returns this error here, and get more information on the Apps API the CLI uses for uploading files here. |
I've asked CAPI to change the error message to be more helpful: rather than saying the filemode is invalid, it should describe the solution, which is setting your filemode to at least 0600. When they create a story I'll link it here. |
@krishicks @dkoper Our windows build machine gets latest code from the repository and does a cf push on the files (which have a +R attribute given to them from the source control). So now there is an extra step turning all of the files > 64KB to make them writable before deploying to Diego. Would be a cleaner solution if there was a command line arg to ignore file permissions during the cf push. |
@bveenvliet That's not something the CLI team can decide. Perhaps @dieucao, the CF API PM, and/or @ematpl, the CF Runtime Diego PM, can elaborate on why the requirement exists. |
Hi Brad, We've fixed the issue, feel free to download our Edge binary to try until we publish our next cli release. Regards, |
This fix is included in cf CLI release v6.14.1 published today. |
Thanks! |
Hi I am getting a similar error:
Read through the comments here, but I am unclear as to what the solution is? WHICH file needs to be in filemode 0600? OR, do I need to install CLI v6.14.1 to resolve? I'm currently on cf version 6.15.0+fa1bfe2-2016-01-13 Thanks. |
@CorpusCallosum What platform are you using |
Hey @krishicks , thanks for the quick reply. I'm on OSX, do you have any workaround available in the meantime for OSX users? |
The easiest thing to do is to chmod all your files, sadly. This is what used to happen automatically when pushing your files; the mode was set to 0744 for all files by default. |
Hi, I tried changing file permissions by running Still getting the same error when I run cfpush however:
Is there some way to find which file is causing the problem? |
Try |
Hey Kris, I ran that command and this is the result: So, as you can see, ironically the file that is giving me trouble is the clidriver itself. This is a problem, because although I can change permissions on the file, as soon as I It's a Catch 22! What to do? Here is the log from the driver download
|
That depends on what |
Ah yes as it turns out the
BTW, if this is indeed still a bug in the OSX version, perhaps the issue should be reopened? Thanks! |
This issue is specific to Windows, so it should not be opened. We're also already aware of the problem and have stories to fix it on non-Windows platforms. |
@krishicks - Do you have a link to the non-Windows story in PT that you can share? I searched but couldn't find it. |
Set executable bit on all files that are missing it on non-Windows platforms by default: https://www.pivotaltracker.com/story/show/109770364 |
Also seeing something similar with files in the .git folder and ruby bundler cache.
|
@matthewford Feel free to submit a new issue with details and we'll take a look. This issue is closed; a new issue is easier to track for us and less likely to get lost. |
This issue seems to be related to a problem I recently reported on the Cloud Controller. See cloudfoundry/cloud_controller_ng#1705 |
When do a cf push to run.pivotal.io with a JS file that is 65KB or greater using the Windows 64 bit CF CLI:
easy to test, just add a huge comment block to any JS file, set the file to read only and cf push it.
Very strange thing is that the overall size of files does not include the >64KB file.
C:\Test>cf push dev-routetest
Using manifest file C:\Test\manifest.yml
Updating app XXXXXX in org XXXXXX-org / space development as me@person.com...
OK
Uploading test...
Uploading app files from: C\Test
Uploading 15.9K, 16 files <<------------ should be approx 85KB if it included the 70KB js file
Done uploading
FAILED
Error uploading application.
The resource file mode is invalid: File mode '0444' is invalid.
The text was updated successfully, but these errors were encountered: