project-nomad/admin
Chris Sherwood 4ad7e84a19 fix(system): roll back service update when the new container fails to start
The service update path stopped and renamed the old container aside before
the new one was confirmed running, but only wired up rollback if
createContainer threw or the 5s health check failed. A throw from
newContainer.start() itself (bad device/GPU config, host port already bound,
image incompatibility) bubbled straight to the outer catch, which returned a
generic 400 and never restored the old container, leaving the service down.

Retrying then wedged: the failed new container still held the service name, so
the next attempt's rename to `<name>_old` collided with the leftover from the
first attempt and threw the same error every time.

- Wrap newContainer.start() so a start failure removes the half-created
  container and rolls back to the previous one.
- Clear any stale `<name>_old` before renaming so retries can't collide.
- Dedupe the three rollback sites into a single rollbackToOld() helper (also
  removes a non-null assertion in the create-failure path that could itself
  throw when no `_old` existed).

Refs #949

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 11:19:04 -07:00
..
app fix(system): roll back service update when the new container fails to start 2026-06-08 11:19:04 -07:00
bin feat: curated content system overhaul 2026-02-11 15:44:46 -08:00
commands feat(supply-depot): opt-in automatic updates for installed apps 2026-06-07 15:56:42 -07:00
config feat(config): respect REDIS_DB env var for queue and transmit 2026-06-07 15:11:22 -07:00
constants feat(supply-depot): opt-in automatic updates for installed apps 2026-06-07 15:56:42 -07:00
database feat(supply-depot): opt-in automatic updates for installed apps 2026-06-07 15:56:42 -07:00
docs feat(supply-depot): per-app onboarding docs, install fixes, and in-app Docs links 2026-06-06 11:08:52 -07:00
inertia feat(supply-depot): opt-in automatic updates for installed apps 2026-06-07 15:56:42 -07:00
providers feat(GPU): auto-remediate nomad_ollama passthrough loss on admin boot (#755) 2026-05-20 10:16:00 -07:00
public feat: switch all PNG images to WEBP (#575) 2026-04-03 14:26:50 -07:00
resources feat(Maps): regional map downloads via go-pmtiles extract (#780) 2026-05-20 10:16:00 -07:00
scripts fix(supply-depot): correct Meshtastic Web internal port (80->8080); add catalog port audit script 2026-06-06 11:08:52 -07:00
start feat(supply-depot): opt-in automatic updates for installed apps 2026-06-07 15:56:42 -07:00
tests feat(supply-depot): opt-in automatic updates for installed apps 2026-06-07 15:56:42 -07:00
types feat(supply-depot): opt-in automatic updates for installed apps 2026-06-07 15:56:42 -07:00
util feat: display model download progress 2026-02-06 16:22:23 -08:00
views feat: initial commit 2025-06-29 15:51:08 -07:00
.editorconfig feat: initial commit 2025-06-29 15:51:08 -07:00
.env.example feat(config): respect REDIS_DB env var for queue and transmit 2026-06-07 15:11:22 -07:00
ace.js feat: initial commit 2025-06-29 15:51:08 -07:00
adonisrc.ts feat(GPU): auto-remediate nomad_ollama passthrough loss on admin boot (#755) 2026-05-20 10:16:00 -07:00
eslint.config.js feat: openwebui+ollama and zim management 2025-07-09 09:08:21 -07:00
package-lock.json chore: align package license with Apache-2.0 and fix README docs links/typos 2026-06-07 14:57:26 -07:00
package.json chore: align package license with Apache-2.0 and fix README docs links/typos 2026-06-07 14:57:26 -07:00
tailwind.config.ts feat: initial commit 2025-06-29 15:51:08 -07:00
tsconfig.json feat: initial commit 2025-06-29 15:51:08 -07:00
vite.config.ts fix(Maps): ensure proper parsing of hostnames (#640) 2026-04-03 14:26:50 -07:00