Pause/Resume containers - #305
Open
Murazaki wants to merge 3 commits into
Open
Conversation
Murazaki
marked this pull request as draft
December 3, 2025 02:19
ABeltramo
marked this pull request as ready for review
December 3, 2025 08:06
ABeltramo
requested changes
Dec 3, 2025
ABeltramo
left a comment
Member
There was a problem hiding this comment.
Thanks for working on this, looks good! Just a couple of notes and small changes from my side.
Also, I would prefer to remove all the extra .envrc and nix files if you can.
| if (std::to_string(pause_ev->session_id) == session_id) { | ||
| docker_api.pause_by_id(container_id); | ||
| } | ||
| }); |
Member
There was a problem hiding this comment.
Don't handle PauseStreamEvent (andResumeLobbyEvent below) . For single users this can potentially break apps and for lobbies it will pause an entire lobby when any participant exits which you definitely don't want to happen.
ABeltramo
reviewed
Dec 3, 2025
Member
|
Also the following condition while (docker_api.get_by_id(container_id)->status == RUNNING)should probably be changed: when we get out of that loop, we'll stop the container and trigger the chain of events that will end the lobby. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempt at enabling pause/resume scheme from Wolf to Wolf UI.
As discussed on Discord, this might not work perfectly has pausing containers doesn't free GPU VRAM, since there's no cgroup freeze method available to do so by default. There is hope that we could do it with some research, and it might come to the kernel in the next years, but for now we have to try without. This might end up creating crashes though.
I'm still not sure of the return values that
Resumeshould give. I kept it as a separated action fromJoinfor now, but maybe the scheme would be better if we could directly join ?I also might have connected pause and resume stream events to pause/resume container, which depending on how this works might not be a good idea.
Linked to games-on-whales/wolf-ui#10