You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(install): the installer's apt-repository task can stall without bound (no timeout, no retry) #21358
The installer's "Add apt repository" task (autobot-slm-backend/ansible/roles/_shared/tasks/add_apt_repository_idempotent.yml, the apt_repository call used for the monitoring role's Grafana repository) can stall without bound. On a merge-train run of the install (tty) CI job the task started and produced no output for about 55 minutes, until the CI expect script (scripts/ci/clean_install_tty.exp) gave up with installer timed out. On the passing run of the same tree the same task finished in about 2 seconds.
The bounded apt retry added for #21325 wraps the CI/container apt calls; it does not cover apt calls made by the installer's own Ansible tasks, so this path has neither a timeout nor a retry. A real install on a host with a slow or unreachable third-party apt repository would hang the same way.
What stalled inside the task (repository fetch, name resolution, or a package-manager lock) was not determined from the log.
Acceptance criteria
The installer's apt-repository task is bounded: a single attempt cannot run longer than a configured limit, and it retries a bounded number of times before failing with a message that names the repository.
The limit and retry count come from configuration (no literals in the task file).
The CI expect script's wait for the installer is shorter than the job's useful budget, so a stalled installer fails in minutes, and it prints the last task it saw.
The installer log identifies which step stalled (fetch, key, lock) when the limit is hit.
A test or CI check exercises the bounded path (for example with an unroutable repository URL) and asserts the installer fails within the limit.
Evidence
Merge-train PR #21349, install (tty) job: last task logged Grafana (monitoring) | Record the verdict, then silence until installer timed out. The same job passed at the train's previous head and on the member PR's own run.
Related: #21325 (bounded apt/DNS retry for CI install jobs).
Update (2026-11-12): the most probable cause of the 30–65 minute silent stalls in the clean-install CI jobs was found in the CI fallback-mirror step, and is fixed in PR #21330 (head 35c18ab836): the fallback mirror was applied unconditionally and ordered first, so a stalling mirror cost timeout × (retries + 1) per index file. It is now applied only when the primary archive fails a bounded probe and the fallback passes it.
That does not change this issue: the installer's own apt-get update -qq calls and the Ansible apt-repository task are still quiet and unbounded, so on a real host with a slow or stalling apt source the install hangs with no output. Residual CI case: primary archive down AND fallback passes the probe and then stalls mid-update — bounded only by the step timeout.
Non-blocking findings from the independent review of that change, to pick up with this issue:
The mirror probe does not follow redirects, and accepts any non-empty 200 body (an HTML error page would pass); verify the response looks like a release file.
binary-amd64 is hardcoded in the probe path; derive the architecture.
An unknown third argument to the fallback script is silently ignored; reject it.
The probe discards the fetch tool's error output, so the reason a mirror was judged unhealthy is not logged.
Activity
mrveiss commentedon Nov 12, 2026
Update (2026-11-12): the most probable cause of the 30–65 minute silent stalls in the clean-install CI jobs was found in the CI fallback-mirror step, and is fixed in PR #21330 (head
35c18ab836): the fallback mirror was applied unconditionally and ordered first, so a stalling mirror cost timeout × (retries + 1) per index file. It is now applied only when the primary archive fails a bounded probe and the fallback passes it.That does not change this issue: the installer's own
apt-get update -qqcalls and the Ansible apt-repository task are still quiet and unbounded, so on a real host with a slow or stalling apt source the install hangs with no output. Residual CI case: primary archive down AND fallback passes the probe and then stalls mid-update — bounded only by the step timeout.Non-blocking findings from the independent review of that change, to pick up with this issue:
binary-amd64is hardcoded in the probe path; derive the architecture.