Installing murano-dashboard=3.0.0 deletes needed files

Bug #1659570 reported by Dr. Jens Harbott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
horizon (Ubuntu)
Fix Released
High
Corey Bryant
murano-dashboard (Ubuntu)
Fix Released
High
Corey Bryant

Bug Description

The reason is that in the postinst this is called:

/usr/share/openstack-dashboard/manage.py collectstatic --clear --noinput

where the "--clear" options means "delete existing files". The files are collected into /usr/share/openstack-dashboard/horizon/static/, now sadly there is a symlink:

# ls -l /usr/share/openstack-dashboard/openstack_dashboard/static/horizon
lrwxrwxrwx 1 horizon horizon 62 Oct 8 19:35 /usr/share/openstack-dashboard/openstack_dashboard/static/horizon -> ../../../../lib/python2.7/dist-packages/horizon/static/horizon

and manage.py happily follows that symlink and deletes all the files behind it, leading to failure of the "manage.py compress" called after that:

Compressing... CommandError: An error occurred during rendering /usr/share/openstack-dashboard/openstack_dashboard/templates/horizon/_conf.html: 'horizon/js/horizon.js' could not be found in the COMPRESS_ROOT '/usr/share/openstack-dashboard/static' or with staticfiles.

Now I'm not sure whether this error should be really attributed to murano-dashboard or to the way openstack-dashboard is packaged/set up. The issue happens identically if I run the collectstatic command manually without murano-dashboard being installed.

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

In the 2.0.0 version this part in the postinst file is commented out:

        # (tlbr) Run of collectstatic is required but do not run it until easy switch for
        # for Horizon package will be implemented.
        #/usr/share/openstack-dashboard/manage.py collectstatic --clear --noinput

I think I'll try what happens with that. Sadly simply reinstalling python-django-horizon that provided the deleted files did not solve everything, probably will have to reinstall things from scratch ... :-/

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi frickler, Thanks for reporting this. I assume you're using Ocata since that's when 3.0.0 was introduced. We've changed behavior of openstack-dashboard quit a bit in Ocata so I think some changes are required for the dashboard packages. I'll take a look.

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Actually, I was installing it onto a UCA Newton deployment on Xenial, as that is what murano-dashboard 3.0.0 would match, see https://releases.openstack.org/newton/index.html#horizon-plugins. Also needs some django package updated in zesty. If we get this issue fixed, I would hope that murano-dashboard 3.0.0 would get added to UCA Newton, too.

But anyway, the issue appears without murano-dashboard, just by running the collectstatic -c command, so that should get fixed independently. I also verified that this doesn't happen when I do the same thing on Debian testing, so it seems to be related to the way Ubuntu packaged horizon.

Changed in horizon (Ubuntu):
status: New → Fix Committed
Changed in murano-dashboard (Ubuntu):
status: New → Fix Committed
Changed in horizon (Ubuntu):
importance: Undecided → High
Changed in murano-dashboard (Ubuntu):
importance: Undecided → High
assignee: nobody → Corey Bryant (corey.bryant)
Changed in horizon (Ubuntu):
assignee: nobody → Corey Bryant (corey.bryant)
Revision history for this message
Corey Bryant (corey.bryant) wrote :

I've uploaded several new dashboards to zesty and started the backport process to the ocata cloud archive. This includes updates to the murano-dashboard and openstack-dashboard packages. Note that static assets are now aligned across dashboards and stored in /var/lib/openstack-dashboard/static/.

If you'd like to give it a try on Xenial:

sudo add-apt-repository ppa:ubuntu-cloud-archive/ocata-staging
sudo apt-get update

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

How much work would it be to make corresponding packages for Newton UCA?

I've tried to upgrade just openstack-dashboard from ocata-staging for my newton installation and that doesn't work too well.

Also at least for my setup /var/lib/openstack-dashboard/static/ should belong to horizon instead of www-data.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Can you try using openstack-dashboard from ocata-proposed? You may have picked up rc1 of openstack-dashboard which we haven't tested yet.

I don't see us backporting openstack-dashboard updates to Newton unfortunately because there were significant changes required.

I switched user:group from horizon to www-data to align openstack-dashboard with the all of the additional dashboards use (most of which we pick up from debian). The additional dashboards, such as murano-dashboard, change the user:group to www-data.

Changed in horizon (Ubuntu):
status: Fix Committed → Fix Released
Changed in murano-dashboard (Ubuntu):
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.