[SRU] Upgrade from queens py2 -> rocky py2 packages breaks /usr/share/openstack-dashboard/openstack_dashboard
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard Charm |
Invalid
|
Undecided
|
Unassigned | ||
Ubuntu Cloud Archive |
Invalid
|
Undecided
|
Unassigned | ||
Rocky |
Fix Released
|
High
|
Corey Bryant | ||
horizon (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
High
|
Corey Bryant |
Bug Description
[Impact]
After upgrading from queens->rocky with the openstack charms, /usr/share/
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:/
Also worth noting that the queens packages did not use alternatives for /usr/share/
Looking closer during the upgrade..
After step (1) we have:
$ update-alternatives --display openstack_dashboard juju-45afee-
update-
$ ls -al /usr/share/
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/
-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/
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_
-rw-r--r-- 1 root root 3388 Feb 14 18:57 context_
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-
python-
Installed: 3:13.0.1-0ubuntu4
Candidate: 3:13.0.1-0ubuntu4
Version table:
*** 3:13.0.1-0ubuntu4 500
500 http://
100 /var/lib/
At step (2) we have:
$ apt policy python-
python-
Installed: 3:14.0.
Candidate: 3:14.0.
Version table:
*** 3:14.0.
500 http://
100 /var/lib/
$ update-alternatives --display openstack_dashboard
openstack_dashboard - auto mode
link best version is /usr/lib/
link currently points to /usr/lib/
link openstack_dashboard is /usr/share/
/usr/lib/
$ ls -al /usr/share/
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/
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/
link currently points to /usr/lib/
link openstack_dashboard is /usr/share/
/usr/lib/
$ ls -al /usr/share/
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/
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
[Test Case]
Deploy bionic-queens openstack-dashboard with openstack charms and upgrade to bionic-rocky.
Ensure dashboard is functional after upgrade. /usr/share/
ubuntu@
total 24
drwxr-xr-x 3 root root 4096 Feb 20 19:17 bin
-rwxr-xr-x 1 root root 881 Feb 20 18:46 manage.py
lrwxrwxrwx 1 root root 37 Feb 20 19:17 openstack_dashboard -> /etc/alternativ
-rw-r--r-- 1 root root 15713 Feb 20 18:46 settings.py
[Regression Potential]
Low. This fix is limited to the rocky preinst script only. Rocky is the first release to use alternatives (symlinks) for /usr/share/
description: | updated |
description: | updated |
description: | updated |
summary: |
- Upgrade from rocky python2->python3 packages breaks openstack_dashboard - alternative + Upgrade from queens py2 -> rocky py2 packages breaks + /usr/share/openstack-dashboard/openstack_dashboard |
summary: |
- Upgrade from queens py2 -> rocky py2 packages breaks + [SRU] Upgrade from queens py2 -> rocky py2 packages breaks /usr/share/openstack-dashboard/openstack_dashboard |
description: | updated |
tags: | added: py3 |
Seems ok when just upgrading the py2 package from queens->rocky manually with:
$ sudo add-apt-repository cloud-archive: queens openstack- dashboard/ openstack- dashboard/ openstack_ dashboard/ openstack- dashboard/ openstack_ dashboard openstack- dashboard/ openstack_ dashboard -> /etc/alternativ es/openstack_ dashboard openstack- dashboard/ openstack_ dashboard/ processors. py processors. pyc
$ sudo apt update
$ sudo apt install openstack-dashboard
$ ls -al /usr/share/
$ ls -al /usr/share/
$ sudo add-apt-repository cloud-archive:rocky
$ sudo apt update
$ sudo apt dist-upgrade --yes
$ ls -al /usr/share/
lrwxrwxrwx 1 root root 37 Feb 14 19:26 /usr/share/
$ ls -al /usr/share/
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_
-rw-r--r-- 1 root root 3393 Feb 14 19:26 context_
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