Cluster administration
Inspect node capacity, run dry-run or active Swarm reconcile sweeps, restore services, and resolve stalled deployment queue jobs.
The Cluster view and cluster mutation APIs require the platform administrator flag provisioned through the platform's database or seed configuration. Organization ownership alone does not grant infrastructure administration access.
Read the cluster view
- Node capacity cards: show node state, availability, and CPU/memory reservations derived from service specs. Reserved resources differ from measured utilization shown in host telemetry charts.
- Per-node fit: free memory split across multiple nodes does not satisfy a single large task or a volume-pinned container requiring capacity on its stateful host.
- Missing usage samples: if a node metrics agent stops reporting, measured utilization may lag while reservation data remains visible.
Reconcile Swarm state (RECONCILE_DRY_RUN)
Reconcile now (POST /api/cluster/reconcile/) compares live Docker Swarm service state against Formatio's PostgreSQL application records to detect orphaned services or resource drift.
RECONCILE_DRY_RUNdefaults totrue: sweeps report proposed additions, updates, or removals without modifying running containers.- Verify the dry-run report carefully against your database before setting
RECONCILE_DRY_RUN=falsein production. - Large sweeps can defer concurrent changes to avoid simultaneous task replacements; inspect deferred and failed entries rather than assuming one pass updated every service.
[!NOTE] Reconciliation aligns known services with database records—it does not recreate workloads whose containers or images were removed externally. Use Restore for service recovery.
Restore services (POST /api/cluster/restore/)
Use Restore when database application records and registry images exist intact, but Swarm services must be recreated (for example after cluster maintenance):
- Open the Restore dialog to inspect the dry-run preview listing services eligible for restore vs. rebuild.
- Enable offline only when you want to recover stopped services while leaving healthy serving containers untouched.
- Apply only after verifying volume placement: restoring a stateful service without its underlying node-local volume creates an empty mount rather than recovering lost database files. See Persistent storage.
Deployment queue recovery
Inspect stuck or interrupted build workers via these APIs:
| Endpoint | Who can call | Purpose |
|---|---|---|
GET /api/deployment/queue/{id}/ |
Project collaborators & admins | Inspect status (pending, processing, completed, failed) and error_code |
GET /api/deployment/queue/stats/ |
Platform administrators | Aggregate queue depth, active claims, and worker diagnostics |
GET /api/deployment/queue/{id}/recovery/ |
Platform administrators | Fetch current claim_token and source_revision for an interrupted job |
POST /api/deployment/queue/{id}/resolve/ |
Platform administrators | Submit verified recovery outcome (completed or failed) |
Before resolving an uncertain queue job via POST /api/deployment/queue/{id}/resolve/, inspect build logs, worker output, and live runtime containers. The request body requires claim_token, source_revision, outcome (completed or failed), executor_stopped: true, and a human evidence explanation; stale claim tokens are rejected safely.
Escalation checklist
Before escalating a cluster issue, gather the organization/project ID, application ID, deployment or queue ID, node name, UTC timestamp, and exact task error message so platform and application events correlate unambiguously.