Skip to content

2026-11-17: Harbor upgrade gate filled its work volume, registry down for the dump

Kind: reference (incident report)

Severity: critical · Status: resolved · Resolved by: operator agent · Duration: 0:05 from detection to mitigation, 05:10–05:15 UTC (Harbor's writers down from 05:02); resolved at 07:40 when the re-run gate passed · Taskbase task: #3310, post-merge failure #3312, re-run #3314, Flux failure #3313, post-merge failure #3324

Summary

A Renovate image bump in the Harbor gate Job (#1511, alpine/helm 4.3.2) started a full pre-upgrade gate at 05:02 UTC. Since the last gate, the registry bucket skatzi-harbor-registry had grown to 31.6 GiB, more than the gate's 30 GiB work volume harbor-preupgrade-work holds. The copy filled the volume, and KubePersistentVolumeFillingUp fired at 05:10:54 while Harbor's core, jobservice and registry were scaled to 0. The operator deleted the doomed dump pod, so the gate's own trap scaled Harbor back. Harbor was healthy again by 05:15. The gate failed closed, so harbor-preupgrade, harbor and harbor-postupgrade stayed not Ready until a larger gate passed. After the larger volumes were merged (#1518), the operator re-ran the gate at 06:43 (#3314). It passed at 07:39, with the writers at 0 for 18m50s for the dump, and the three Kustomizations were Ready at 07:40.

Impact

  • Services: Harbor (harbor.prod.skatzi.com) had harbor-core, harbor-jobservice and harbor-registry at 0 from about 05:02:45 to 05:15. Image pulls and pushes through Harbor failed for that time. The Flux Kustomizations harbor and harbor-postupgrade wait on the failed gate, so no Harbor change from Git is applied until the gate passes (#3314). Harbor's HelmRelease itself stayed Ready on chart 1.19.4.
  • Re-run (#3314): the gate scaled the same three to 0 again from 06:43:44 to 07:02:34 (18m50s) for the dump of 32.0 GiB, by design. eloro CI never went quiet, so it ran with eloro's webshop-platform CI in flight: 6 jobs of runs 12271 and 12274 (pull requests eloro/webshop-platform#893 and #898) failed on Harbor: 4 could not pull skatzi/ci-base or library/kaniko-runner (failed to resolve reference), and 2 e2e jobs got 502 Bad Gateway from harbor.prod.skatzi.com/v2/. Their failed jobs were rerun at 07:05: run 12274 passed; in run 12271 every job passed but e2e (1), which pulled from Harbor and then failed a Playwright assertion of the pull request's own.
  • Users: pods and CI jobs that pulled a harbor.prod.skatzi.com image between 05:02 and 05:15 got pull errors. The record does not say which ones.
  • Data: none. The dump pod only read the database and the bucket. The volume it filled was the gate's temporary copy, which the gate's trap deleted. The production database, the bucket and earlier backups were not touched.
  • Duration: writers down about 12–13 minutes (05:02:45–05:15); detection at 05:10:54, mitigation at 05:15.

Timeline

All times UTC.

Time Event Source
04:59:03 #1511 merged (alpine/helm 4.3.2 in components/harbor/backup/job.yaml) commit ca0e42c9
05:02:28 Flux recreated Job harbor/harbor-preupgrade (the pod template changed); the gate scaled Harbor's writers to 0 and started harbor-preupgrade-dump Job creationTimestamp, gate log
05:10:54 Detected: KubePersistentVolumeFillingUp (critical) on harbor/harbor-preupgrade-work, 0 % free Alertmanager, task #3310
05:11:09 rclone attempt ⅓ failed with 12516 errors, no space left on device, after 29.284 GiB in 8 min registry-copy log
05:12 Operator: alert still active, not silenced, cluster=hetzner-mgmt Alertmanager API
05:13:36 Operator deleted pod harbor-preupgrade-dump; the gate script exited and its trap ran kubectl delete pod
05:14:19 Job harbor-preupgrade Failed (BackoffLimitExceeded); harbor-preupgrade HealthCheckFailed at ca0e42c9 (post-merge failure #3312) and at main@sha1:d735603d (#3313) Job events, Kustomization status
05:15:28 Resolved: harbor-core, harbor-jobservice, harbor-registry 1/1 available; /api/v2.0/health healthy kubectl get deploy, curl
05:16:54 Alert resolved (the work volume was deleted) Taskbase comment on #3310
05:29:33 KubeJobFailed fired on Job harbor-preupgrade (#3317) Alertmanager
06:03:03 KubeContainerWaiting fired on harbor-preupgrade-b4rg9, container publish (#3319) Alertmanager
06:26:42 #1518 merged (110 Gi work volume, 100 Gi scratch registry); harbor-preupgrade applied it at 06:33 Gitea, Kustomization status
06:33:03 harbor-preupgrade at 436719dd reported HealthCheckFailed (Job/harbor/harbor-preupgrade status: 'Failed'): the Job that failed at 05:14:19, unchanged by #1518, so not re-run (post-merge failure #3324) Flux event, Taskbase
06:43:30 Operator deleted the failed Job; Flux recreated it at 06:43:32 (#3314) kubectl delete job
06:43:44 Gate scaled Harbor's writers to 0 and started the dump gate log
06:44:00 KubeJobFailed (#3317) and KubeContainerWaiting on harbor-preupgrade-b4rg9 (#3319) cleared (last firing sample) Prometheus ALERTS
07:02:34 Dump done (32.0 GiB copied in 7m39s, then tarred); writers back to 1 gate log
07:05:06 Operator reran the failed jobs of eloro runs 12271 and 12274 Gitea API
07:37:11 Restore check passed: every blob verified, smoke pull of skatzi/terraform-runner/cache from the restored copy gate log
07:39:23 Job harbor-preupgrade Complete Job status
07:40:27 harbor-preupgrade, harbor, harbor-postupgrade Ready flux get kustomizations

Root cause

The gate copies the whole blob store from the bucket to the work volume harbor-preupgrade-work (30 GiB), then tars it (Harbor Backups, Upgrade Gate and Restore Drill). The page said the gate fails closed once the bucket outgrows the volumes. That happened here: hetzner_object_storage_version_bytes{bucket="skatzi-harbor-registry"} was 18.2 GiB on 2026-11-10, 28.0 GiB on 2026-11-16 and 31.6 GiB on 2026-11-17.

The bucket grows because of a Tag Immutability rule. Since 2026-11-04 it covers the *.*.* tags of webshop-platform, webshop-shop-template-frontend, charts/webshop and charts/webshop-admin (Harbor database, immutable_tag_rule; eloro #2436). Harbor's tag retention never deletes an immutable tag. The latest hourly retention run reported webshop-platform retained: 198, total: 198: 198 release tags pushed since 2026-11-03, 41 GB summed across artifacts, 15 GB in the last 7 days. Garbage collection runs daily (0 0 0 * * *) and succeeds, but it frees only what retention removes.

The gate does not run only on a chart change. It also runs on any change to the Job's pod template, so a Renovate image bump in job.yaml started this one with Harbor's writers at 0. Nothing warned that the bucket was nearing the gate's bound (#3315).

What the agent did

Read-only checks first, as the ops runbook and Read Alertmanager and Prometheus on a cluster say:

  1. kubectl --context admin@mgmt-cluster get --raw "$AM/api/v2/alerts": alert 6f9cd33e02ff7d30 was still active, with no silence and cluster=hetzner-mgmt.
  2. kubectl --context admin@mgmt-cluster -n harbor get pvc,jobs,pods, flux --context admin@mgmt-cluster get kustomizations -A: the gate Job had been running for 9 minutes, the dump pod was in registry-copy, harbor/harbor-postupgrade were waiting on harbor-preupgrade, and harbor-core, harbor-jobservice, harbor-registry were at 0 replicas.
  3. kubectl ... logs harbor-preupgrade-dump -c registry-copy: no space left on device, attempt ⅓ failed with 12516 errors after 29.284 GiB. The copy could not succeed. Read components/harbor/backup/scripts/preupgrade.sh and lib.sh: the script runs under set -euo pipefail, and run_pod waits up to 3600 s, so Harbor could have stayed down up to an hour. If the pod disappears, kubectl get pod fails, the script exits, and the cleanup trap scales the writers back.
  4. Write: kubectl --context admin@mgmt-cluster -n harbor delete pod harbor-preupgrade-dump --wait=false (05:13:36, exit 0). This ended a gate that could not pass, through its own failure path, to end the registry outage sooner. The gate's trap then deleted the temporary harbor-preupgrade-work (by design, not by the agent).
  5. kubectl ... get deploy, curl https://harbor.prod.skatzi.com/api/v2.0/health: writers 1/1 and healthy. Job Failed, PV of the work volume gone, harbor-scratch holds no gate objects.
  6. Checked that the failed Job does not run again: the live Job already ran alpine/helm:4.3.2, the image on main, so a retry of harbor-preupgrade re-applies an unchanged Job, and no further outage is pending.
  7. Read-only SQL (SELECT) on harbor-database-0, registry database: GC and retention schedules and executions, artifacts per repository, the retention and immutability rules. Prometheus: bucket size over 7 days.
  8. Pull request (this report's) — raised the gate's bound to about 100 GiB: harbor-preupgrade-work and the restore pod's work volume to 110 Gi, the scratch harbor-registry-pvc to 100 Gi, the rollback pod's work volume to 210 Gi, and the dump pod's wait to 7200 s; after review, the gate Job's deadline from 6h to 8h (harbor-preupgrade's timeout to 8h5m) and the drill's from 3h to 4h, each above the sum of the waits it covers; updated the gate page.

The re-run, in #3314:

  1. Read-only: kubectl --context admin@mgmt-cluster -n harbor get configmap harbor-backup-scripts -o yaml: harbor-preupgrade-work 110Gi, scratch harbor-registry-pvc 100Gi, once harbor-preupgrade had applied 436719dd (06:33). Prometheus hetzner_object_storage_version_bytes{bucket="skatzi-harbor-registry"}: 31.8 GiB. Gitea Actions: eloro had 3–4 jobs running and 19–28 waiting from 06:33 to 06:43, refilling as fast as it drained, so no quiet window came.
  2. Write: kubectl --context admin@mgmt-cluster -n harbor delete job harbor-preupgrade (06:43:30, exit 0), then flux --context admin@mgmt-cluster reconcile kustomization harbor-preupgrade (the Kustomization was annotated; the CLI timed out after 1m waiting for the 8h5m health check, as expected). Flux recreated the Job at 06:43:32.
  3. Write: POST /api/v1/repos/eloro/webshop-platform/actions/runs/{12271,12274}/rerun-failed-jobs (07:05, HTTP 201 each): their jobs had failed to pull from Harbor during the dump.
  4. Followed the Job to Complete (07:39:23) and the three Kustomizations to Ready (07:40:27); Helm release harbor stayed on revision 17, chart 1.19.4. Alertmanager: no KubeJobFailed or KubeContainerWaiting in harbor.

The Flux failure task, #3313 (read-only, no write):

  1. 3313 is the post-merge failure task Taskbase raised for the same HealthCheckFailed at 05:14:19. Its revision d735603d is the commit Flux had applied when the gate failed (a platform-docs image bump), not the cause: the gate was started by #1511. #1518 fixed it forward and the re-run (#3314) passed, so nothing was left to roll back or fix. Checked at 08:04: Job harbor-preupgrade Complete, the three Kustomizations Ready at main@sha1:5e0ad46f, and no Alertmanager alert in harbor.

No silence was set, and nothing was suspended or annotated by hand.

Rollback evidence (#3312): the failed change was the gate Job's image, not Harbor, so nothing was rolled back. The fix went forward in #1518 (larger volumes), and the gate passed with alpine/helm:4.3.2 from #1511. Helm release harbor stayed on revision 17, chart 1.19.4, the whole time. At 08:01 UTC: harbor-preupgrade, harbor, harbor-postupgrade Ready at main@sha1:5e0ad46f, Job harbor-preupgrade Complete, no Kustomization not Ready, /api/v2.0/health healthy.

Resolution and verification

  • kubectl --context admin@mgmt-cluster -n harbor get deploy harbor-core harbor-jobservice harbor-registry: each 1/1 available at 05:15:28.
  • GET https://harbor.prod.skatzi.com/api/v2.0/health: healthy, no unhealthy component.
  • flux --context admin@mgmt-cluster get helmreleases -n harbor: harbor Ready, Helm revision 17 deployed on chart 1.19.4.
  • Alertmanager: no alert in namespace harbor after 05:16:54.
  • After the re-run (#3314): Job harbor-preupgrade Complete; flux --context admin@mgmt-cluster get kustomizations -n flux-system: harbor-preupgrade, harbor, harbor-postupgrade Ready at main@sha1:b16be6f0.
  • kubectl --context admin@mgmt-cluster get --raw "$AM/api/v2/alerts" filtered on KubeJobFailed and KubeContainerWaiting in harbor: nothing, at 07:40:47.

Follow-ups

  • 3314 — re-ran the gate once this pull request was merged: the volumes are in the scripts ConfigMap, so Flux does not recreate the Job on its own. Done; the gate passed.

  • 3324 — the post-merge failure of harbor-preupgrade at 436719dd (06:33:03), raised from the same failed Job before the re-run. Checked at 08:22: Job harbor-preupgrade Complete (created 06:43:32, completed 07:39:23), harbor-preupgrade Ready and Healthy at main@sha1:3b9ea0fc, flux get kustomizations -A --status-selector ready=false empty, Helm release harbor revision 17 deployed, no alert in harbor. No rollback was needed: Harbor's chart never changed.

  • 3315 — alert when the Harbor bucket nears the gate's bound.

  • 3316 — the owner's decision on bounding the gate's downtime: prune the immutable release tags (eloro #2690), copy the bucket incrementally, or accept the growing downtime.

References

  • Alert: KubePersistentVolumeFillingUp, https://runbooks.prometheus-operator.dev/runbooks/kubernetes/kubepersistentvolumefillingup
  • Taskbase incident task: #3310; the alerts of the failed Job: #3317 (KubeJobFailed), #3319 (KubeContainerWaiting); Flux's post-merge failure of harbor-preupgrade at ca0e42c9: #3312; the Flux failure of harbor-preupgrade at d735603d: #3313; the post-merge failure of harbor-preupgrade at 436719dd: #3324; the re-run: #3314
  • Runs: the operator run of #3310
  • Pull requests: #1511 (the image bump that started the gate); #1518 (the larger volumes, with this report); the re-run's pull request (this report's update)
  • Runbook sections: Harbor upgrade gate, ops runbook rules of engagement

Open questions

  • Which pods or CI jobs failed to pull from Harbor between 05:02 and 05:15.
  • How long the drill takes with a 30–100 GiB backup. The gate's restore check of the 32.0 GiB backup took 20 minutes (07:17:29–07:37:11); the whole gate took 56 minutes.
  • Whether eloro #2690 (prune of release tags) has been decided; this run cannot read the eloro organization's tasks.