[Bug 1815948] Re: [SRU] Upgrade from queens py2 -> rocky py2 packages breaks /usr/share/openstack-dashboard/openstack_dashboard

Corey Bryant corey.bryant at canonical.com
Wed Mar 6 21:57:03 UTC 2019


cosmic-proposed testing has completed successfully. I've confirmed
/usr/share directories and alternatives look correct and I've also
manually performed various tasks with the openstack dashboard.

Testing with python3-django-horizon:

ubuntu at juju-16ffc5-coreycb2-16:~$ ls -al /usr/share/openstack-dashboard/openstack_dashboard                                                                                                                
lrwxrwxrwx 1 root root 37 Mar  6 20:41 /usr/share/openstack-dashboard/openstack_dashboard -> /etc/alternatives/openstack_dashboard                                                                         
ubuntu at juju-16ffc5-coreycb2-16:~$ ls -al /usr/share/openstack-dashboard/openstack_dashboard/                                                                                                               
total 164                                                                                                                                                                                               
drwxr-xr-x  20 root root  4096 Mar  6 20:41 .                                                                                                                                                          
drwxr-xr-x 303 root root 20480 Mar  6 20:41 ..                                                                                                                                                            
-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                                                                                                                                       
drwxr-xr-x   2 root root  4096 Mar  6 20:41 __pycache__                                                                                                                                                    
drwxr-xr-x   4 root root  4096 Mar  6 20:41 api                                                                                                                                                  
drwxr-xr-x   4 root root  4096 Mar  6 20:44 conf                                                                                                                                                         
-rw-r--r--   1 root root  4469 Oct 22 13:46 context_processors.py                                                                                                                                         
drwxr-xr-x   4 root root  4096 Mar  6 20:41 contrib                                                                                                                                          
drwxr-xr-x   7 root root  4096 Mar  6 20:41 dashboards                                                                                     
drwxr-xr-x   3 root root  4096 Mar  6 20:41 django_pyscss_fix                                                               
drwxr-xr-x   3 root root  4096 Mar  6 20:44 enabled                                                                                                                                                    
-rw-r--r--   1 root root  2084 Oct 22 13:46 exceptions.py                                                                                                                                    
-rw-r--r--   1 root root  1063 Oct 22 13:46 hooks.py                                                                                                                                               
-rw-r--r--   1 root root  6794 Oct 22 13:46 karma.conf.js                                                                                                                                     
drwxr-xr-x   5 root root  4096 Mar  6 20:41 local                                                                                                                                                       
drwxr-xr-x  36 root root  4096 Mar  6 20:40 locale                                                                                                                                                
drwxr-xr-x   4 root root  4096 Mar  6 20:41 management                                                                                                                                             
-rw-r--r--   1 root root  2171 Oct 22 13:46 policy.py                                                                                                                                                 
-rw-r--r--   1 root root 15713 Feb 20 17:15 settings.py                                                                                                                                          
drwxr-xr-x   5 root root  4096 Mar  6 20:40 static                                                                                                                                                  
drwxr-xr-x   7 root root  4096 Mar  6 20:40 templates                                                                                                                                                    
drwxr-xr-x   3 root root  4096 Mar  6 20:41 templatetags                                                                                                                                       
drwxr-xr-x  11 root root  4096 Mar  6 20:41 test                                                                                                                                                         
-rw-r--r--   1 root root  2504 Oct 22 13:46 theme_settings.py                                                                                                                                             
drwxr-xr-x   5 root root  4096 Mar  6 20:40 themes                                                                                                                                             
-rw-r--r--   1 root root  2357 Oct 22 13:46 urls.py                                                                                                                                              
drwxr-xr-x   3 root root  4096 Mar  6 20:41 usage                                                                                                                                                
drwxr-xr-x   3 root root  4096 Mar  6 20:41 utils                                                                                                                                              
-rw-r--r--   1 root root  4195 Oct 22 13:46 views.py                                                                                                                                            
drwxr-xr-x   2 root root  4096 Mar  6 20:40 wsgi                                                                                                                                         
-rw-r--r--   1 root root   976 Oct 22 13:46 wsgi.py                                                                         
ubuntu at juju-16ffc5-coreycb2-16:~$ ls -al /etc/alternatives/openstack_dashboard                                                                                                   
lrwxrwxrwx 1 root root 50 Mar  6 20:41 /etc/alternatives/openstack_dashboard -> /usr/lib/python3/dist-packages/openstack_dashboard                          
ubuntu at juju-16ffc5-coreycb2-16:~$ apt policy openstack-dashboard                                           
openstack-dashboard:                                                                                           
  Installed: 3:14.0.1-0ubuntu2                                                                                   
  Candidate: 3:14.0.1-0ubuntu2                                                                                             
  Version table:                                                                                                                                                                                           
 *** 3:14.0.1-0ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu cosmic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     3:14.0.1-0ubuntu1 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu cosmic-updates/main amd64 Packages
     3:14.0.0-0ubuntu4 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu cosmic/main amd64 Packages
ubuntu at juju-16ffc5-coreycb2-16:~$ apt policy python3-django-horizon                                                                                                                                        
python3-django-horizon:                                                                                                                                                                            
  Installed: 3:14.0.1-0ubuntu2                                                                                                                                                                           
  Candidate: 3:14.0.1-0ubuntu2                                                                                                         
  Version table:                                                                           
 *** 3:14.0.1-0ubuntu2 500                                                                                                        
        500 http://archive.ubuntu.com/ubuntu cosmic-proposed/universe amd64 Packages        
        100 /var/lib/dpkg/status                                        
     3:14.0.1-0ubuntu1 500                                   
        500 http://nova.clouds.archive.ubuntu.com/ubuntu cosmic-updates/universe amd64 Packages                                                  
     3:14.0.0-0ubuntu4 500                                    
        500 http://nova.clouds.archive.ubuntu.com/ubuntu cosmic/universe amd64 Packages            


Testing with python-django-horizon:

ubuntu at juju-16ffc5-coreycb2-16:~$ ls -al /usr/share/openstack-dashboard/openstack_dashboard
lrwxrwxrwx 1 root root 37 Mar  6 20:41 /usr/share/openstack-dashboard/openstack_dashboard -> /etc/alternatives/openstack_dashboard
ubuntu at juju-16ffc5-coreycb2-16:~$ ls -al /usr/share/openstack-dashboard/openstack_dashboard/
total 224
drwxr-xr-x  19 root root  4096 Mar  6 21:48 .
drwxr-xr-x 258 root root 20480 Mar  6 21:48 ..
-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 Mar  6 21:48 __init__.pyc
drwxr-xr-x   3 root root  4096 Mar  6 21:48 api
drwxr-xr-x   4 root root  4096 Mar  6 21:50 conf
-rw-r--r--   1 root root  4469 Oct 22 13:46 context_processors.py
-rw-r--r--   1 root root  3393 Mar  6 21:48 context_processors.pyc
drwxr-xr-x   3 root root  4096 Mar  6 21:48 contrib
drwxr-xr-x   6 root root  4096 Mar  6 21:48 dashboards
drwxr-xr-x   2 root root  4096 Mar  6 21:48 django_pyscss_fix
drwxr-xr-x   2 root root 12288 Mar  6 21:48 enabled
-rw-r--r--   1 root root  2084 Oct 22 13:46 exceptions.py
-rw-r--r--   1 root root   929 Mar  6 21:48 exceptions.pyc
-rw-r--r--   1 root root  1063 Oct 22 13:46 hooks.py
-rw-r--r--   1 root root   560 Mar  6 21:48 hooks.pyc
-rw-r--r--   1 root root  6794 Oct 22 13:46 karma.conf.js
drwxr-xr-x   4 root root  4096 Mar  6 21:48 local
drwxr-xr-x  36 root root  4096 Mar  6 21:48 locale
drwxr-xr-x   3 root root  4096 Mar  6 21:48 management
-rw-r--r--   1 root root  2171 Oct 22 13:46 policy.py
-rw-r--r--   1 root root  2042 Mar  6 21:48 policy.pyc
-rw-r--r--   1 root root 15713 Feb 20 17:15 settings.py
-rw-r--r--   1 root root 13428 Mar  6 21:48 settings.pyc
drwxr-xr-x   5 root root  4096 Mar  6 21:48 static
drwxr-xr-x   7 root root  4096 Mar  6 21:48 templates
drwxr-xr-x   2 root root  4096 Mar  6 21:48 templatetags
drwxr-xr-x  10 root root  4096 Mar  6 21:48 test
-rw-r--r--   1 root root  2504 Oct 22 13:46 theme_settings.py
-rw-r--r--   1 root root  1446 Mar  6 21:48 theme_settings.pyc
drwxr-xr-x   5 root root  4096 Mar  6 21:48 themes
-rw-r--r--   1 root root  2357 Oct 22 13:46 urls.py
-rw-r--r--   1 root root  1646 Mar  6 21:48 urls.pyc
drwxr-xr-x   2 root root  4096 Mar  6 21:48 usage
drwxr-xr-x   2 root root  4096 Mar  6 21:48 utils
-rw-r--r--   1 root root  4195 Oct 22 13:46 views.py
-rw-r--r--   1 root root  4150 Mar  6 21:48 views.pyc
drwxr-xr-x   2 root root  4096 Mar  6 21:48 wsgi
-rw-r--r--   1 root root   976 Oct 22 13:46 wsgi.py
-rw-r--r--   1 root root   657 Mar  6 21:48 wsgi.pyc
ubuntu at juju-16ffc5-coreycb2-16:~$ ls -al /etc/alternatives/openstack_dashboard
lrwxrwxrwx 1 root root 52 Mar  6 21:48 /etc/alternatives/openstack_dashboard -> /usr/lib/python2.7/dist-packages/openstack_dashboard
ubuntu at juju-16ffc5-coreycb2-16:~$ apt policy openstack-dashboard
openstack-dashboard:
  Installed: 3:14.0.1-0ubuntu2
  Candidate: 3:14.0.1-0ubuntu2
  Version table:
 *** 3:14.0.1-0ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu cosmic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     3:14.0.1-0ubuntu1 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu cosmic-updates/main amd64 Packages
     3:14.0.0-0ubuntu4 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu cosmic/main amd64 Packages
ubuntu at juju-16ffc5-coreycb2-16:~$ apt policy python-django-horizon
python-django-horizon:
  Installed: 3:14.0.1-0ubuntu2
  Candidate: 3:14.0.1-0ubuntu2
  Version table:
 *** 3:14.0.1-0ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu cosmic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     3:14.0.1-0ubuntu1 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu cosmic-updates/main amd64 Packages
     3:14.0.0-0ubuntu4 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu cosmic/main amd64 Packages


** Tags removed: verification-needed-cosmic
** Tags added: verification-done-cosmic

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

Title:
  [SRU] Upgrade from queens py2 -> rocky py2 packages breaks /usr/share
  /openstack-dashboard/openstack_dashboard

Status in OpenStack openstack-dashboard charm:
  Invalid
Status in Ubuntu Cloud Archive:
  Invalid
Status in Ubuntu Cloud Archive rocky series:
  Fix Committed
Status in horizon package in Ubuntu:
  Invalid
Status in horizon source package in Cosmic:
  Fix Committed

Bug description:
  [Impact]
  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

  [Test Case]
  Deploy bionic-queens openstack-dashboard with openstack charms and upgrade to bionic-rocky.
  Ensure dashboard is functional after upgrade. /usr/share/openstack-dashboard/ should look like:
  ubuntu at juju-cc544d-coreycb2-24:~$ ls -l /usr/share/openstack-dashboard/
  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/alternatives/openstack_dashboard
  -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/openstack-dashboard/openstack_dashboard/. Prior to Rocky, the required files were copied into /usr/share/openstack-dashboard/openstack_dashboard/.

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