Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mpanduru opened this issue Nov 22, 2024 · 0 comments · May be fixed by #915

Comments

@mpanduru
Copy link

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.'}.
mpanduru added a commit to mpanduru/charm-helpers that referenced this issue Nov 22, 2024
…t version

Since the SWIFT_CODENAMES and PACKAGE_CODENAMES are not maintained as of Wallaby, the currently installed version of Swift should be determined similarly to how it is done for other OpenStack packages: by identifying the current release using the openstack-release package.

The current approach causes Swift upgrades from source versions subsequent to Victoria to fail to be detected.


Fixes: juju#914
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant