Flapping Pod Access is Denied to the rancher-wins- prefixed executable
Closed this issue · 0 comments
using wins server and a wins process run call you can get into a bad state where there's no access to a backup file we're putting in the temp folder for the system. The backup is not used again by wins and sits around for not much purpose or reason.
Logs look like this basically...
{"log":"\u001b[31mFATA\u001b[0m[2021-12-08T16:42:07-06:00] rpc error: code = Internal desc = could not rename binary: could not backup the existing target file: rename c:\\etc\\nginx\\rancher-wins-nginx.exe C:\\Windows\\TEMP\\rancher-wins-nginx.exe: Access is denied. \n","stream":"stdout","time":"2021-12-08T22:42:07.8392692Z"}
cause: wins takes the path you want to exec and copies it to a rancher-wins-
prefixed exec and then calls that exec. wins is supposed to release this kill and release this process when the client disconnects but if you crash wins and some how get into a state where it's not running as admin and windows server put the the file in C:\Windows\TEMP it can spiral. On win10 it'll be in AppData with full access but the C:\Windows directory is pretty fickle on a datacenter os.
solution: We're going to stop using the os temp dir entirely and just delete the copied rancher-wins-
prefixed file. if a process is still using by some errant wins process it could still be an issue but if it's being managed by the service manager this should be cleaner