Repository navigation
Bring Workspace sessions back after a restart - #109
Open
tigerblue77 wants to merge 4 commits into
Open
tigerblue77 wants to merge 4 commits into
tigerblue77 wants to merge 4 commits into
Conversation
Kasm routes to a session by the address its container was created with, while Docker gives a starting container the lowest free address. Record the address of each running or paused session on shutdown and pin the container back to it on start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RmwHZxdRuWgp9chBZTZTMn
dockerd restarts session containers through their unless-stopped policy, then svc-kasm stops every running container, so Kasm keeps listing sessions as running or paused while their containers are stopped. Start the sessions recorded on shutdown again, pausing those that were paused, before the services start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RmwHZxdRuWgp9chBZTZTMn
This was referenced Sep 23, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RmwHZxdRuWgp9chBZTZTMn
…store Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RmwHZxdRuWgp9chBZTZTMn
Author
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.
Description:
svc-kasm/runnow starts the sessions recorded by #108 again, and pauses again those that were paused. It does so before the Kasm services start, so that none of them is handed a session's address.Benefits of this PR and context:
closes #106
Depends on #108, whose commit is included here until it is merged.
Leaving the sessions to their
unless-stoppedpolicy, as before #102, is not enough: dockerd starts them, paused ones as running, at the lowest free address. In a test, one came back at172.17.0.2while its route pointed at172.17.0.10, held by then bykasm_rdp_https_gateway.Sessions stopped in Kasm are not recorded and stay stopped. After an unclean shutdown nothing is recorded and the behaviour is unchanged.
How Has This Been Tested?
Same setup as #108:
.10, B paused at.11,docker restart kasm: A is running at.10and reachable; B is paused at.11and reachable there once resumed;docker stop+docker start, and again after recreating the container on the same/opt: A is running at.10and reachable, B stays stopped;docker kill: unchanged, A is left stopped while Kasm still has it as running.Source / References:
docker stopinsvc-kasm/run