-
Notifications
You must be signed in to change notification settings - Fork 294
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
[#1165] Fix ENOENT K3s downloads #1196
[#1165] Fix ENOENT K3s downloads #1196
Conversation
This is related to the issue: rancher-sandbox#1165 - We were trying to remove a tmp folder that was renamed before being deleted. In this case, the function safeRename(), will rename the tmp folder and the tmp folder no longer exists in the system, not being necessary for removing an unexisting tmp folder. Signed-off-by: Everton Peres <37411123+evertonlperes@users.noreply.github.com>
I do not understand why this has become a problem now, when it seems to have worked for a long time before. I disagree that deleting the temp directory is not necessary; the I think a better fix would be to use Also: it looks like the |
Thanks for your thoughts @jandubois
Could be related to the deprecation of |
It looks like the deprecated usage of Created #1198 to track the work |
I've looked a bit more into the history, and it seems that recursive This explains why we are only seeing this error now, and that my proposed change seems the correct way to deal with it (instead of not trying to clean up the directory at all). |
Yes, that is correct, but the folder is only gone when the |
As Jan's comments: https://github.com/rancher-sandbox/rancher-desktop/pull/1196\#issuecomment-1006879065 - rmdir/recursive is deprecated and it is highly recommended to replace to rm instead. Signed-off-by: Everton Peres <37411123+evertonlperes@users.noreply.github.com>
Resolves: #1165
Unblock @rak-phillip PR: #1199
Changes
1. Removed unnecessary delete k3s tmp directory action.rmdir
torm({recursive: true, maxRetries: 3, force: true})
.How to replicate the issue
The issue can be replicated (with accuracy), after deleting
k3s
local cache folder. If you have any version locally that matches with you k8s selection (RD K8s version), it won't fail.