Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ init_diagram: |
"kasm:latest" <- Base Images
# changelog
changelogs:
- {date: "23.09.26:", desc: "Give Workspace sessions their address back after a container restart."}
- {date: "07.08.26:", desc: "Fix NVIDIA passthrough to Workspace containers by generating a CDI specification inside the DinD layer."}
- {date: "04.08.26:", desc: "Give kasm_manager a healthcheck start period so a cold start does not leave kasm_proxy created but never started."}
- {date: "16.04.26:", desc: "Update for 1.18.1 release. Use rolling service images. Bump docker to v29."}
Expand Down
4 changes: 4 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-kasm/finish
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

# Kasm routes to a session by the address its container was created with
# shellcheck disable=SC2016
docker ps -q --filter "label=kasm.kasmid" | xargs -r docker inspect --format '{{.Id}} {{.State.Status}}{{range $network, $settings := .NetworkSettings.Networks}} {{$network}}={{$settings.IPAddress}}{{end}}' > /opt/kasm_sessions.state

/opt/kasm/bin/stop
12 changes: 12 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-kasm/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ done
# Stop any running containers that shouldn't be
docker ps -q | xargs docker stop &> /dev/null

# Docker gives a starting container the lowest free address, not its previous one
if [[ -f /opt/kasm_sessions.state ]]; then
while read -r id _ networks; do
for network in ${networks}; do
[[ -n "${network#*=}" ]] || continue
docker network disconnect --force "${network%%=*}" "${id}"
docker network connect --ip "${network#*=}" "${network%%=*}" "${id}" || docker network connect "${network%%=*}" "${id}"
done
done < /opt/kasm_sessions.state
rm -f /opt/kasm_sessions.state
fi

if [[ -f /opt/kasm/bin/start ]]; then
/opt/kasm/bin/start
fi
Loading