https://rancher.com/ logo
Title
b

best-city-49378

07/01/2022, 5:17 AM
I guess the good news is that the Hyper-V virtualization of Alpine seems to be working OK, always something ? Beyond submitting some other small patches I accumulated, I don't think I will continue with the port myself...
f

fast-garage-66093

07/01/2022, 5:56 AM
I'm slightly uncomfortable with merging experimental code that is known not to really work, if nobody is going to continue to work on it. If you simply want to preserve it for posteriority, just in case, then I would rather keep it in a branch, where it isn't in the way when the main branch needs to be modified for other requirements.
b

best-city-49378

07/01/2022, 5:56 AM
that was not the intention, only submitting the patches that actually do work - like paths and such
even if they only make up half of a working program. others will be in "draft" or in branch, like you say
f

fast-garage-66093

07/01/2022, 5:58 AM
I guess this is fine, but if it e.g. drags in a requirement on Cygwin, then I'm not sure if this is something we want; maybe the next person is going with a different approach anyways
b

best-city-49378

07/01/2022, 5:58 AM
I think I was a bit unclear, I meant "Cygwin paths" as in
cygpath.exe
.
Which turned out to not be the same anyway, i.e. /c rather than /cygdrive/c 🙂
f

fast-garage-66093

07/01/2022, 6:02 AM
Ok, let's see; I assume these will not be massive changes anyways. I'm just a bit cautious because I've been stuck maintaining old codebases before, with insufficient test coverage, and large chunks of seemingly dead code, which made it impossible to modify because nobody know if this would break something unrelated, or not.
b

best-city-49378

07/01/2022, 6:02 AM
BTW; I managed to fix the paths also for the home directory. It was a rather sad story, actually
f

fast-garage-66093

07/01/2022, 6:02 AM
If these are all just small localized changes, then it should be all good
b

best-city-49378

07/01/2022, 6:02 AM
In theory, UNC would be the way to solve it. But in practice, the only thing that works is DOS path
Unfortunately, the "syscall" and "filepath" changes are everywhere. Maybe for-the-better, but still annoying
f

fast-garage-66093

07/01/2022, 6:04 AM
I think those kind of changes are fine
What I'm worried about is (for example) a bunch of logic for qemu configuration that is intermingled with the current code, which is already quite complex
b

best-city-49378

07/01/2022, 6:06 AM
Indeed. My home was that named pipes and tcp sockets would at least be portable, as options, but they didn't really work out
f

fast-garage-66093

07/01/2022, 6:07 AM
b

best-city-49378

07/01/2022, 6:07 AM
was it about using periods in usernames ? oh well, at least it is not spaces
f

fast-garage-66093

07/01/2022, 6:08 AM
Yes, that one is about periods. Spaces are actually broken even with the remapping of the username because we don't properly quote the mountpoints.
b

best-city-49378

07/01/2022, 6:09 AM
Nobody does. I guess most just "don't allow spaces", because of that
f

fast-garage-66093

07/01/2022, 6:09 AM
And yes, that is based on an actual user. Another one that doesn't work is a username like
Tim O'Reilly
, and we had reports from that type too
b

best-city-49378

07/01/2022, 6:10 AM
I thought Mac enforced proper user names, but maybe that was before
f

fast-garage-66093

07/01/2022, 6:10 AM
That was on Windows, but even on macOS, sometimes user names come from a directory service, so are fixed by company policy. Some use email addresses
👍 1
b

best-city-49378

07/01/2022, 6:10 AM
Easy enough to get the form fields confused, when creating a new user
They fixed that here by changing everyones email instead. Slight overkill
f

fast-garage-66093

07/01/2022, 6:11 AM
I think local user creation is more strict, but if the name comes from Active Directory or whatever, they just accept whatever it contains.
b

best-city-49378

07/01/2022, 6:12 AM
Anyway, I guess "everything goes" when it comes to the host if you want it portable
At least that is what this experiment tought me, when username/uid/gid/homedir fails 😄
f

fast-garage-66093

07/01/2022, 6:14 AM
I guess we can make the regex configurable, but this will just result in more bug reports again because people think their distro supports more relaxed rules, and then one the utilities fails later on
b

best-city-49378

07/01/2022, 6:15 AM
I thought it would still work with the uid/gid, even if the user names were slightly mangled
but maybe this was the expectation that the path would be identical on both sides of the connection
f

fast-garage-66093

07/01/2022, 6:16 AM
Well, some commands, like
useradd
, in some versions of Linux, will fail to create the user if it doesn't conform. In which case cloud-init will fail and the users will complain that ssh never gets ready... 😞
b

best-city-49378

07/01/2022, 6:16 AM
right. but I meant if you do change the username but leave the path creation
was the username in the VM important ? that was the piece missing for me
f

fast-garage-66093

07/01/2022, 6:17 AM
Yes, having the path the same on both sides was the assumption for making it look like
nerdctl
runs on the host, when it actually doesn't
b

best-city-49378

07/01/2022, 6:18 AM
like I have /home/anders created in the VM, but the user lives in "anders.linux"
f

fast-garage-66093

07/01/2022, 6:18 AM
The username inside the VM is not important for Lima; that's why we fall back to a default. But the reporting user claims they have "scripts" that include the username
b

best-city-49378

07/01/2022, 6:19 AM
so I thought it could create /home/first.last, and then have a different $HOME
but if there are requrements on username, that won't work
f

fast-garage-66093

07/01/2022, 6:20 AM
Having the same paths is also important for volume mounts from the host into a container
b

best-city-49378

07/01/2022, 6:20 AM
Yeah, doubling down on the illusion
Calling these "bind mounts" irks me
f

fast-garage-66093

07/01/2022, 6:21 AM
For Rancher Desktop we actually have stub processes for both
docker
and
nerdctl
running on Win32 that will translate the filenames to the WSL2 form before talking to the sockets
b

best-city-49378

07/01/2022, 6:21 AM
There were some similar shenaningans on CoreOS for Podman Desktop, when
/Users
was expected on a read-only file system
e.g. translating it under the hood from /Users to /mnt/Users - and then back again
I think they eventually just gave up on the whole idea, and remounted the disk R/W