-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Support being used as a binfmt_misc handler, try 2 #157
base: main
Are you sure you want to change the base?
Conversation
This is always what you want if running via binfmt Signed-off-by: Nikodem Rabuliński <[email protected]>
Signed-off-by: Nikodem Rabuliński <[email protected]>
e229028
to
688aa30
Compare
I ported over the changes I consider most important for muvm to be usable with binfmt (as well as in general bringing in UX improvements) so this should be ready for review. I also implemented the aforementioned auto-tty-allocation, with Before merging I'd still like to resolve warnings (at least once that this PR introduced, but ideally all of them) and add the aforementioned binfmt_misc config, but I don't think I'll be introducing any more features or big changes. EDIT: I'd also like to people to actually try this branch in the wild as my usecase is very specific, on top of already me not being on fedora asahi in the first place 😅 EDIT 2: Also, when porting over the env inheritance, I decided to not go the route of two separate functions, and instead to add |
|
|
For shutdown case - would doing the following on shutdown work better?
|
Thinking about 2 some more, I could probably handle it a bit better if I made I'm afraid there always be some kind of a race, the question is what failing condition we're willing to tolerate, and realistically speaking I don't think what my PR adds in day-to-day use is worse than what we currently have. |
1 Could be tricky because the VM itself doesn't know about the lock file. Do you know if it's possible to somehow make the outside libkrun process delete the lock file? Otherwise I think it maybe should be possible to return a response "sorry, not accepting any more connections" and make the new processes wait for the lock file, and whoever wins becomes the new VM parent process. Other than that it sounds pretty good, albeit it would make the control flow more complicated. I can prototype that and then you can decide if we should go ahead with that approach? |
Launches the initial command via the server too. Server is set to linger for 10 seconds after last command finishes. Co-authored-by: Nikodem Rabuliński <[email protected]> Signed-off-by: Nikodem Rabuliński <[email protected]>
Change the approach to environment variables to delete ones that are likely to cause problems, instead of only passing through a pre-approved list. Co-authored-by: Sasha Finkelstein <[email protected]> Signed-off-by: Nikodem Rabuliński <[email protected]>
Instead of requiring a user to ask for tty allocation, which usually is what you want anyway, default to allocating one if stdin is a tty unless the user specifically doesn't want to. Signed-off-by: Nikodem Rabuliński <[email protected]>
Aside from just being better UX, some commands are sensitive to it and will not work correctly without it. Co-authored-by: Nikodem Rabuliński <[email protected]> Signed-off-by: Nikodem Rabuliński <[email protected]>
94d9067
to
1edd91d
Compare
Supersedes #54
Original description:
I took some technical liberties when adapting that patchset to the current codebase.
So far the differences from the original implementation are:
net_ready
lockfile anymore. This did not work on my laptop as the client was always winning the race and taking the lock before the server was even spawned. Instead we just wait for the server to spawn for up to 2.5s (can be tweaked further, though probably should be lowered down(?) once Autoconfigure network without DHCP #64 or similar lands)launch
field from the guest configuration as the guest-server will never be executing any command now.main
What still needs to be done:
My own ideas for this patchset (feedback welcome):
-h/--help
or make it so that muvm only treats arguments after--
and/or the first positional argument as arguments for the guest as the current behavior is counter-intuitive (EDIT: Not necessarily needed as it turns out that's already how bpaf works)