Queens charms still use legacy Nova API version
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Nova Cloud Controller Charm |
New
|
Undecided
|
Unassigned |
Bug Description
We're deploying OpenStack Queens on Ubuntu Bionic using charms. The issue is that the generated endpoints still use the legacy Nova 2.0 version. This means that micro-versions are not available, along with the API features introduced in the last few years.
Looking at the code, we found out that there seems to be a check which enables the 2.1 Nova API version starting with Queens but most probably the OpenStack version isn't properly detected.
### ./hooks/
def determine_
'''Generates a dictionary containing all relevant endpoints to be
passed to keystone as relation settings.'''
region = config('region')
os_rel = os_release(
cmp_os_rel = CompareOpenStac
nova_public_url = ('%s:%s/
nova_
nova_admin_url = ('%s:%s/
if cmp_os_rel >= 'queens':
)
)
)
Those depend on os_rel, which asks os_release for the version...
### ./hooks/
def os_release(package, base='essex', reset_cache=False):
'''
Returns OpenStack release codename from a cached global.
If reset_cache then unset the cached os_release version and return the
freshly determined version.
If the codename can not be determined from either an installed package or
the installation source, the earliest release supported by the charm should
be returned.
'''
global _os_rel
if reset_cache:
if _os_rel:
return _os_rel
_os_rel = (
base)
return _os_rel
Should be enough to get the version of the nova-common package and see it has queens installed. The version installed is:
ii nova-common 2:17.0.5-0ubuntu1 all OpenStack Compute - common files
And it should match queens, because:
### ./hooks/
# >= Liberty version->codename mapping
PACKAGE_CODENAMES = {
'nova-common': OrderedDict([
('12', 'liberty'),
('13', 'mitaka'),
('14', 'newton'),
('15', 'ocata'),
('16', 'pike'),
('17', 'queens'),
('18', 'rocky'),
]),
But it doesn't. OpenStack origin, since we're using Bionic, is set to "distro".
Thanks!