upgrade: preserve glance-registry for Queens

The glance-registry daemon was deprecated at Queens, but was still
installed for the Queens charm release; ensure that any re-install
of paste.ini files accomodates this as part of the charm upgrade
process, resolving issues with glance-registry not running due to
missing paste configuration files.

Change-Id: Iaaea4907ce4ef9d1e17b8ef9719e8bb0e0001946
Closes-Bug: 1812972
This commit is contained in:
James Page 2019-01-23 16:59:28 +00:00
parent d2f87c3e02
commit c24e2cf423
2 changed files with 4 additions and 5 deletions

View File

@ -531,11 +531,10 @@ def reinstall_paste_ini(force_reinstall=False):
if os.path.exists(paste_file):
os.remove(paste_file)
cmp_release = CompareOpenStackReleases(os_release('glance-common'))
if cmp_release < 'queens':
# glance-registry is deprecated at queens but still
# installed.
if cmp_release < 'rocky':
pkg_list = ['glance-api', 'glance-registry']
# glance-registry is deprecated in Queens
elif cmp_release < 'rocky':
pkg_list = ['glance-api']
# File is in glance-common for py3 packages.
else:
pkg_list = ['glance-common']

View File

@ -314,7 +314,7 @@ class TestGlanceUtils(CharmTestCase):
utils.reinstall_paste_ini()
self.apt_install.assert_called_with(
packages=['glance-api'],
packages=['glance-api', 'glance-registry'],
options=utils.REINSTALL_OPTIONS,
fatal=True
)