traditional openstack upgrade doesn't re-run register_configs()

Bug #1844325 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard Charm
Fix Released
High
Liam Young

Bug Description

In hooks/horizon_hooks.py we execute the following at load time:

CONFIGS = register_configs()

When the openstack payload is upgraded by the traditional (action-managed-upgrade=false), register_configs() is not re-run, which means code like this from register_configs() isn't re-run when upgraded from stein to train, which results in a failure because the conistency group config is still registered and an attempt to render it is still made:

    if (CompareOpenStackReleases(release) >= 'queens' and
            CompareOpenStackReleases(release) <= 'stein'):
        configs.register(
            CONSISTENCY_GROUP_POLICY,
            CONFIG_FILES[CONSISTENCY_GROUP_POLICY]['hook_contexts'])

Note that an action-managed upgrade does the right thing and re-runs register_configs()

summary: - traditional upgrade doesn't re-run register_configs()
+ traditional openstack upgrade doesn't re-run register_configs()
Liam Young (gnuoy)
Changed in charm-openstack-dashboard:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Liam Young (gnuoy)
milestone: none → 19.10
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-openstack-dashboard (master)

Reviewed: https://review.opendev.org/684682
Committed: https://git.openstack.org/cgit/openstack/charm-openstack-dashboard/commit/?id=56e4d3c3226b189dd3e8d0f526a5a7775c65a62b
Submitter: Zuul
Branch: master

commit 56e4d3c3226b189dd3e8d0f526a5a7775c65a62b
Author: Liam Young <email address hidden>
Date: Wed Sep 25 10:01:50 2019 +0000

    Stop running register_configs at load time

    Stop running register_configs so it is not run unnecessarily and
    simplifies unit tests. As part of this make sure that CONFIGS is
    refreshed after an upgrade as config files and contexts may
    have changed.

    Change-Id: I08a847abe7db22a11860f359442e1e8945585466
    Closes-Bug: #1844325

Changed in charm-openstack-dashboard:
status: Confirmed → Fix Committed
David Ames (thedac)
Changed in charm-openstack-dashboard:
status: Fix Committed → Fix Released
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.