2019-07-29 19:23:04 |
Nathaniel Sherry |
description |
When adding an image member to a shared image, we get the following traceback on glance-api:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 1427, in __call__
request, **action_args)
File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 1470, in dispatch
return method(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/glance/common/utils.py", line 417, in wrapped
return func(self, req, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/glance/api/v2/image_members.py", line 117, in create
member_repo.add(new_member)
File "/usr/lib/python2.7/site-packages/glance/api/authorization.py", line 170, in add
self.member_repo.add(image_member)
File "/usr/lib/python2.7/site-packages/glance/notifier.py", line 556, in add
super(ImageMemberRepoProxy, self).add(member)
File "/usr/lib/python2.7/site-packages/glance/domain/proxy.py", line 121, in add
self.base.add(self.member_proxy_helper.unproxy(member))
File "/usr/lib/python2.7/site-packages/glance/api/policy.py", line 254, in add
self.member_repo.add(member)
File "/usr/lib/python2.7/site-packages/glance/location.py", line 567, in add
self._set_acls()
File "/usr/lib/python2.7/site-packages/glance/location.py", line 563, in _set_acls
context=self.context)
File "/usr/lib/python2.7/site-packages/glance_store/backend.py", line 550, in set_acls
loc = location.get_location_from_uri(location_uri, conf=CONF)
File "/usr/lib/python2.7/site-packages/glance_store/location.py", line 77, in get_location_from_uri
raise exceptions.UnknownScheme(scheme=pieces.scheme)
UnknownScheme: Unknown scheme 'file' found in URI
Related config is:
[DEFAULT]
enabled_backends = gpfs:file
[gpfs]
filesystem_store_datadir = /path/to/Openstack/Glance
If I'm reading this right, the issue is related to glance_store.location.SCHEME_TO_CLS_MAP being empty. This causes backend.get_location_from_uri to fail to look up the scheme.
I think this is happening because backend.py is populating location.SCHEME_TO_CLS_MAP, but multi_backend is populating location.SCHEME_TO_CLS_BACKEND_MAP. Because location.get_location_from_uri is only looking at SCHEME_TO_CLS_MAP, when it is called with a multi-backend config, it fails to find any registered schemes.
It looks like backend.py populates this
glance_store/multi_backend.py function create_multi_stores calling glance_store/location.py register_scheme_backend_map |
When adding an image member to a shared image, we get the following traceback on glance-api:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 1427, in __call__
request, **action_args)
File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 1470, in dispatch
return method(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/glance/common/utils.py", line 417, in wrapped
return func(self, req, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/glance/api/v2/image_members.py", line 117, in create
member_repo.add(new_member)
File "/usr/lib/python2.7/site-packages/glance/api/authorization.py", line 170, in add
self.member_repo.add(image_member)
File "/usr/lib/python2.7/site-packages/glance/notifier.py", line 556, in add
super(ImageMemberRepoProxy, self).add(member)
File "/usr/lib/python2.7/site-packages/glance/domain/proxy.py", line 121, in add
self.base.add(self.member_proxy_helper.unproxy(member))
File "/usr/lib/python2.7/site-packages/glance/api/policy.py", line 254, in add
self.member_repo.add(member)
File "/usr/lib/python2.7/site-packages/glance/location.py", line 567, in add
self._set_acls()
File "/usr/lib/python2.7/site-packages/glance/location.py", line 563, in _set_acls
context=self.context)
File "/usr/lib/python2.7/site-packages/glance_store/backend.py", line 550, in set_acls
loc = location.get_location_from_uri(location_uri, conf=CONF)
File "/usr/lib/python2.7/site-packages/glance_store/location.py", line 77, in get_location_from_uri
raise exceptions.UnknownScheme(scheme=pieces.scheme)
UnknownScheme: Unknown scheme 'file' found in URI
Related config is:
[DEFAULT]
enabled_backends = gpfs:file
[gpfs]
filesystem_store_datadir = /path/to/Openstack/Glance
If I'm reading this right, the issue is related to glance_store.location.SCHEME_TO_CLS_MAP being empty. This causes backend.get_location_from_uri to fail to look up the scheme.
I think this is happening because backend.py is populating location.SCHEME_TO_CLS_MAP, but multi_backend is populating location.SCHEME_TO_CLS_BACKEND_MAP. Because location.get_location_from_uri is only looking at SCHEME_TO_CLS_MAP, when it is called with a multi-backend config, it fails to find any registered schemes. |
|