Checking out geodesic and running into a curious s...
# geodesic
j
Checking out geodesic and running into a curious situation and not sure if someone else has already encountered it before and got a fix. My workstation is running Windows 10 Pro so I run Ubuntu 20.04 LTS under WSL2. I was impressed my ssh agent forwarding worked (Yubikey on Win 10 through to Linux WSL passed to geodesic); however the AWS config isn't making it through. $HOME/.aws under WSL is actually a symlink back to the Windows user home directory and is where Leapp is putting the credentials so under geodesic that mount point doesn't exist
e
I will say WSL has been difficult for us to support since we don't use it ourselves. Support was contributed by multiple different community members.
If you look at this section, you'll see some of the nasty hacks we had to do to figure out directory mounting on WSL
and the behavior changes with different versions of WSL
j
I was digging into the geodesic script and saw some of the WSL mount bits. I tried executing the commands myself manually and they didn't seem to behave as I think the script expected them to. Maybe those are WSL compatible and WSL2 is not. I'll dig into it a bit more and if I find something put a PR together
I found a solution, someone can tell me if it's not the best but it seems to work. I just simply added
export GEODESIC_DOCKER_EXTRA_ARGS="--volume /mnt:/mnt"
to my WSL2 shell so it mounted the extra volume that points back to the Windows drives. Looking at lines commented above I determined it likely wouldn't have worked on my workstation as my Windows home drive is on H: which is mounted as /mnt/h and the code never accounts for that. It does appear that changing L124 to use
findmnt -S 'C:\' -t 9p -no target
does find the
/mnt
path which the allows L126 to function but then L127 fails because it doesn't have a path for
cmd.exe
. All that seemed for naught though as LOCAL_HOME was set so it never appeared to ender that elif block.
e
that seems like an elegant fix
let me run it by some WSLers
j
A bit investigation, it looks like the WSL support that is in the wrapper is for WSL-1 and does not work with WSL-2. •
$mount_path/c/Users/${windows_user_name}/AppData/Local/lxss/
does not exist with WSL-2 on L132 • On L39 the
/LocalState/rootfs${HOME}
path doesn't exist. In my case the only thing under
/LocalState/
is ext4.vhdx
Also the way it's written it would have only picked up Ubuntu WSL not any other like Debian
e
Yes, that sounds familiar
is WSL-1 EOL now?
j
I don't know if it's EOL yet but WSL-2 is definitely the recommended as it provides a better environment overall. There are some things that still work easier between Windows and the WSL guest when using v1 vs v2.
Biggest difference as I'm aware is that v1 was more of a Linux overlay running on Windows; while v2 is more of a full fledge virtual machine environment with it's own boot kernel, etc
👍 1