Horizon is not generating CSS correctly
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
OpenStack-Ansible | ||||||
Juno |
Fix Released
|
Low
|
Steve Lewis | |||
Trunk |
Fix Released
|
Low
|
Evan Callicoat |
Bug Description
Horizon is not generating CSS correctly when it runs in a load balanced environment.
We need to configure the following settings to do it right :
COMPRESS_OFFLINE = True
COMPRESS_
and then run the compress:
sudo -u www-data horizon-manage.py collectstatic
sudo -u www-data horizon-manage.py compress
I have this problem pretty often in a 10.x deployment and here the log of an issue. After I did configure the local_settings.py with the settings above, the problem went away consistently
# ansible horizon_container -m shell -a 'service apache2 restart'
infra01_
* Restarting web server apache2
...done.
infra02_
* Restarting web server apache2
...done.
infra03_
* Restarting web server apache2
...done.
# ansible horizon_container -m shell -a 'curl -k https:/
infra01_
<link rel="stylesheet" href="/
100 1920 0 1920 0 0 48605 0 --:--:-- --:--:-- --:--:-- 49230
infra03_
<link rel="stylesheet" href="/
100 1920 0 1920 0 0 50517 0 --:--:-- --:--:-- --:--:-- 51891
infra02_
<link rel="stylesheet" href="/
100 1920 0 1920 0 0 51111 0 --:--:-- --:--:-- --:--:-- 51891
# https:/
infra03_
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /static/
<hr>
<address>
</body></html> % Total % Received % Xferd Average Speed Time Time Time Current
100 310 100 310 0 0 33659 0 --:--:-- --:--:-- --:--:-- 34444
infra02_
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap; % Total % Received % Xferd Average Speed Time Time Time Current
6 1178k 6 81920 0 0 4551k 0 --:--:-- --:--:-- --:--:-- 4705k
curl: (23) Failed writing body (4096 != 16384)
infra01_
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /static/
<hr>
<address>
</body></html> % Total % Received % Xferd Average Speed Time Time Time Current
100 310 100 310 0 0 34148 0 --:--:-- --:--:-- --:--:-- 38750
summary: |
- Horizion is not generating CSS correctly + Horizon is not generating CSS correctly |
description: | updated |
Changed in openstack-ansible: | |
assignee: | nobody → Evan Callicoat (apsu-2) |
importance: | Undecided → Low |
tags: | added: juno-backport-potential |
no longer affects: | openstack-ansible |
@Bjoern Teipel couple of questions:
is the deployment on 10.1.[1-2rc1]?
Have you seen this on other deployments IE Icehouse?
Do you have a way to consistently reproduce this issue?
Thanks for all the data you've already provided. Im looking into this now, but if you have anything else it would be much appreciated.