Skip to content

Swift upgrade from versions subsequent to Victoria fail to be detected due to missing codename mapping #914

@mpanduru

Description

@mpanduru

Description:

Swift upgrades from source versions subsequent to Victoria fail to be detected. The issue occurs because the get_os_version_package function cannot find a valid codename for versions beyond Victoria. This is the chain of events that lead to this issue:

  • The function do_action_openstack_upgrade calls openstack_upgrade_available(package) to determine if an OpenStack upgrade is available for the specified package, Swift in this case (reference).
  • Inside openstack_upgrade_available, the current Swift version is determined by get_os_version_package (reference).
  • The function get_os_version_package attempts to find the version by looking up the SWIFT_CODENAMES dictionary (reference). However, since the version is not included in SWIFT_CODENAMES, the function returns None.
  • As a result, openstack_upgrade_available determines that no upgrade is available, returning False (reference).
  • Because openstack_upgrade_available(package) returns False, the do_action_openstack_upgrade function sets the action status to {'outcome': 'no upgrade available'} and terminates without performing the upgrade (reference).

Expected Behavior:

The charm should correctly identify the Source version, compare it to the Target version, and proceed with the upgrade.

Current Behavior:

The upgrade fails because the SWIFT_CODENAMES mapping does not include entries for versions beyond Victoria, returning {'outcome': 'no upgrade available'}.

Possible Solution

Determine the Swift version similarly to how it is done for other OpenStack packages: by identifying the current release using the openstack-release package.

Steps to Reproduce:

  1. Attempt to upgrade Swift from Wallaby to Xena.
  2. Observe that the upgrade fails with the message: {'outcome': 'no upgrade available.'}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions