Add clear host deletion controls with workload safeguards

This commit is contained in:
2026-10-04 09:59:27 -04:00
parent 840f02b53e
commit 3d62dfff27
11 changed files with 334 additions and 13 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ guessable token. An unset setup token holds setup closed.
| Raw configs, file diffs, logs and telemetry diagnostics | No | Yes | Yes |
| Deploy/start/stop/restart/rebuild/remove servers | No | Yes | Yes |
| Scripts, plugins, configs, campaigns, betas and collections | Read summaries | Manage | Manage |
| Host setup, enrollment, credentials, runtime preparation and game-file upload/cache | Read status | Read status | Manage |
| Host setup, deletion, enrollment, credentials, runtime preparation and game-file upload/cache | Read status | Read status | Manage |
| Server keys and global settings/maintenance policies | No | No | Manage |
| Create users, change roles, disable accounts and reset passwords | No | No | Yes |
| Own password and sign out | Yes | Yes | Yes |
+15
View File
@@ -70,6 +70,9 @@ explicit installer `--reenroll` when local credentials already exist.
API outline:
- `GET /api/hosts/:id`: host details, operation history and deletion blockers.
- `DELETE /api/hosts/:id`: administrator removes an unused host and revokes access;
returns `409` if servers, reservations or unresolved delivered operations remain.
- `POST /api/agent/enroll`: consume enrollment token and return host credentials.
- `POST /api/agent/heartbeat`: authenticated inventory, current operation and caches.
- `GET /api/agent/operations`: deliver/reconcile durable operation IDs.
@@ -123,6 +126,18 @@ may still join until an eligible empty moment; draining does not kick them.
**Disable** holds agent dispatch. Neither mode, controller downtime nor agent
communication loss stops unrelated running containers.
Administrators can choose **Delete host** on a host card or at the top of its
detail page. The confirmation lists anything that must be resolved first:
registered servers, reserved ports, or operations already sent to the agent.
Drain the host or remove its servers, then let outstanding operations reconcile.
An unused host can be deleted before enrollment or while offline.
Deleting a host removes it from the controller's host list and deployment
choices, revokes its credentials, and invalidates unused installer links.
Queued commands that have never been sent to the agent are cancelled. Operation
history and published libraries are retained; the agent and game files remain on
the machine. Adding the machine again requires a new host enrollment.
## Libraries and ports
Choose the actual game folder, not its parent, a ZIP archive or the Plutonium