Skip to content

Bring Workspace sessions back after a restart - #109

Open
tigerblue77 wants to merge 4 commits into
linuxserver:masterfrom
tigerblue77:claude/loving-hopper-f527pj-restore
Open

tigerblue77 wants to merge 4 commits into
linuxserver:masterfrom
tigerblue77:claude/loving-hopper-f527pj-restore

Conversation

@tigerblue77

Copy link
Copy Markdown

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

svc-kasm/run now 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-stopped policy, as before #102, is not enough: dockerd starts them, paused ones as running, at the lowest free address. In a test, one came back at 172.17.0.2 while its route pointed at 172.17.0.10, held by then by kasm_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:

  • A running at .10, B paused at .11, docker restart kasm: A is running at .10 and reachable; B is paused at .11 and reachable there once resumed;
  • B stopped in Kasm, then docker stop + docker start, and again after recreating the container on the same /opt: A is running at .10 and reachable, B stays stopped;
  • docker kill: unchanged, A is left stopped while Kasm still has it as running.

Source / References:

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
claude added 2 commits October 4, 2026 13:13
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
@tigerblue77

Copy link
Copy Markdown
Author

Hi @thespad & @thelamer, can you have a look please ? 😉🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[BUG] Workspace sessions still shown as running after a container restart, but their containers are stopped

3 participants