default release selector function and subordinates

Bug #1865510 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charms.openstack
Fix Released
High
Frode Nordahl

Bug Description

The fallback for the default release selector function in charms.openstack is to consult the charms install source configuration option (typically ``openstack-origin`` or ``source``).

Subordinate charms typically defer this configuration to their principle charm, and subsequently do not have it available as a configuration option of its own.

At present this makes it impossible to make use of the default release selector function for a subordinate charm. While the framework provides means for the charm to provide its own default release selector function I think it would be generally applicable to all subordinate charms to fix this in the default one provided by the framework.

One way to go about it could be to combine lookup of packages available in the APT cache (not installed packages) with the charm provided package codename map. A working version of this can be viewed in [0]

0: https://review.opendev.org/#/c/708225/7/src/lib/charm/openstack/ovn_chassis.py

Revision history for this message
Frode Nordahl (fnordahl) wrote :
Changed in charms.openstack:
importance: Undecided → High
assignee: nobody → Frode Nordahl (fnordahl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charms.openstack (master)

Reviewed: https://review.opendev.org/713788
Committed: https://git.openstack.org/cgit/openstack/charms.openstack/commit/?id=d8b376cde28ef37d4a3144dada37529618333663
Submitter: Zuul
Branch: master

commit d8b376cde28ef37d4a3144dada37529618333663
Author: Frode Nordahl <email address hidden>
Date: Thu Mar 19 07:56:44 2020 +0100

    Allow release selection to work for subordinate charms

    The release selection function bases its decision on installed
    packages and falls back to looking up OpenStack release codename
    from source configuration option when no packages are installed.

    Subordinate charms do not have a source configuration option,
    thus we want to make it possible for a charm author to request
    the release selection decision be made based on what is currently
    available in the system APT cache alone.

    Our principle charm should already have configured the system
    with the desired UCA pocket enabled.

    The charm author requests this behaviour by setting the
    ``source_config_key`` to an empty string.

    Note that functions for upgrading between releases etc also
    depend on the charm having a source configuration option but
    that is OK as the subordinate has no business dealing with
    that and should defer such operations to its principle charm.

    Change-Id: Ieae81619e06dc287c2c42ec944425be4de13d0d6
    Closes-Bug: #1865510

Changed in charms.openstack:
status: In Progress → 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.