charm R308 with no style sheet loaded

Bug #1903911 reported by Eric Desrochers
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard Charm
Fix Released
High
Eric Desrochers

Bug Description

openstack-dashboard starting w/ 308 introduce a style issue in horizon.

I have identified the offending commit, causing a regression:

0fe556e Update template to enable offline-compression

Which does the following:

templates/ocata/local_settings.py:
# Compress all assets offline as part of packaging installation
-#COMPRESS_OFFLINE = True
+COMPRESS_OFFLINE = True

On my reproducer:

# grep COMPRESS /etc/openstack-dashboard/local_settings.py
COMPRESS_OFFLINE = True

The above is messing with the style (see attachment horizon.png)

If I comment (#) live in my reproducer this line and test again, the style is back to normal. (see horizon2.png)

Tags: seg sts
Revision history for this message
Eric Desrochers (slashd) wrote :

Screenshot of the effect of "COMPRESS_OFFLINE = True".

tags: added: seg sts
Revision history for this message
Eric Desrochers (slashd) wrote :

Screenshot of the effect of reverting the commit to "#COMPRESS_OFFLINE = True".

description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

I'm not familiar with offline compression, but reading the django documentation, it looks like this could be tricky and not as simple as enabling it the way it has been done.

Since this is fairly new and horizon never had it before R308, I would vote for reverting the change, until one find out how to implement such functionality without breaking the WebUI.

Eric Desrochers (slashd)
description: updated
Revision history for this message
Michael Quiniola (qthepirate) wrote :

@slashd

I will test this out, as this is not an issue in my environment.

Revision history for this message
Michael Quiniola (qthepirate) wrote :

This is the screenshot from my environment with COMPRESS_OFFLINE = True.

Some extra information:
3x Openstack-Dashboard units
HA Cluster charm related

The hacluster is all behind ANOTHER haproxy as well (non-caching).

Using Firefox 79.0 on Ubuntu 20.04

@slashd, did you test your environment by redeploying or manually changing the local_settings.py file.

Revision history for this message
Eric Desrochers (slashd) wrote :

I deployed on Xenial/Queens, and that's how I discover the error.
If I manually change local_settings.py file, it fixes the style right away w/o restart or anything.

Revision history for this message
Michael Quiniola (qthepirate) wrote :

@slashd

Ok, my environment is Focal/Ussuri. Maybe thats the issue?

Revision history for this message
Eric Desrochers (slashd) wrote :

Interesting, I'll try to compare both Focal/Ussuri vs Xenial/Queens.

Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

For reference this is the review where this change was introduced: https://review.opendev.org/#/c/755595/

Did we come to a conclusion as to whether we should revert it or just do that change only for some series/releases? Thanks!

Changed in charm-openstack-dashboard:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

Also as pointed out by icey it looks like adding "COMPRESS_OFFLINE = True" to local_settings.py isn't enough. There is more to be done: https://docs.openstack.org/horizon/latest/install/from-source.html#static-assets

So I'm OK with reverting this change for now. @slashd would you like to create a review for this? Thanks!

Revision history for this message
Eric Desrochers (slashd) wrote :

@Aurelien,

Sure I'll take care of it beginning of next week.

Thanks for your input.

- Eric

Revision history for this message
Nobuto Murata (nobuto) wrote :

Cross-linking:
'compressor.exceptions.OfflineGenerationError: You have offline compression enabled but key "[...]" is missing from offline manifest. You may need to run "python manage.py compress".'
https://bugs.launchpad.net/charm-openstack-dashboard/+bug/1902890

Revision history for this message
Eric Desrochers (slashd) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-openstack-dashboard (master)

Reviewed: https://review.opendev.org/762684
Committed: https://git.openstack.org/cgit/openstack/charm-openstack-dashboard/commit/?id=6ba0b72827115447de0f3060940d66b079f6d7da
Submitter: Zuul
Branch: master

commit 6ba0b72827115447de0f3060940d66b079f6d7da
Author: Eric Desrochers <email address hidden>
Date: Fri Nov 13 11:35:14 2020 -0500

    Revert "Update template to enable offline-compression"

    This reverts commit 0fe556e389f4b7dcf68a5bbe1421c848cd78e6e1.

    Closes-Bug: 1903911
    Related-Bug: 1902890

    Change-Id: I3e774e1ce98a9e77905bf49075c95ba478cb13c3
    Signed-off-by: Eric Desrochers <email address hidden>

Changed in charm-openstack-dashboard:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-openstack-dashboard (stable/20.10)

Fix proposed to branch: stable/20.10
Review: https://review.opendev.org/762854

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/20.10
Review: https://review.opendev.org/763093

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-openstack-dashboard (stable/20.10)

Change abandoned by Eric Desrochers (<email address hidden>) on branch: stable/20.10
Review: https://review.opendev.org/762854
Reason: Will use the cherry pick approach instead.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-openstack-dashboard (stable/20.10)

Reviewed: https://review.opendev.org/763093
Committed: https://git.openstack.org/cgit/openstack/charm-openstack-dashboard/commit/?id=a3ae0e2475236855cf08a8567d7437ef609903d8
Submitter: Zuul
Branch: stable/20.10

commit a3ae0e2475236855cf08a8567d7437ef609903d8
Author: Eric Desrochers <email address hidden>
Date: Fri Nov 13 11:35:14 2020 -0500

    Revert "Update template to enable offline-compression"

    This reverts commit 0fe556e389f4b7dcf68a5bbe1421c848cd78e6e1.

    Closes-Bug: 1903911
    Related-Bug: 1902890

    Change-Id: I3e774e1ce98a9e77905bf49075c95ba478cb13c3
    Signed-off-by: Eric Desrochers <email address hidden>
    (cherry picked from commit 6ba0b72827115447de0f3060940d66b079f6d7da)

Changed in charm-openstack-dashboard:
assignee: nobody → Eric Desrochers (slashd)
milestone: none → 20.10
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.