Skip to content

kolla: clean stale horizon template cache - #833

Merged
berendt merged 1 commit into
mainfrom
horizon-stale-angular-cache
Nov 6, 2026
Merged

berendt merged 1 commit into
mainfrom
horizon-stale-angular-cache

Conversation

@ideaship

@ideaship ideaship commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Carries the upstream kolla fix for https://bugs.launchpad.net/kolla/+bug/2171923 on 2026.1: extend_start.sh runs manage.py cleanup_angular_template_cache between collectstatic and compress, so a new Horizon container no longer compresses the previous release's angular templates from the shared cache.

Testing

Tested on the deployment where the failure was seen (OSISM 11.0.2 updated to latest, 2026.1), with the horizon image (25.7.4.dev37) and the image's real start path with the line added, the old release's fragment seeded in the shared valkey and three containers starting at once, as kolla-ansible restarts horizon by default, over 5 iterations:

  • without the line the failure reproduced: 6 of 15 containers answered HTTP 500;
  • with it all 15 served the new templates for both themes;
  • it also held when an old-release container rendered a page once at a random moment in the first 26 seconds (18 of 18).

All five carried 2026.1 kolla patches apply in build order on stable/2026.1.

🤖 Generated with Claude Code

Horizon renders its angular template preloads through a {% cache %}
fragment inside a {% compress %} block. With offline compression,
django-compressor names each compressed block after a hash of its
rendered content, both when "manage.py compress" writes the manifest
and when a request looks the block up. The fragment lives in the
shared Django cache (valkey on 2026.1), which outlives an image
change. After a Horizon image change, compress on the new containers
can hash the previous release's fragment and write a manifest without
the key for the new templates; those nodes then answer every page
with HTTP 500, OfflineGenerationError: key ... is missing from offline
manifest. A container restart does not recover them: the settings are
unchanged, so extend_start.sh skips the recompression.

This was seen on an update of OSISM 11.0.2 to latest (2026.1), on two
of three control nodes. The same failure is reported upstream:
https://bugs.launchpad.net/kolla/+bug/2171923

Carry the change proposed upstream for that bug, cherry-picked
unchanged onto stable/2026.1: extend_start.sh runs
"manage.py cleanup_angular_template_cache" between collectstatic and
compress, so every container compresses the templates on disk.

Known limit: it does not hold while an old-release horizon container
keeps rendering pages as the new ones start, as with host-by-host
restarts (kolla_serial) or a host that lags behind under user
traffic. The old container then writes its fragment back after the
cleanup, and the new containers serve the old templates or fail.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@ideaship ideaship added the zuul Release the dragons, run Zuul CI label Nov 3, 2026
@ideaship ideaship self-assigned this Nov 3, 2026
@ideaship ideaship added zuul Release the dragons, run Zuul CI and removed zuul Release the dragons, run Zuul CI labels Nov 4, 2026
@ideaship ideaship added help wanted Extra attention is needed zuul Release the dragons, run Zuul CI and removed zuul Release the dragons, run Zuul CI help wanted Extra attention is needed labels Nov 6, 2026
@ideaship
ideaship marked this pull request as ready for review November 6, 2026 11:03
@ideaship
ideaship requested a review from berendt November 6, 2026 11:03
@berendt
berendt merged commit 62bf120 into main Nov 6, 2026
4 checks passed
@berendt
berendt deleted the horizon-stale-angular-cache branch November 6, 2026 11:15
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zuul Release the dragons, run Zuul CI

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants