Skip to content

2026-11-11: webshop demo shop's upgrade to v1.137.10 stalled, its seed hook found fixture ids taken

Kind: reference (incident report)

Severity: warning (shop-demo is the staging shop, with no customers) · Status: resolved · Resolved by: operator agent · Duration: 0:05 from detection to the failed Job's removal, 08:52:55–08:57:14 UTC (fault from the first failed upgrade after 08:08:18; web promoted at 09:12:27) · Taskbase task: #2814

Summary

eloro/webshop-platform#696 raised the demo shop's image.tag from v1.112.0 to v1.137.10. Every Helm upgrade to it failed in the post-upgrade hook Job seed (shop seed --profile ci). The v1.137.10 ci profile adds fixture orders 10 and 11. The synthetic checks after the 03:00 reset by v1.112.0 had already taken those two ids. Flux rolled the release back to v1.112.0 four times and stalled, and the failed Job raised KubeJobFailed. The agent ran v1.137.10's own nightly reset once, which reseeds all 11 fixtures, and then forced the upgrade. The release reached v1.137.10 and the seed hook passed. This also delivered the checkout fix of the earlier incident the same day.

Impact

  • Services: shop-demo on webshop. HelmRelease shop-demo/shop was Stalled (RetriesExceeded) and Kustomization shop-demo was not Ready from the first failed upgrade until 08:57. The shop kept serving on v1.112.0, so the Stripe checkout failure of the earlier incident lasted until v1.137.10 was deployed.
  • Users: none outside the platform. The demo shop is staging.
  • Data: none lost that the design keeps. The extra reset at 08:57 emptied the shop's tables and seeded the ci profile again, as the nightly reset does. Before it ran, every order other than the 9 fixtures was a synthetic check (71 rows, ids 10–80, synthetic-check@demo.eloro.dk, all left by the failed checks). The backup gate's backup from 07:41:39 was restore-checked at 07:43:43, and the cluster archives WAL continuously.
  • Duration: alert from 08:52:55 until the forced upgrade deleted the failed Job at 08:57:14. The release was Ready at 08:57:32, and web-primary ran v1.137.10 from 09:12:27. The fault began with the first upgrade after #696 merged at 08:08:18. Helm keeps 5 revisions, so the first attempt's time is no longer recorded.

Timeline

All times UTC, 2026-11-11.

Time Event Source
03:00:00 CronJob seed-reset (v1.112.0) resets the shop: fixture orders 1–9, identities restarted Job seed-reset-29906100
03:02:57, 03:07:57 Synthetic checks create orders 10 and 11, then one order every 5 minutes up to 80 orders.customer_order.created_at
07:36:37 Skatzi/platform#1376 merges: backup gate target_version v1.137.10 Gitea
07:41:39–07:43:56 Gate backs up shop-demo-db (shop-demo-db-preupgrade-20261111074139) and restores it (preupgrade-demo lastSuccess 07:43:43) kubectl get backups, ConfigMap cnpg-drill/preupgrade-demo
08:08:18 eloro/webshop-platform#696 merges (0bda149): image.tag v1.137.10 Gitea
up to 08:26:34 Four upgrades, each ending post-upgrade hooks failed: timeout waiting for: [Job/shop-demo/seed status: 'InProgress'], each rolled back (revisions 190 at 08:21:03 and 192 at 08:26:34 are still in Helm's history) helm history shop
08:26:50–08:37:27 The last seed Job's 7 pods each log shop seed: seed orders.customer_order: 9 of 11 fixtures in place; another row holds a fixture's id pod logs
08:31:51 Rollback to 191 (revision 193). HelmRelease Stalled, RetriesExceeded: Failed to upgrade after 4 attempt(s). Kustomization shop-demo not Ready flux get
08:43:05 kube_job_failed{job_name="seed"} is 1 (BackoffLimitExceeded) Prometheus
08:52:55 Detected: KubeJobFailed fires (task #2814 at 08:53:56) Alertmanager on webshop
~08:55 operator agent confirms the alert is active and not silenced, then finds the cause Alertmanager and Prometheus through the Service proxy
08:57:02–08:57:08 Agent runs Job seed-reset-2814: shop seed --profile ci --reset on v1.137.10. Fixtures 1–11 are in place Job status, read-only SELECT
08:57:13–08:57:32 Agent runs flux reconcile helmrelease shop --force. Revision 194 is deployed and the seed hook passes; Helm deletes the failed Job (08:57:14) helm history, flux get
09:00:59, 09:09:55 Two new eloro/webshop-platform commits deploy as revisions 195 and 196; their seed hooks pass. Kustomization shop-demo Ready at f48f788c helm history, flux get
09:12:27 Resolved: Canary web Succeeded; web-primary and worker run v1.137.10 kubectl get canary,deploy
09:13 No KubeJobFailed and no shop alert in Alertmanager; shop_synthetic_checkout_success 1 Alertmanager and Prometheus

Root cause

shop seed --profile ci inserts the fixture orders with fixed ids (OVERRIDING SYSTEM VALUE ... ON CONFLICT DO NOTHING). It then fails if a fixture's id is held by a row other than the fixture (fixtureCheck, internal/db/seed_orders.go in eloro/webshop-platform: "A fixture whose id is already taken by another order fails the seed rather than being left out"). The nightly reset TRUNCATE ... RESTART IDENTITYs the shop tables (internal/db/seed.go, emptyShop). After it, new orders take the first ids above the fixtures that the running version seeded.

v1.112.0's ci profile has 9 orders and v1.137.10's has 11. After v1.112.0's 03:00 reset, the worker's synthetic checks took ids 10 and 11 within 8 minutes. From then on, v1.137.10's post-upgrade seed hook could not pass. The Job ran into BackoffLimitExceeded, and Helm timed out on the hook and rolled back. The demo chart deletes a hook Job only when it succeeds (hook-delete-policy: before-hook-creation,hook-succeeded), so the failed Job stayed and KubeJobFailed fired.

Waiting would not have fixed it. Every night the v1.112.0 reset hands ids 10 and 11 to the next synthetic checks again. The same failure will recur whenever a release adds a ci fixture with an id that the running version leaves free.

What the agent did

Against webshop with --context webshop (ops runbook, rules of engagement). The Job carries helm.sh/hook, so the runbook's KubeJobFailed for a Job that Flux applies sends it to the generic Flux freeze.

Read-only:

  1. Alertmanager api/v2/alerts through the Service proxy: KubeJobFailed, cluster=webshop, namespace=shop-demo, job_name=seed, active, no silence. Prometheus kube_job_failed{namespace="shop-demo"} > 0: seed 1.
  2. kubectl get jobs,pods -n shop-demo and get job seed -o yaml: a Helm hook Job (post-install,post-upgrade) on v1.137.10, BackoffLimitExceeded, 7 pods in Error. kubectl logs: 9 of 11 fixtures in place; another row holds a fixture's id.
  3. flux get kustomizations -A, flux get helmreleases -A, helm history shop: only shop-demo and shop-demo/shop not Ready, RetriesExceeded. Rollbacks restored v1.112.0.
  4. eloro/webshop-platform at v1.137.10 (Gitea API, read-only): internal/db/seed.go, seed_orders.go, chart/webshop/templates/seed-job.yaml, deploy/demo/README.md.
  5. psql in a BEGIN READ ONLY transaction: orders 1–9 are fixtures, and 10 and 11 are synthetic checks from 03:02:57 and 03:07:57. There were 71 synthetic orders and no other order. Migration 52, not dirty.
  6. Backup: ConfigMap cnpg-drill/preupgrade-demo targetVersion: v1.137.10, lastSuccess: 2026-11-11T07:43:43Z. Job preupgrade-shop-demo-db Complete. Backups shop-demo-db-preupgrade-20261111074139 and shop-demo-db-daily-20261111020000 completed.

Writes, one at a time:

  1. kubectl create job --from=cronjob/seed-reset seed-reset-2814 --dry-run=client -o yaml, with the image set to v1.137.10 (the tag Git pins) and ttlSecondsAfterFinished: 86400. Then kubectl apply --dry-run=server, then kubectl apply. This runs the shop's own nightly reset once on the version Git wants, so all 11 fixtures are seeded in one transaction. The demo README documents running the reset by hand. The Job completed in 5 s, and a read-only SELECT showed orders 1–11 as fixtures.
  2. flux reconcile helmrelease shop -n shop-demo --force (--force reruns the upgrade and its hooks, as the demo README says; --reset was not needed on Flux 2.9.6). Revision 194 was deployed with Upgrade complete, the seed hook passed, and Helm deleted the failed Job.

The agent changed nothing in Git for the fix: Git already named v1.137.10. It suspended nothing, added no annotation of its own, and set no silence. Job seed-reset-2814 deletes itself 24 h after it finished.

Resolution and verification

At 09:13, with --context webshop:

  • flux get kustomizations -A --status-selector ready=false and flux get helmreleases -A --status-selector ready=false: nothing. Nothing is suspended.
  • helm history shop: revision 196 deployed. Canary web Succeeded. web-primary and worker run webshop-platform:v1.137.10.
  • Prometheus (external_labels.cluster: webshop): kube_job_failed{namespace="shop-demo"} > 0 empty. shop_synthetic_checkout_success{namespace="shop-demo"} 1.
  • Alertmanager: only Watchdog, plus InfoInhibitor and CPUThrottlingHigh in flagger-system, both suppressed. No KubeJobFailed and no shop alert.

Follow-ups

  • eloro/webshop-platform: shop seed should not fail an upgrade on fixture ids that rows created after an older version's reset hold. For example, reserve a fixture id range above which the reset restarts the identities, or have the seed move a synthetic order out of a fixture's id. This belongs to eloro, which this run cannot reach in Taskbase; the owner files it there.
  • 2817: the ops runbook's generic Flux freeze assumed the cause is fixed in Git. It now covers a Helm hook that fails on data in the cluster, as here: Helm hook Job that fails on data in the cluster.

References

Open questions

  • When the first upgrade to v1.137.10 ran. Helm keeps 5 revisions, so the record starts at 08:20:40.
  • When the earlier incident's alerts (ShopErrorBudgetBurnFast, ShopSyntheticCheckoutFailing) resolved. They were not firing at 09:13. Whether checkout survives the next 03:00 reset is checked by the morning's synthetic checks; v1.137.10 then runs both the reset and the seed.