[19.04] upgrading the charm causes python3-neutron-lbaas-dashboard to be reinstalled even if charm-octavia-dashboard is present

Bug #1827868 reported by Dmitrii Shcherbakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard Charm
Triaged
High
Unassigned

Bug Description

Running upgrade-charm on charm-openstack-dashboard leads to lbaas dashboard installation albeit charm-octavia-dashboard has already been installed prior to that.

bundle: https://paste.ubuntu.com/p/SFsftWTVzb/

unit-openstack-dashboard-0: 00:24:48 INFO unit.openstack-dashboard/0.juju-log Installing ['python3-neutron-lbaas-dashboard'] with options: ['--option=Dpkg::Options::=--force-confold']
unit-openstack-dashboard-0: 00:24:48 DEBUG unit.openstack-dashboard/0.upgrade-charm Reading package lists...
unit-openstack-dashboard-0: 00:24:48 DEBUG unit.openstack-dashboard/0.upgrade-charm Building dependency tree...
unit-openstack-dashboard-0: 00:24:48 DEBUG unit.openstack-dashboard/0.upgrade-charm Reading state information...
unit-openstack-dashboard-0: 00:24:49 DEBUG unit.openstack-dashboard/0.upgrade-charm The following NEW packages will be installed:

dpkg -l | grep dashboard
ii heat-dashboard-common 1.5.0-0ubuntu3~cloud0 all OpenStack orchestration service - Common files
ii openstack-dashboard 3:15.0.0-0ubuntu1~cloud0 all Django web interface for OpenStack
ii openstack-dashboard-common 3:15.0.0-0ubuntu1~cloud0 all Django web interface for OpenStack - common files
ii openstack-dashboard-ubuntu-theme 3:15.0.0-0ubuntu1~cloud0 all Transitional dummy package for Ubuntu theme for Horizon
ii python3-designate-dashboard 8.0.0-0ubuntu1~cloud0 all OpenStack DNS as a Service - Python 3 dashboard plugin
ii python3-heat-dashboard 1.5.0-0ubuntu3~cloud0 all OpenStack orchestration service - Python 3 dashboard plugin
ii python3-neutron-fwaas-dashboard 2.0.1-0ubuntu1~cloud0 all OpenStack Firewall as a Service - dashboard plugin
ii python3-neutron-lbaas-dashboard 6.0.0-0ubuntu1~cloud0 all Loadbalancer-as-a-Service driver for OpenStack Neutron - Python 3
ii python3-octavia-dashboard 3.0.0-0ubuntu1~cloud0 all OpenStack Load Balance as a service - dashboard plugin

➜ charm-octavia-dashboard git:(master) grep -RiP lbaas
src/lib/charm/openstack/octavia_dashboard.py: purge_packages = ['python3-neutron-lbaas-dashboard']
src/metadata.yaml: This is the dashboard for the OpenStack LBaaS service, Octavia.

description: updated
description: updated
description: updated
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Dmitri, which version of OpenStack / Ubuntu is this on please?

Note, it looks like the offending code is in hooks/horizon_utils.py:determine_packages() which is called from the upgrade-charm hook:

line 260:

def determine_packages():
    """Determine packages to install"""
    packages = deepcopy(BASE_PACKAGES)
    release = CompareOpenStackReleases(os_release('openstack-dashboard'))
    # Really should be handled as a dep in the openstack-dashboard package
    if release >= 'mitaka':
        packages.append('python-pymysql')
    if release >= 'ocata' and release < 'rocky':
        packages.append('python-neutron-lbaas-dashboard')
    if release >= 'queens':
        packages.append('python-designate-dashboard')
        packages.append('python-heat-dashboard')
        packages.append('python-neutron-fwaas-dashboard')
    if release >= 'rocky':
        packages = [p for p in packages if not p.startswith('python-')]
        packages.extend(PY3_PACKAGES)
    return list(set(packages))

Changed in charm-openstack-dashboard:
status: New → Incomplete
importance: Undecided → High
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

Alex, it's bionic-stein

Changed in charm-openstack-dashboard:
status: Incomplete → New
Revision history for this message
David Ames (thedac) wrote :

TRIAGE:

Determine packages requires more logic to avoid installing python3-neutron-lbaas-dashboard when octavia is already installed.

Changed in charm-openstack-dashboard:
milestone: none → 19.07
status: New → Triaged
David Ames (thedac)
Changed in charm-openstack-dashboard:
milestone: 19.07 → 19.10
David Ames (thedac)
Changed in charm-openstack-dashboard:
milestone: 19.10 → 20.01
tags: added: charm-upgrade
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Marking as a duplicate of #1853851. Note, although this one is older, the dupped bug has essentially outlined the solution.

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.