[Bug 1815948] Re: Upgrade from rocky python2->python3 packages breaks openstack_dashboard alternative

Corey Bryant corey.bryant at canonical.com
Thu Feb 14 19:30:55 UTC 2019


Seems ok when just upgrading the py2 package from queens->rocky manually
with:

$ sudo add-apt-repository cloud-archive:queens
$ sudo apt update
$ sudo apt install openstack-dashboard
$ ls -al /usr/share/openstack-dashboard/
$ ls -al /usr/share/openstack-dashboard/openstack_dashboard/
$ sudo add-apt-repository cloud-archive:rocky
$ sudo apt update
$ sudo apt dist-upgrade --yes
$ ls -al /usr/share/openstack-dashboard/openstack_dashboard
lrwxrwxrwx 1 root root 37 Feb 14 19:26 /usr/share/openstack-dashboard/openstack_dashboard -> /etc/alternatives/openstack_dashboard
$ ls -al /usr/share/openstack-dashboard/openstack_dashboard/
total 109
drwxr-xr-x  19 root root    41 Feb 14 19:26 .
drwxr-xr-x 252 root root   328 Feb 14 19:26 ..
-rw-r--r--   1 root root   204 Oct 22 13:46 .eslintrc
-rw-r--r--   1 root root     0 Oct 22 13:46 __init__.py
-rw-r--r--   1 root root   151 Feb 14 19:26 __init__.pyc
drwxr-xr-x   3 root root    23 Feb 14 19:26 api
drwxr-xr-x   4 root root     9 Feb 14 19:26 conf
-rw-r--r--   1 root root  4469 Oct 22 13:46 context_processors.py
-rw-r--r--   1 root root  3393 Feb 14 19:26 context_processors.pyc
drwxr-xr-x   3 root root     5 Feb 14 19:26 contrib
drwxr-xr-x   6 root root     8 Feb 14 19:26 dashboards
drwxr-xr-x   2 root root     4 Feb 14 19:26 django_pyscss_fix
drwxr-xr-x   2 root root   125 Feb 14 19:26 enabled
-rw-r--r--   1 root root  2084 Oct 22 13:46 exceptions.py
-rw-r--r--   1 root root   929 Feb 14 19:26 exceptions.pyc
-rw-r--r--   1 root root  1063 Oct 22 13:46 hooks.py
-rw-r--r--   1 root root   560 Feb 14 19:26 hooks.pyc
-rw-r--r--   1 root root  6794 Oct 22 13:46 karma.conf.js
drwxr-xr-x   4 root root     9 Feb 14 19:26 local
drwxr-xr-x  36 root root    36 Feb 14 19:25 locale
drwxr-xr-x   3 root root     5 Feb 14 19:26 management
-rw-r--r--   1 root root  2171 Oct 22 13:46 policy.py
-rw-r--r--   1 root root  2042 Feb 14 19:26 policy.pyc
-rw-r--r--   1 root root 15713 Dec  5 16:45 settings.py
-rw-r--r--   1 root root 13428 Feb 14 19:26 settings.pyc
drwxr-xr-x   5 root root     5 Feb 14 19:25 static
drwxr-xr-x   7 root root    17 Feb 14 19:26 templates
drwxr-xr-x   2 root root     8 Feb 14 19:26 templatetags
drwxr-xr-x  10 root root    22 Feb 14 19:26 test
-rw-r--r--   1 root root  2504 Oct 22 13:46 theme_settings.py
-rw-r--r--   1 root root  1446 Feb 14 19:26 theme_settings.pyc
drwxr-xr-x   5 root root     5 Feb 14 19:25 themes
-rw-r--r--   1 root root  2357 Oct 22 13:46 urls.py
-rw-r--r--   1 root root  1646 Feb 14 19:26 urls.pyc
drwxr-xr-x   2 root root    12 Feb 14 19:26 usage
drwxr-xr-x   2 root root    16 Feb 14 19:26 utils
-rw-r--r--   1 root root  4195 Oct 22 13:46 views.py
-rw-r--r--   1 root root  4150 Feb 14 19:26 views.pyc
drwxr-xr-x   2 root root     3 Feb 14 19:26 wsgi
-rw-r--r--   1 root root   976 Oct 22 13:46 wsgi.py
-rw-r--r--   1 root root   657 Feb 14 19:26 wsgi.pyc

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to horizon in Ubuntu.
https://bugs.launchpad.net/bugs/1815948

Title:
  Upgrade from rocky python2->python3 packages breaks
  openstack_dashboard alternative

Status in OpenStack openstack-dashboard charm:
  New
Status in horizon package in Ubuntu:
  New

Bug description:
  After upgrading from queens->rocky with the openstack charms,
  /usr/share/openstack-dashboard/openstack_dashboard is missing files
  because it is not a symlink (alternative) to /usr/lib/python3/dist-
  packages/openstack_dashboard.

  Note that the openstack charms are using py2 packages in queens and
  py3 packages in rocky. The upgrade process of the packages goes:

  (1) py2queens -> (2) py2rocky -> (3) py3rocky

  Bad state after upgrade: https://paste.ubuntu.com/p/3GnMTVfZDk/

  Also worth noting that the queens packages did not use alternatives
  for /usr/share/openstack-dashboard/openstack_dashboard. In that
  version of the package the files are copied into /usr/share/openstack-
  dashboard/openstack_dashboard during the package build so there are no
  symlinks/alternatives involved.

  Looking closer during the upgrade..

  After step (1) we have:

  $ update-alternatives --display openstack_dashboard
  juju-45afee-coreycb2-31: Thu Feb 14 19:03:22 2019

  update-alternatives: error: no alternatives for openstack_dashboard

  $ ls -al /usr/share/openstack-dashboard/
  total 56
  drwxr-xr-x   3 root root  4096 Feb 14 18:57 .
  drwxr-xr-x 127 root root  4096 Feb 14 18:56 ..
  lrwxrwxrwx   1 root root    41 Nov 27 19:22 horizon -> ../../lib/python2.7/dist-packages/horizon
  -rwxr-xr-x   1 root root   879 Nov 27 19:22 manage.py
  -rw-r--r--   1 root root   508 Feb 14 18:57 manage.pyc
  drwxr-xr-x  19 root root  4096 Feb 14 18:57 openstack_dashboard
  -rw-r--r--   1 root root 16748 Nov 27 19:22 settings.py
  -rw-r--r--   1 root root 14252 Feb 14 18:57 settings.pyc

  $ ls -al /usr/share/openstack-dashboard/openstack_dashboard/
  total 228
  drwxr-xr-x 19 root root  4096 Feb 14 18:57 .
  drwxr-xr-x  3 root root  4096 Feb 14 18:57 ..
  -rw-r--r--  1 root root   204 May  8  2018 .eslintrc
  -rw-r--r--  1 root root     0 May  8  2018 __init__.py
  -rw-r--r--  1 root root   149 Feb 14 18:57 __init__.pyc
  drwxr-xr-x  3 root root  4096 Feb 14 18:57 api
  drwxr-xr-x  4 root root  4096 Feb 14 19:01 conf
  -rw-r--r--  1 root root  4471 May  8  2018 context_processors.py
  -rw-r--r--  1 root root  3388 Feb 14 18:57 context_processors.pyc
  drwxr-xr-x  3 root root  4096 Feb 14 18:57 contrib
  drwxr-xr-x  6 root root  4096 Feb 14 18:57 dashboards
  drwxr-xr-x  2 root root  4096 Feb 14 18:57 django_pyscss_fix
  drwxr-xr-x  2 root root 12288 Feb 14 19:01 enabled
  -rw-r--r--  1 root root  2084 May  8  2018 exceptions.py
  -rw-r--r--  1 root root   927 Feb 14 18:57 exceptions.pyc
  -rw-r--r--  1 root root  1063 May  8  2018 hooks.py
  -rw-r--r--  1 root root   556 Feb 14 18:57 hooks.pyc
  -rw-r--r--  1 root root  6794 May  8  2018 karma.conf.js
  drwxr-xr-x  4 root root  4096 Feb 14 18:57 local
  drwxr-xr-x 36 root root  4096 Feb 14 18:56 locale
  drwxr-xr-x  3 root root  4096 Feb 14 18:57 management
  -rw-r--r--  1 root root  2171 May  8  2018 policy.py
  -rw-r--r--  1 root root  2034 Feb 14 18:57 policy.pyc
  -rw-r--r--  1 root root 16748 Nov 27 19:22 settings.py
  -rw-r--r--  1 root root 16675 Nov 27 19:22 settings.py.orig
  -rw-r--r--  1 root root 14292 Feb 14 18:57 settings.pyc
  drwxr-xr-x  7 root root  4096 Feb 14 18:56 static
  drwxr-xr-x  7 root root  4096 Feb 14 18:56 templates
  drwxr-xr-x  2 root root  4096 Feb 14 18:57 templatetags
  drwxr-xr-x 11 root root  4096 Feb 14 18:57 test
  -rw-r--r--  1 root root  4135 May  8  2018 theme_settings.py
  -rw-r--r--  1 root root  2130 Feb 14 18:57 theme_settings.pyc
  drwxr-xr-x  5 root root  4096 Feb 14 18:56 themes
  -rw-r--r--  1 root root  2335 May  8  2018 urls.py
  -rw-r--r--  1 root root  1617 Feb 14 18:57 urls.pyc
  drwxr-xr-x  2 root root  4096 Feb 14 18:57 usage
  drwxr-xr-x  2 root root  4096 Feb 14 18:57 utils
  -rw-r--r--  1 root root  4597 May  8  2018 views.py
  -rw-r--r--  1 root root  4430 Feb 14 18:57 views.pyc
  drwxr-xr-x  2 root root  4096 Feb 14 18:56 wsgi

  $ apt policy python-django-horizon
  python-django-horizon:
    Installed: 3:13.0.1-0ubuntu4
    Candidate: 3:13.0.1-0ubuntu4
    Version table:
   *** 3:13.0.1-0ubuntu4 500
          500 http://nova.clouds.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
          100 /var/lib/dpkg/status

  At step (2) we have:

  $ apt policy python-django-horizon
  python-django-horizon:
    Installed: 3:14.0.1-0ubuntu1~cloud0
    Candidate: 3:14.0.1-0ubuntu1~cloud0
    Version table:
   *** 3:14.0.1-0ubuntu1~cloud0 500
          500 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/rocky/main amd64 Packages
          100 /var/lib/dpkg/status

  $ update-alternatives --display openstack_dashboard

  openstack_dashboard - auto mode
    link best version is /usr/lib/python2.7/dist-packages/openstack_dashboard
    link currently points to /usr/lib/python2.7/dist-packages/openstack_dashboard
    link openstack_dashboard is /usr/share/openstack-dashboard/openstack_dashboard
  /usr/lib/python2.7/dist-packages/openstack_dashboard - priority 300

  $ ls -al /usr/share/openstack-dashboard/
  total 36
  drwxr-xr-x   4 root root  4096 Feb 14 19:06 .
  drwxr-xr-x 127 root root  4096 Feb 14 18:56 ..
  drwxr-xr-x   3 root root  4096 Feb 14 19:06 bin
  -rwxr-xr-x   1 root root   881 Dec  5 16:45 manage.py
  drwxr-xr-x   4 root root  4096 Feb 14 19:06 openstack_dashboard
  -rw-r--r--   1 root root 15713 Dec  5 16:45 settings.py

  $ ls -al /usr/share/openstack-dashboard/openstack_dashboard/
  total 24
  drwxr-xr-x 4 root root  4096 Feb 14 19:06 .
  drwxr-xr-x 4 root root  4096 Feb 14 19:06 ..
  drwxr-xr-x 2 root root  4096 Feb 14 19:06 conf
  drwxr-xr-x 2 root root 12288 Feb 14 19:06 enabled

  And after step (3) we have:

  $ update-alternatives --display openstack_dashboard
  openstack_dashboard - auto mode
    link best version is /usr/lib/python3/dist-packages/openstack_dashboard
    link currently points to /usr/lib/python3/dist-packages/openstack_dashboard
    link openstack_dashboard is /usr/share/openstack-dashboard/openstack_dashboard
  /usr/lib/python3/dist-packages/openstack_dashboard - priority 200

  $ ls -al /usr/share/openstack-dashboard
  total 36
  drwxr-xr-x   4 root root  4096 Feb 14 18:28 .
  drwxr-xr-x 127 root root  4096 Feb 14 17:29 ..
  drwxr-xr-x   3 root root  4096 Feb 14 18:28 bin
  -rwxr-xr-x   1 root root   881 Dec  5 16:45 manage.py
  drwxr-xr-x   4 root root  4096 Feb 14 18:28 openstack_dashboard
  -rw-r--r--   1 root root 15713 Dec  5 16:45 settings.py

  $ ls -al /usr/share/openstack-dashboard/openstack_dashboard/
  total 24
  drwxr-xr-x 4 root root  4096 Feb 14 18:28 .
  drwxr-xr-x 4 root root  4096 Feb 14 18:28 ..
  drwxr-xr-x 2 root root  4096 Feb 14 18:28 conf
  drwxr-xr-x 2 root root 12288 Feb 14 18:28 enabled

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-openstack-dashboard/+bug/1815948/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list