Skip to content

Deregister stopped services from the Registar #2846

Closed as not planned
Closed as not planned

Description

@josecelano-bot

SI-27 (roadmap row 24) of EPIC #1488. A follow-up of SI-21 (#2697): a service that stops in an orderly way removes its own registration from the shared Registar, so the registry lists only what is running. The full specification is in docs/issues/open/ once the specification pull request merges.

In scope: deregister the HTTP tracker, REST API, UDP tracker and health-check API bindings after an orderly drain, using Registar::deregister (available since torrust-server-lib 0.4.0); keep the registration when the stop failed, timed out or was aborted. The spec starts with a go/no-go decision, because the /health_check 503 short-circuit already hides the stale entries during a normal shutdown. Out of scope: the 503 behavior and any torrust-server-lib change. Lands before the first publish (#2583).

Activity

  1. added a commit that references this issue on Nov 13, 2026
  2. added 19 commits that reference this issue on Nov 16, 2026
  3. added a commit that references this issue on Nov 16, 2026
  4. josecelano-bot commented on Nov 17, 2026

    @josecelano-bot
    ContributorAuthor

    Closing as not planned. The go/no-go task (T1) decided no-go, and #2890 merged that decision into develop.

    Stopped services stay registered in the Registar until the process exits. Deregistering them would not change anything a caller can see:

    • During shutdown, /health_check returns 503 "shutting down" from the readiness state and never reads the registry. The health check API stops last, so that 503 covers the whole drain.
    • Outside shutdown, a service that stopped still fails its probe, so the health check reports it as failing. Keeping its entry never hides a fault.

    The decision and its reasons are in the registration lifetime ADR. The ADR also says when to revisit it: if the tracker ever restarts one service while the process keeps running. The archived spec is at docs/issues/closed/2846-1488-si-27-deregister-stopped-services/ISSUE.md. In EPIC #1488, row 24 is marked "Not planned", and SI-27 no longer holds up #2583.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions