[SRU] Update of dashboard fails on Xenial

Bug #1594249 reported by Christoph Fiehe
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Invalid
Undecided
Unassigned
Mitaka
Fix Released
Critical
Unassigned
horizon (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Fix Released
Critical
Unassigned

Bug Description

[Impact]
NOTE: this bug is limited to the proposed pockets of xenial and trusty-mitaka (UCA).

I am currently trying to update the horizon dashboard on Ubuntu 16.04 running OpenStack Mitaka using the new versions coming in from the package repository.

aptitude update && aptitude safe-upgrade
Get: 1 http://archive.ubuntu.com/ubuntu xenial-proposed InRelease [247 kB]
Hit http://mirror2.hs-esslingen.de/mariadb/repo/10.1/ubuntu xenial InRelease
Hit http://de.archive.ubuntu.com/ubuntu xenial InRelease
Hit http://ppa.launchpad.net/vbernat/haproxy-1.6/ubuntu xenial InRelease
Get: 2 http://de.archive.ubuntu.com/ubuntu xenial-updates InRelease [94.5 kB]
Get: 3 http://de.archive.ubuntu.com/ubuntu xenial-backports InRelease [92.2 kB]
Get: 4 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Hit http://download.ceph.com/debian-jewel xenial InRelease
Hit http://www.rabbitmq.com/debian testing InRelease
Get: 5 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [213 kB]
Get: 6 http://de.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [209 kB]
Get: 7 http://de.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [96.7 kB]
Get: 8 http://de.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [93.9 kB]
Fetched 1,141 kB in 1s (1,011 kB/s)
W: http://download.ceph.com/debian-jewel/dists/xenial/InRelease: Signature by key 08B73419AC32B4E966C1A330E84AC2C0460F3994 uses weak dige st algorithm (SHA1)

Resolving dependencies...
The following packages will be upgraded:
  base-files linux-firmware lshw openstack-dashboard openstack-dashboard-ubuntu-theme python-django-horizon python-glanceclient
  python-oslo.concurrency
8 packages upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Need to get 41.8 MB of archives. After unpacking 539 kB will be used.
Do you want to continue? [Y/n/?] Y
Get: 1 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 base-files amd64 9.4ubuntu4.1 [68.4 kB]
Get: 2 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 openstack-dashboard-ubuntu-theme all 2:9.0.1-0ubuntu1 [79.5 kB]
Get: 3 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 python-glanceclient all 1:2.0.0-2ubuntu0.16.04.1 [92.1 kB]
Get: 4 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 python-oslo.concurrency all 3.7.1-0ubuntu1 [24.5 kB]
Get: 5 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 openstack-dashboard all 2:9.0.1-0ubuntu1 [2,442 kB]
Get: 6 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 python-django-horizon all 2:9.0.1-0ubuntu1 [6,272 kB]
Get: 7 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 lshw amd64 02.17-1.1ubuntu3.2 [215 kB]
Get: 8 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 linux-firmware all 1.157.1 [32.6 MB]
Fetched 41.8 MB in 0s (42.3 MB/s)
(Reading database ... 140753 files and directories currently installed.)
Preparing to unpack .../base-files_9.4ubuntu4.1_amd64.deb ...
Unpacking base-files (9.4ubuntu4.1) over (9.4ubuntu4) ...
Processing triggers for plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for initramfs-tools (0.122ubuntu8.1) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-25-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Setting up base-files (9.4ubuntu4.1) ...
Installing new version of config file /etc/update-motd.d/10-help-text ...
(Reading database ... 140753 files and directories currently installed.)
Preparing to unpack .../openstack-dashboard-ubuntu-theme_2%3a9.0.1-0ubuntu1_all.deb ...
Unpacking openstack-dashboard-ubuntu-theme (2:9.0.1-0ubuntu1) over (2:9.0.0-0ubuntu2.16.04.1) ...
Preparing to unpack .../python-glanceclient_1%3a2.0.0-2ubuntu0.16.04.1_all.deb ...
Unpacking python-glanceclient (1:2.0.0-2ubuntu0.16.04.1) over (1:2.0.0-2) ...
Preparing to unpack .../python-oslo.concurrency_3.7.1-0ubuntu1_all.deb ...
Unpacking python-oslo.concurrency (3.7.1-0ubuntu1) over (3.7.0-2) ...
Preparing to unpack .../openstack-dashboard_2%3a9.0.1-0ubuntu1_all.deb ...
Unpacking openstack-dashboard (2:9.0.1-0ubuntu1) over (2:9.0.0-0ubuntu2.16.04.1) ...
Preparing to unpack .../python-django-horizon_2%3a9.0.1-0ubuntu1_all.deb ...
Unpacking python-django-horizon (2:9.0.1-0ubuntu1) over (2:9.0.0-0ubuntu2.16.04.1) ...
Preparing to unpack .../lshw_02.17-1.1ubuntu3.2_amd64.deb ...
Unpacking lshw (02.17-1.1ubuntu3.2) over (02.17-1.1ubuntu3.1) ...
Preparing to unpack .../linux-firmware_1.157.1_all.deb ...
Unpacking linux-firmware (1.157.1) over (1.157) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up python-glanceclient (1:2.0.0-2ubuntu0.16.04.1) ...
Setting up python-oslo.concurrency (3.7.1-0ubuntu1) ...
Setting up python-django-horizon (2:9.0.1-0ubuntu1) ...
Setting up openstack-dashboard (2:9.0.1-0ubuntu1) ...
Collecting and compressing static assets...
Traceback (most recent call last):
  File "manage.py", line 25, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/compressor/management/commands/compress.py", line 286, in handle
    self.compress(sys.stdout, **options)
  File "/usr/lib/python2.7/dist-packages/compressor/management/commands/compress.py", line 124, in compress
    paths.update(str(origin) for origin in get_template_sources(''))
  File "/usr/lib/python2.7/dist-packages/compressor/management/commands/compress.py", line 124, in <genexpr>
    paths.update(str(origin) for origin in get_template_sources(''))
  File "/usr/share/openstack-dashboard/horizon/themes.py", line 140, in get_template_sources
    'templates'
  File "/usr/lib/python2.7/dist-packages/django/utils/_os.py", line 85, in safe_join
    'component ({})'.format(final_path, base_path))
django.core.exceptions.SuspiciousFileOperation: The joined path (/usr/share/openstack-dashboard-ubuntu-theme/static/themes/ubuntu/templates) is located outside of the base path component (/usr/share/openstack-dashboard/openstack_dashboard)
dpkg: error processing package openstack-dashboard (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of openstack-dashboard-ubuntu-theme:
 openstack-dashboard-ubuntu-theme depends on openstack-dashboard (= 2:9.0.1-0ubuntu1); however:
  Package openstack-dashboard is not configured yet.

dpkg: error processing package openstack-dashboard-ubuntu-theme (--configure):
 dependency problems - leaving unconfigured
Setting up lshw (02.17-1.1ubuntu3.2) ...
Setting up linux-firmware (1.157.1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 openstack-dashboard
 openstack-dashboard-ubuntu-theme
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up openstack-dashboard (2:9.0.1-0ubuntu1) ...
Collecting and compressing static assets...
Traceback (most recent call last):
  File "manage.py", line 25, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/compressor/management/commands/compress.py", line 286, in handle
    self.compress(sys.stdout, **options)
  File "/usr/lib/python2.7/dist-packages/compressor/management/commands/compress.py", line 124, in compress
    paths.update(str(origin) for origin in get_template_sources(''))
  File "/usr/lib/python2.7/dist-packages/compressor/management/commands/compress.py", line 124, in <genexpr>
    paths.update(str(origin) for origin in get_template_sources(''))
  File "/usr/share/openstack-dashboard/horizon/themes.py", line 140, in get_template_sources
    'templates'
  File "/usr/lib/python2.7/dist-packages/django/utils/_os.py", line 85, in safe_join
    'component ({})'.format(final_path, base_path))
django.core.exceptions.SuspiciousFileOperation: The joined path (/usr/share/openstack-dashboard-ubuntu-theme/static/themes/ubuntu/templates) is located outside of the base path component (/usr/share/openstack-dashboard/openstack_dashboard)
dpkg: error processing package openstack-dashboard (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of openstack-dashboard-ubuntu-theme:
 openstack-dashboard-ubuntu-theme depends on openstack-dashboard (= 2:9.0.1-0ubuntu1); however:
  Package openstack-dashboard is not configured yet.

dpkg: error processing package openstack-dashboard-ubuntu-theme (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 openstack-dashboard
 openstack-dashboard-ubuntu-theme

Any ideas what is going on and how the problem can be fixed?

[Test Case]

Install openstack-dashboard 2:9.0.1-0ubuntu1 from xenial-proposed.

[Regression Potential]
There should be very little regression potential. The package already defined a symlink from /usr/share/openstack-dashboard/openstack_dashboard/static/themes/ubuntu to /usr/share/openstack-dashboard-ubuntu-theme/static/themes/ubuntu. The fix uses the symlink to avoid the error reported in this bug. I've deployed openstack with this fix and navigated around the dashboard and the ubuntu theme looks fine.

Revision history for this message
Matthias Runge (mrunge) wrote :

This is not a horizon bug itself. this is a distribution issue.

Changed in horizon:
status: New → Invalid
no longer affects: horizon
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Jens, Thanks for reporting this. We're working on a fix. Note that this is limited to the openstack-dashboard package in the proposed pocket of xenial and the trusty-mitaka cloud archive.

Changed in cloud-archive:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Corey Bryant (corey.bryant) wrote :

9.0.1 introduced a safe_join() call in this change: https://github.com/openstack/horizon/commit/3c8c403f34aebcce731dcebbaf23f5cc672eed7f

And because the openstack-dashboard-ubuntu-theme package installs to /usr/share/openstack-dashboard-ubuntu-theme/static/themes/ubuntu/templates, which is outside of /usr/share/openstack-dashboard/openstack_dashboard, then the safe_join() fails with:

django.core.exceptions.SuspiciousFileOperation: The joined path (/usr/share/openstack-dashboard-ubuntu-theme/static/themes/ubuntu/templates) is located outside of the base path component (/usr/share/openstack-dashboard/openstack_dashboard)

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

I've uploaded a new openstack-dashboard package to the xenial review queue with a fix for this issue, and it is now awaiting sru team review.

summary: - Update of dashboard fails on Xenial
+ [SRU] Update of dashboard fails on Xenial
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Note: this is not a bug in yakkety since the openstack-dashboard-ubuntu-theme binary package has been merged into the openstack-dashboard package.

description: updated
description: updated
Changed in openstack-dashboard (Ubuntu):
status: New → Invalid
Changed in cloud-archive:
status: Triaged → Invalid
Changed in openstack-dashboard (Ubuntu Xenial):
importance: Undecided → Critical
Changed in cloud-archive:
importance: Critical → Undecided
Changed in openstack-dashboard (Ubuntu Xenial):
status: New → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jens, or anyone else affected,

Accepted horizon into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/horizon/2:9.0.1-0ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
affects: openstack-dashboard (Ubuntu) → horizon (Ubuntu)
Changed in horizon (Ubuntu Xenial):
status: Triaged → Fix Committed
Revision history for this message
James Page (james-page) wrote :

Hello Jens, or anyone else affected,

Accepted horizon into mitaka-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:mitaka-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-mitaka-needed to verification-mitaka-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-mitaka-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-mitaka-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Brian and James,

horizon 2:9.0.1-0ubuntu2 and 2:9.0.1-0ubuntu2~cloud0 have been verified successfully.

Thanks,
Corey

tags: added: verification-done verification-mitaka-done
removed: verification-mitaka-needed verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 2:9.0.1-0ubuntu2

---------------
horizon (2:9.0.1-0ubuntu2) xenial; urgency=medium

  * d/theme/ubuntu_theme.py: When setting UBUNTU_THEME for AVAILABLE_THEMES,
    use the symlinked path that already exists under
    /usr/share/openstack-dashboard/openstack_dashboard (LP: #1594249).

 -- Corey Bryant <email address hidden> Tue, 21 Jun 2016 13:41:09 -0400

Changed in horizon (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote :

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote :

This bug was fixed in the package horizon - 2:9.0.1-0ubuntu2~cloud0
---------------

 horizon (2:9.0.1-0ubuntu2~cloud0) trusty-mitaka; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 horizon (2:9.0.1-0ubuntu2) xenial; urgency=medium
 .
   * d/theme/ubuntu_theme.py: When setting UBUNTU_THEME for AVAILABLE_THEMES,
     use the symlinked path that already exists under
     /usr/share/openstack-dashboard/openstack_dashboard (LP: #1594249).

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.