rancher-desktop
rancher-desktop copied to clipboard
Windows Roaming Profile Network Share
Problem Description
Provisioning fails if rancher desktop is installed on Windows 10 with active directory roaming profiles on network shares. Wslpath cannot interpret network shares. APPDATA windows environment variable uses the windows roaming location. \\server123\UserFolders\username\roaming
wsl.log:
2022-08-17T05:18:09.487Z: WSL: executing: wslpath -a -u \\SERVER123\UserFolders\username\AppData\Roaming\rancher-desktop\vtunnel-config.yaml: Error: wsl.exe exited with code 1
2022-08-17T05:18:09.488Z: Error trying to create/update docker credential files: Error: wsl.exe exited with code 1
at ChildProcess.<anonymous> (C:\Users\username\AppData\Local\Programs\Rancher Desktop\resources\app.asar\dist\app\background.js:17:142946)
at ChildProcess.emit (node:events:390:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
stdout: '',
code: 1,
command: [
'wsl.exe',
'--distribution',
'rancher-desktop',
'--exec',
'wslpath',
'-a',
'-u',
'\\\\SERVER123\\UserFolders\\username\\AppData\\Roaming\\rancher-desktop\\vtunnel-config.yaml'
]
}
...
2022-08-17T05:18:38.166Z: WSL: executing: wslpath -a -u \\\\SERVER123\\UserFolders\\username\\AppData\Roaming\rancher-desktop\provisioning: Error: wsl.exe exited with code 1
Proposed Solution
Solution might be downstream, waiting for wslpath to interpret windows network shares but network shares are still not accessible from wsl without being mounted with something like drvfs: https://superuser.com/questions/1128634/how-to-access-mounted-network-drive-on-windows-linux-subsystem Parsing of paths might be required to ensure network paths are mounted first. Alternatively you could allow the apphome and other folder locations to be overridden in the configuration file.
Additional Information
Work around can be to set the APPDATA variable to a local folder before rancher desktop is run: https://stackoverflow.com/questions/3036325/can-i-set-an-environment-variable-for-an-application-using-a-shortcut-in-windows
- Create folder: C:\Users\username\AppData\Roaming
- Create windows shortcut with target:
C:\Windows\System32\cmd.exe /c "SET APPDATA=C:\Users\username\AppData\Roaming&& START ^"^" /D ^"C:\Users\username\AppData\Local\Programs\Rancher Desktop^" ^"Rancher Desktop.exe^""
thanks
Sounds related to something we're aware of already in #827. We'd need to look into what WSL2 provides us
True, I did not see that because it does not have much details.