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:
parent
d2f87c3e02
commit
c24e2cf423
|
@ -531,11 +531,10 @@ def reinstall_paste_ini(force_reinstall=False):
|
||||||
if os.path.exists(paste_file):
|
if os.path.exists(paste_file):
|
||||||
os.remove(paste_file)
|
os.remove(paste_file)
|
||||||
cmp_release = CompareOpenStackReleases(os_release('glance-common'))
|
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']
|
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.
|
# File is in glance-common for py3 packages.
|
||||||
else:
|
else:
|
||||||
pkg_list = ['glance-common']
|
pkg_list = ['glance-common']
|
||||||
|
|
|
@ -314,7 +314,7 @@ class TestGlanceUtils(CharmTestCase):
|
||||||
|
|
||||||
utils.reinstall_paste_ini()
|
utils.reinstall_paste_ini()
|
||||||
self.apt_install.assert_called_with(
|
self.apt_install.assert_called_with(
|
||||||
packages=['glance-api'],
|
packages=['glance-api', 'glance-registry'],
|
||||||
options=utils.REINSTALL_OPTIONS,
|
options=utils.REINSTALL_OPTIONS,
|
||||||
fatal=True
|
fatal=True
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue