Skip to content

Commit

Permalink
Drop use of SWIFT_CODENAMES when determining currently installed Swif…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
mpanduru authored Nov 22, 2024
1 parent 85dcbea commit bd53b0e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions charmhelpers/contrib/openstack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,16 +545,10 @@ def get_os_version_package(pkg, fatal=True):
if not codename:
return None

if 'swift' in pkg:
vers_map = SWIFT_CODENAMES
for cname, version in vers_map.items():
if cname == codename:
return version[-1]
else:
vers_map = OPENSTACK_CODENAMES
for version, cname in vers_map.items():
if cname == codename:
return version
vers_map = OPENSTACK_CODENAMES
for version, cname in vers_map.items():
if cname == codename:
return version


def get_installed_os_version():
Expand Down

0 comments on commit bd53b0e

Please sign in to comment.