Upgrading charm causes removal of glance-api-paste.ini
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Glance Charm |
Fix Committed
|
Undecided
|
Alan Baghumian | ||
2023.1 |
Fix Committed
|
Undecided
|
Alan Baghumian | ||
2023.2 |
Fix Committed
|
Undecided
|
Alan Baghumian | ||
Yoga |
Fix Committed
|
Undecided
|
Alan Baghumian | ||
Zed |
Fix Committed
|
Undecided
|
Alan Baghumian |
Bug Description
This is the second time this is happening, so I'm filing this as a bug. The first time I saw this, I was running focal/xena and upgrading the glance charm caused one of the HA glance units to lose glance-
This time, I'm running focal/yoga and after upgrading the glance charm today, two of the HA units lost the glance-
Looking at the code, these files are supposed to get reinstalled by re-installing glance-common:
def reinstall_
'''
Re-install glance-
Existing glance-
and the original files provided by the packages will be
re-installed.
This will only be performed once per unit unless force_reinstall
is set to True.
'''
db = kv()
reinstall = not db.get(
cmp_release = CompareOpenStac
if not os.path.
# See LP: #1812972
reinstall = True
if reinstall:
for paste_file in [GLANCE_
if os.path.
# glance-registry is deprecated at queens but still
# installed.
if cmp_release < 'rocky':
# File is in glance-common for py3 packages.
else:
db.flush()
However if for any reasons glance-common is not re-installable (example: UCA repository not being available), the charm upgrade breaks the API services by removing these.
I think we should add a safeguard to backup and restore these ini files if apt_install() fails.
Please let me know if need any logs or extra information.
Thank you,
Alan
Changed in charm-glance: | |
assignee: | nobody → Alan Baghumian (alanbach) |
Fix proposed to branch: master /review. opendev. org/c/openstack /charm- glance/ +/900258
Review: https:/