Get glance v1 client for icehouse.
Previously the image virt type was qemu and the compute node virt type was kvm. This works for deployments prior to rocky but in rocky this causes the image type filter to return no valid hosts. An update to charmhelpers has removed the default behaviour of setting the virt type to 'qemu' by default. Due to a bug in icehouse updating glance image properties using the v2 api fails (See Bug #1371559) so for icehouse deploys get a v1 client. Change-Id: I20548118092a4480f37c7ab7e9d60e72e299989b
This commit is contained in:
parent
a15725c7d5
commit
9cdf1baccd
|
@ -192,8 +192,18 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment):
|
|||
self.keystone_sentry,
|
||||
openstack_release=self._get_openstack_release())
|
||||
|
||||
force_v1_client = False
|
||||
if self._get_openstack_release() == self.trusty_icehouse:
|
||||
# Updating image properties (such as arch or hypervisor) using the
|
||||
# v2 api in icehouse results in:
|
||||
# https://bugs.launchpad.net/python-glanceclient/+bug/1371559
|
||||
u.log.debug('Forcing glance to use v1 api')
|
||||
force_v1_client = True
|
||||
|
||||
# Authenticate admin with glance endpoint
|
||||
self.glance = u.authenticate_glance_admin(self.keystone)
|
||||
self.glance = u.authenticate_glance_admin(
|
||||
self.keystone,
|
||||
force_v1_client=force_v1_client)
|
||||
|
||||
# Authenticate admin with nova endpoint
|
||||
self.nova = nova_client.Client(2, session=self.keystone_session)
|
||||
|
|
Loading…
Reference in New Issue