The default value for OFFLINE_COMPRESS is False, as per the Django
compressor docs. When using offline compression, it seems that different
request contexts may generate different CSS files with different names
by way of the SCSS generator. When the HTML is returned to the browser,
the CSS filename referenced will only exist on the node that received
the initial request and generated the CSS file locally, however in a
load-balanced scenario with multiple Horizon instances, the actual HTTP
request for the CSS file has a n-1/n chance of hitting another node that
may be lacking that file, resulting in an unstyled page.
Changing the OFFLINE_COMPRESS value to True enables Django to use the
pre-generated list of resources -- created via the manage.py compress
command -- which is stored in a manifest.json file and should be the
same name/content across the instances since it's not varying by request
context like during online compression.
Reviewed: https:/ /review. openstack. org/163183 /git.openstack. org/cgit/ stackforge/ os-ansible- deployment/ commit/ ?id=e6a9bc34ac7 6fced9c3faa3652 691c16aa63d735
Committed: https:/
Submitter: Jenkins
Branch: master
commit e6a9bc34ac76fce d9c3faa3652691c 16aa63d735
Author: Evan Callicoat <email address hidden>
Date: Tue Mar 10 16:00:05 2015 -0500
Enable offline compression for resource files
The default value for OFFLINE_COMPRESS is False, as per the Django
compressor docs. When using offline compression, it seems that different
request contexts may generate different CSS files with different names
by way of the SCSS generator. When the HTML is returned to the browser,
the CSS filename referenced will only exist on the node that received
the initial request and generated the CSS file locally, however in a
load-balanced scenario with multiple Horizon instances, the actual HTTP
request for the CSS file has a n-1/n chance of hitting another node that
may be lacking that file, resulting in an unstyled page.
Changing the OFFLINE_COMPRESS value to True enables Django to use the
pre-generated list of resources -- created via the manage.py compress
command -- which is stored in a manifest.json file and should be the
same name/content across the instances since it's not varying by request
context like during online compression.
Change-Id: Iccb9b8cd30b7a6 1435f9ccc813c40 32a24cbe52a
Closes-Bug: #1423783