Skip to content

2026-11-18: Gitea down three times, its backup gate ran for tool-image bumps

Kind: reference (incident report)

Severity: critical · Status: resolved · Resolved by: each gate run ended on its own, after a drained merge by the operator agent (#3368, #3382 and the #1575 merge run); investigated by the operator agent (#3379), prevention by the owner's decision #3453 (skip when nothing upgrades), carried out by #3454 · Duration: three firings of 11 min (16:07:03–16:18:03, 18:31:03–18:42:03, 23:01:33–23:12:33 UTC); Gitea down 16:02–16:13, 18:26–18:37 and 22:57–23:07 · Taskbase task: #3379

Summary

ProbeFailed fired three times on 2026-11-18 for https://gitea.prod.skatzi.com and /api/healthz, each time for about 10 minutes. Helm did not replace Gitea: the last Helm revision is 12, from 2026-11-15. Each window came from the gitea-preupgrade backup gate, which scaled Gitea to 0 for its dumps. Three Renovate PRs had changed a tool image in the gate Job's pod template: #1538 (bitnami/kubectl digest), #1553 (amazon/aws-cli 2.41.0) and #1575 (amazon/aws-cli 2.41.1). Every merge recreated the Job, and the gate took a full backup from Gitea 28.3.0 "to" 28.3.0, the version Gitea was already running. The windows were expected: they were drain-class merges, and the operator drained each one as Renovate ADR §11 says. They were also avoidable, because nothing was being upgraded. The proposed fix is the owner's decision #3453. Separately, every probe failed for one minute at 13:24–13:25 while the Cilium 1.20.4 upgrade restarted the Cilium agents and cilium-envoy.

Impact

  • Services: Gitea (web, API, git over HTTPS, Actions) gave no answer or 503 three times for about 10 minutes. Harbor's registry gave 502 in the same windows while harbor-preupgrade dumped (the operator observed 502 from about 18:25 to 18:56 on #1553), but Harbor's front-page probe kept passing. At 13:24:30–13:25:30, all 22 blackbox probes failed for about a minute.
  • Users: agent work in every organization was held while each merge drained: 15:27:35–16:57, 17:47:26–18:55:40 and 22:31:51–23:37:45, 3 h 44 min in total. Gitea Actions jobs still running at the 30-minute cap of the first two merges ran into the outage: eloro run 12585, eloro run 12630 and Skatzi run 12631. For #1553, the docs release run 12636 failed on Harbor's 502 and was re-run successfully at 18:56.
  • Data: none lost. Gitea was stopped, not changed. Each gate verified its backup by restoring it.
  • Duration: Gitea down 16:01:30–16:12 (replicas 0 → 1), 18:26–18:36, and 22:56–23:06:30. /api/healthz failed from about 30 s after the scale-down until about a minute after the scale-up. The alert fires after 5 minutes, so each firing started 5 minutes into its window.

Timeline

All times UTC, 2026-11-18.

Time Event Source
13:18:29 #1362 (Cilium 1.20.4) merged as 524e1c48 Git
13:24:13–13:25:24 Cilium operator, agents and cilium-envoy pods restart on the new version kube_pod_start_time
13:24:30–13:25:30 All 22 blackbox probes fail, Gitea included. Too short for ProbeFailed (5 min) probe_success == 0
15:27:35 Operator merge run for #1538 (task #3368) holds agent work in 8 organizations evidence on #1538
15:57:50 #1538 (bitnami/kubectl digest, gate container) merged at the 30-minute cap as 514b75e4 Git, evidence
16:01:08 gitea-preupgrade Job starts. 16:01:30: deployment/gitea scaled 1 → 0 kube_job_status_start_time, kube_deployment_spec_replicas
16:07:03 Detected: ProbeFailed for both Gitea probes. Incident #3379 created at 16:08:03 alert, task
16:11:55 Dumps done, Gitea scaled back. Pod gitea-668d986489-87bxt starts; /api/healthz passes from 16:14 pod start, probe
16:18:03 Alert resolved; #3379 closed by Taskbase task comment
16:22:34 Gate Complete; backup 20261118T160122Z-28.3.0-to-28.3.0 verified Job, evidence
16:57 Hold released evidence on #1538
17:23:38 #1557 (task #3373) documents tool-image changes in gitea-preupgrade as drain-class Git
17:47:26 Operator merge run for #1553 (task #3382) holds agent work evidence on #1553
18:18:00 #1553 (amazon/aws-cli 2.38.2 → 2.41.0, preflight and publish containers) merged at the cap as ce86bcf2 Git, evidence
18:25:30 Gate starts. 18:26: Gitea scaled 1 → 0 Job, replicas
18:31:03 ProbeFailed again; #3379 reopened at 18:32:03 task comment
18:35:56 Gitea back (pod gitea-668d986489-l2lg4); first 200 at 18:37:28 pod start, evidence
18:42:03 Alert resolved; #3379 closed by Taskbase task comment
18:49:39 Gate Complete Job
18:55:40 Hold released evidence on #1553
22:31:51 Merge run for #1575 holds agent work; fully drained at 22:50 evidence on #1575
22:50:22 #1575 (amazon/aws-cli 2.41.0 → 2.41.1) merged as 003aefab Git
22:55:42 Gate starts, log: Backing up Gitea 28.3.0 (docker.gitea.com/gitea:28.3.0-rootless) before 28.3.0 to hetzner-mgmt/gitea/preupgrade/20261118T225548Z-28.3.0-to-28.3.0. 22:56: Gitea scaled 1 → 0 kubectl logs job/gitea-preupgrade -c gate, replicas
23:01:33 ProbeFailed again; #3379 reopened at 23:02:33 and marked flapping task comment
23:06:09 Gitea back (pod gitea-668d986489-zghfw, the current one); probes pass from 23:08 pod start, probe
23:12:33 Alert resolved; #3379 stays open for a person because it flapped task comment
23:20:57 Gate Complete Job
23:37:45 Hold released evidence on #1575

Root cause

The gitea-preupgrade Job (components/gitea/backup/job.yaml) has kustomize.toolkit.fluxcd.io/force: Enabled, so Flux recreates it whenever its pod template changes. It is meant to run when TARGET_VERSION moves, but its preflight and publish containers (amazon/aws-cli) and its gate container (bitnami/kubectl) are in the same template. A Renovate bump of either image recreates the Job as well. scripts/preupgrade.sh does not compare the running version with TARGET_VERSION. It always scales deployment/gitea to 0, dumps the database and files with the running image, and scales Gitea back before it uploads and restore-checks the backup. So each of these PRs stopped Gitea for about 10 minutes and backed up 28.3.0 "to" 28.3.0.

The pod was replaced because the Deployment went to 0 replicas and back. All four pods of the day belong to ReplicaSet gitea-668d986489, the same one as on 2026-11-15, so the pod template did not change. Helm made no revision, and Gitea restarted 0 times.

This is documented behaviour. Renovate ADR §11, Backup tooling only, says such a PR "runs a full gate, with the writers stopped, against the unchanged target", and the owner accepted that on #1654. Drain before a gate takes a shared service offline makes such PRs drain-class, as of #1557 (task #3373), merged between the first and second window. So the three outages were planned, drained merges, not a fault. They cost three Gitea outages and 3 h 44 min of held agent work in one day, though no version changed. amazon/aws-cli alone released twice that day. harbor-preupgrade ran the same way three times: Backing up Harbor chart 1.19.4 … before 1.19.4.

The one minute at 13:24 is a separate cause: the Cilium upgrade from #1362 restarted the agents and the Envoy that serves the Gateway, so every host failed at once. Harbor's probe failed only in that minute.

What the agent did

Only read-only commands. There was no write to the cluster, no silence, no suspend. All commands ran with --context admin@mgmt-cluster (--kube-context for helm) on 2026-11-19 around 06:50 UTC. The steps followed the ProbeFailed runbook, read-only checks first.

  1. kubectl get --raw "$AM/api/v2/alerts" through the Alertmanager Service proxy returned only Watchdog and NodeHighMemoryUsage, each labelled cluster=hetzner-mgmt. ProbeFailed was not firing. $AM/api/v2/silences had no active silence, so the alert had really resolved and was not silenced.
  2. kubectl get --raw "$PROM/api/v1/query_range?query=probe_success{instance=~"https://gitea.prod.skatzi.com.*"}…" (60 s steps, 12:00–01:00) gave the failure windows 13:25, 16:02–16:13, 18:26–18:37 and 22:57–23:07.
  3. flux get kustomizations -A and flux get helmreleases -A showed every object Ready. helm history -n gitea gitea showed the last revision, 12, deployed on 2026-11-15 19:18:47, so Helm made no change on 2026-11-18.
  4. kubectl -n gitea get jobs,pods showed gitea-preupgrade Complete (25 m, age 7h55m, image amazon/aws-cli:2.41.1) and the Gitea pod gitea-668d986489-zghfw, 0 restarts.
  5. Prometheus kube_deployment_spec_replicas{deployment="gitea"}, kube_job_status_start_time and kube_job_status_completion_time{job_name="gitea-preupgrade"}, and kube_pod_start_time for the Gitea and Cilium pods gave the scale-downs, gate runs and pod starts in the timeline.
  6. kubectl -n gitea logs job/gitea-preupgrade -c gate showed the 28.3.0 … before 28.3.0 backup. kubectl -n harbor logs job/harbor-preupgrade showed the same for Harbor 1.19.4.
  7. git log --first-parent main for 2026-11-18, plus git diff of each merge, matched #1538, #1553 and #1575 to components/gitea/backup/job.yaml, and #1362 to Cilium.
  8. Gitea API: GET /repos/Skatzi/platform/pulls/{1538,1553,1575} and their comments showed merged_by ops-agent, the label drain-before-merge, and each run's Upgrade evidence with its hold, drain and resume times.
  9. probe_success == 0 for all instances at 13:20–13:30 showed all 22 probes failing at 13:24:30–13:25:30.
  10. Read preupgrade.sh, store.sh latest and the rollback rehearsal. A skip would need a force switch for the rehearsal, which deletes the Job to take a same-version backup.
  11. Created decision #3453 (owner) and task #3454 (operator, waits for #3453). Wrote this report and added a line to the ProbeFailed runbook in the same pull request.

Resolution and verification

At 2026-11-19 06:50 UTC:

  • Alertmanager on hetzner-mgmt has no ProbeFailed alert and no silences.
  • https://gitea.prod.skatzi.com/api/healthz returns 200. Through the Service proxy it reports "status": "pass" with database:ping and cache:ping passing.
  • flux get kustomizations -A --status-selector ready=false and flux get helmreleases -A --status-selector ready=false both return nothing.

Follow-ups

  • 3453 (owner's decision): should the backup gates skip the backup when nothing is upgraded (recommended), should Renovate batch the gate's tool images monthly, or should things stay as they are? Answered on 2026-11-22: skip when nothing upgrades, with a force switch for the rehearsal.

  • 3454 (operator): carried out the answer for gitea-preupgrade and harbor-preupgrade (the pull request closing issue Skatzi/platform#1596): both gates pass without a backup when the running version equals TARGET_VERSION, unless the annotation platform.skatzi.com/preupgrade-force forces one. Renovate ADR §11, the backup and rollback pages and the drain-class rule were updated with it.

  • In this pull request: the ProbeFailed runbook now lists a backup gate scaling the backend down as a typical reason.

References

Open questions

  • Whether a Gitea maintenance or read-only mode could replace the scale-to-0. preupgrade.sh says only that Gitea before 1.26 had none, and Gitea now runs 28.3.0. This run did not check it.