-
Notifications
You must be signed in to change notification settings - Fork 927
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 writing config: rename ~/.cf/temp-config929711920 ~/.cf/config.json: no such file or directory #2232
Comments
Experiencing the same issue when running multiple cf commands in parallel. |
experiencing the same issue as well! |
same here |
Experiencing the same issue when running multiple cf commands in parallel. |
Thank you @gururajsh. When will the new version of the CF CLI 8 be available? |
Wow, happy to see this is now fixed! Thank you @gururajsh and thanks to all of you for your support! |
Hi @gururajsh, Thanks! |
Hi @LotharBender , We are in the middle of modifying release process for CLI. Once that is complete, we'll be creating a release. Hoping to complete it in a week or two. |
This issue hit our project as well... |
Hello.. New CLI version is released with this fix. |
Please fill out the issue checklist below and provide ALL the requested information.
CF_TRACE=1
to help debug the issue.Describe the bug and the command you saw an issue with
Provide details on what you were trying to do (and why).
What happened
When I was using GNU parallel to run some scripts that can execute multiple cf commands in parallel, I got the below error for one job, but others worked:
I compared the config.json file and found that only the AccessToken field was different when that file was changed. And after inspecting the AccessToken, especially the
iat
andexp
fields, where the latter is only 1-hour after the former.And thanks to #1594, the token must have been automatically refreshed when my script was running. So more then one cf commands tried to refresh the token and it caused contentions even they try to use temp files.
Expected behavior
Whether there's an even smarter way to avoid parallel file writing contention, I would expect the life span of the CF CLI access token can be extended to something like 1 day, or at least 12 hours.
The default 1-hour life span of the CF access token is really just too short, especially when one needs to work with multiple CF spaces, BTW I also use $CF_HOME to work with multiple CF spaces simultaneously.
Exact Steps To Reproduce
Steps to reproduce the behavior; include the exact CLI commands and verbose output:
cf login
, to a space where multiple apps or services are deployedAccessToken
field in $CF_HOME/.cf/config.jsonexp
fieldexp
field to a readable date, e.g. usingdate -d@1636967840
cf apps | awk 'NR>4 {print $1}' | parallel -N1 cf env
Provide more context
cf version 8.0.0+e8d41cf8e.2021-09-16
Notes regarding V6 and V7 CLI support:
The text was updated successfully, but these errors were encountered: