Repository navigation
Closed
Labels
Description
Parent EPIC: #1488 - Overhaul: Tracker Shutdown (roadmap step 7).
Goal
Migrate only the HTTP tracker component to the supervised cancellation tree. The tracker bootstrap derives a component child CancellationToken from JobManager; the HTTP tracker receives it, starts graceful Axum draining through the token-aware helper, joins its server and drain-controller children, and reports one named component outcome to JobManager.
Scope
- Add an HTTP tracker start path that accepts an injected component
CancellationToken. - Derive one child token per configured HTTP tracker instance in
src/app.rs. - Use the token-aware, joinable Axum drain helper from Add Token-Aware, Joinable Axum Drain Helper #2274.
- Retain and join the HTTP server and drain-controller tasks inside the HTTP component's owned task tree.
- Add deterministic token-cancellation, normal-drain, unexpected-completion, bootstrap-propagation, and legacy-compatibility coverage.
- Verify the migrated production path through the direct tracker binary PID, bounded
SIGTERMshutdown, and listener rebind.
Constraints
- Preserve the source and behavior compatibility of existing
HttpServer::startandHttpServer::stopconsumers. - Do not subscribe to
SIGINTorSIGTERMinside the HTTP server package. - Keep nested server and drain handles owned by the HTTP component;
JobManagerreceives only the component's top-level outcome. - Do not migrate REST API, health-check API, UDP, or standalone environment consumers.
Acceptance Criteria
- Each configured HTTP tracker instance receives a
JobManager-derived child token. - Token cancellation starts Axum draining through the new helper and the component awaits server and drain-controller completion.
- Tests cover normal and unexpected completion without OS signals, plus bootstrap wiring and legacy compatibility.
- Manual evidence shows one token-driven HTTP shutdown path, clean bounded direct-PID
SIGTERMexit, and immediate binding reuse. linter allpasses.
The full reviewed specification, implementation plan, commit points, verification matrix, ownership contract, and rollback strategy are tracked in docs/issues/open/<issue-number>-1488-si-11-migrate-http-tracker-token-lifecycle/ISSUE.md after promotion.
Prerequisites: #2234 and #2274. Related: #1586, #1588, #2132, #2169, #2221.
Activity
docs(issues): add issue specification for torrust#2289
Merge #2291: docs(issues): [#2289] add issue specification
Merge torrust#2297: feat(http-tracker): [torrust#2289] migrate HTTP t…
chore(issues): archive closed issue #2289 spec to docs/issues/closed
Merge #2305: chore(issues): archive closed issue #2289 spec to docs/i…