Repository navigation
kolla: clean stale horizon template cache - #833
Merged
Merged
Conversation
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
marked this pull request as ready for review
November 6, 2026 11:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries the upstream kolla fix for https://bugs.launchpad.net/kolla/+bug/2171923 on 2026.1:
extend_start.shrunsmanage.py cleanup_angular_template_cachebetweencollectstaticandcompress, 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:
All five carried 2026.1 kolla patches apply in build order on stable/2026.1.
🤖 Generated with Claude Code