2026-11-19: Harbor gate ran 68 minutes, KubeContainerWaiting fired on its waiting publish container¶
Kind: reference (incident report)
Severity: warning · Status: resolved · Resolved by: the gate finishing on its own, checked by the operator agent · Duration: 0:08 from detection to resolution, 23:06:03–23:14:27 UTC · Taskbase task: #3416
Summary¶
The amazon/aws-cli 2.41.1 → 2.41.2 merge (b1b739af, #1620) changed the image of the preflight and publish containers of the harbor-preupgrade Job. So Flux recreated the Job and the full Harbor backup gate ran, as the Renovate ADR §11, Backup tooling only expects. The gate runs in the init container gate, which took 68 min 29 s. For all of that time the main container publish waited in PodInitializing. After an hour, KubeContainerWaiting fired and reopened incident #3416. Nothing failed: the backup was verified by restoring it, the Job completed at 23:14:35, and the alert cleared. The same thing happened on 2026-11-18 (gate 63 min, alert 23:56:03 until 00:02:04 on 11-19), the first firing of #3416. No report was written for that one.
Impact¶
- Services: none from the alert. Harbor's writers (
harbor-core,harbor-jobservice,harbor-registry) were at 0 from 22:06:01 to 22:29:41 for the dump. That is the gate working as designed (Harbor backups: the upgrade gate), and it is not part of this incident.harborandharbor-postupgradewaited onharbor-preupgradefrom 22:05 to 23:15. - Users: none reported.
- Data: none at risk. Backup
hetzner-mgmt/harbor/preupgrade/20261119T220600Z-1.19.4-to-1.19.4was uploaded and verified by restoring it. - Duration: 8 min 24 s from detection (23:06:03) to
publishstarting (23:14:27). The alert was gone from Alertmanager at the 23:18:01 check. The gate ran from 22:05:58.
Timeline¶
All times UTC.
| Time | Event | Source |
|---|---|---|
| 21:57:11 | b1b739af merged: amazon/aws-cli 2.41.2, including the preflight and publish containers of components/harbor/backup/job.yaml |
commit, #1620 |
| 22:05:51 | Flux recreated Job harbor/harbor-preupgrade, pod harbor-preupgrade-twmzb |
Job creationTimestamp |
| 22:05:58 | Init container gate started. publish in PodInitializing from here |
pod status |
| 22:06:01 | Gate scaled harbor-core, harbor-jobservice, harbor-registry to 0 for the dump (registry copy 40.986 GiB) |
gate log |
| 22:29:41 | Dump pod succeeded, writers scaled back | gate log |
| 22:50:50 | Upload pod succeeded: registry.pgdump in 1 part, registry.tar in 42 parts |
gate log |
| 22:51:30 | Restore check pod harbor-scratch/harbor-restore-1795128651 created |
gate log |
| 23:06:03 | Detected: KubeContainerWaiting, pod=harbor-preupgrade-twmzb, container=publish, reason=PodInitializing. Taskbase reopened #3416 at 23:07:04 |
alert, task comment |
| 23:07:24 | Restore check: Restored projects: 4 (4), repositories: 23 (23), artifacts: 657 (657) |
restore pod log |
| 23:14:20 | smoke check passed, then Backup hetzner-mgmt/harbor/preupgrade/20261119T220600Z-1.19.4-to-1.19.4 verified. |
gate log |
| 23:14:27 | Resolved: gate exited 0, publish started (exit 0 at 23:14:33) |
pod status |
| 23:14:35 | Job Complete |
Job status |
| 23:15:20 | harbor-smoke Job complete. harbor-preupgrade, harbor, harbor-postupgrade Ready on main@sha1:b70d537a |
Job status, flux get |
| 23:18:01 | Prometheus and Alertmanager show no alert in harbor or harbor-scratch |
API queries |
Root cause¶
kube-prometheus's KubeContainerWaiting fires on kube_pod_container_status_waiting_reason{reason!="CrashLoopBackOff"} > 0 held for 1 hour. The Harbor gate Job runs its whole backup (dump, upload, restore check) in the init container gate. Its main container publish only records the result, so it waits in PodInitializing for as long as the gate runs. The gate now takes longer than an hour: 56 min on 2026-11-17 (#3314), 63 min on 2026-11-18, and 68½ min here. It grows with the registry bucket, which was copied as 40.986 GiB this time. So every gate run raises this alert, even a healthy one. Any change to the Job's pod template starts a gate run, and Renovate's image bumps of amazon/aws-cli or alpine/helm are such changes.
The KubePodNotReady alert on the restore check pod harbor-scratch/harbor-restore-1795128651 came from the same run. That pod spent 15 min in its fetch init container (22:52:03–23:07:18), and the alert was active at 23:07:29. It cleared when the gate deleted the pod at 23:14.
What the agent did¶
Read-only only, following the read-only checks of the alert's runbook (look at why the container is waiting). No write command was run on any cluster.
kubectl --context admin@mgmt-cluster get --raw '/api/v1/namespaces/monitoring/services/http:monitoring-kube-prometheus-alertmanager:9093/proxy/api/v2/alerts?active=true': at 23:07,KubeContainerWaitingwas active forharbor-preupgrade-twmzbwithcluster=hetzner-mgmt, not silenced. There were no active silences.kubectl --context admin@mgmt-cluster -n harbor get jobs,podsand the pod's container states: JobRunningfor 61 min with imageamazon/aws-cli:2.41.2.toolsandpreflighthad exited 0,gatewas running, andpublishwas waiting inPodInitializing. The Job'sactiveDeadlineSecondsis 28800.kubectl --context admin@mgmt-cluster -n harbor logs harbor-preupgrade-twmzb -c gate --timestampsandkubectl --context admin@mgmt-cluster -n harbor-scratch logs harbor-restore-1795128651 --all-containers: dump and upload had succeeded, both checksumsOK, DB restore counts matched. So the gate was progressing, not stuck.curl https://harbor.prod.skatzi.com/api/v2.0/health:healthy. All six Harbor Deployments and both StatefulSets were 1/1.git log origin/main:b1b739af(#1620) was the change that recreated the Job.kubectl --context admin@mgmt-cluster -n harbor wait job/harbor-preupgrade --for=condition=Complete --timeout=540s: met at 23:14:35. Recreating or deleting the Job was rejected, because that would run the gate again with Harbor's writers stopped.kubectl --context admin@mgmt-cluster -n flux-system wait kustomization/<harbor-preupgrade|harbor|harbor-postupgrade> --for=condition=Ready: all Ready by 23:15:23.- Prometheus
kube_pod_container_status_waiting_reason{namespace=~"harbor|harbor-scratch"} > 0andALERTS{namespace=~"harbor|harbor-scratch",alertstate="firing"}through the Service proxy, and the Alertmanager alerts again: all empty at 23:18:01.
Resolution and verification¶
flux --context admin@mgmt-cluster get kustomizations -A --status-selector ready=falseandflux --context admin@mgmt-cluster get helmreleases -A --status-selector ready=falseat 23:15: both empty.helm --kube-context admin@mgmt-cluster -n harbor history harbor: revision 17deployed,harbor-1.19.4, unchanged since 2026-11-05.- Job
harbor/harbor-preupgradeCompleteat 23:14:35. Jobharbor/harbor-smokecompleted at 23:15:20. - Harbor
/api/v2.0/health:healthy. - The alert was gone from Alertmanager and Prometheus at 23:18:01, with no silence covering it.
harbor-scratchholds only the completed weekly drill pods.
Follow-ups¶
-
3417: stop
KubeContainerWaiting(and theKubePodNotReadyon the restore check pod) from firing on a healthy Harbor gate, while a gate that is really stuck still alerts. Until it lands, each Harbor gate run reopens this incident.¶
References¶
- Alert:
KubeContainerWaiting, runbook - Taskbase incident task: #3416 (first firing 2026-11-18 23:56:03 for pod
harbor-preupgrade-lnknh, reopened 2026-11-19 23:07:04) - Pull requests: #1620 (
amazon/aws-cli2.41.2), #1575 (2.41.1, the first firing) - Runbook sections: Harbor backups: the upgrade gate, The restore check
Open questions¶
- Whether #3417 should also make tooling-only image bumps of the Harbor gate cheaper, rather than only silencing the alert. Each one stops Harbor's writers for about 24 minutes. The owner's decision #3453 on Gitea's tool-image gate runs may apply here too.