yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #02141
[Bug 1157765] Re: glance-cache-prefetcher explodes when no auth parameters were configured
** Changed in: glance/folsom
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1157765
Title:
glance-cache-prefetcher explodes when no auth parameters were
configured
Status in OpenStack Image Registry and Delivery Service (Glance):
Fix Released
Status in Glance folsom series:
Fix Released
Status in Glance grizzly series:
Fix Released
Bug description:
Description of problem:
If there're no auth parameters configured in glance-cache.conf,
glance-cache-prefetcher fails and prints a traceback.
How reproducible:
very
Steps to Reproduce:
1. install glance
2. configure cachemanager
3. use keystone as auth backend
4. queue an image for cache
5. remove keystone parameters from glance-cache.conf
6. call glance-cache-prefetcher
Actual results:
[root@interceptor glance(keystone_admin)]# glance-cache-prefetcher --debug
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/eventlet/hubs/hub.py", line 336, in fire_timers
timer()
File "/usr/lib/python2.6/site-packages/eventlet/hubs/timer.py", line 56, in __call__
cb(*args, **kw)
File "/usr/lib/python2.6/site-packages/eventlet/greenthread.py", line 192, in main
result = function(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/image_cache/prefetcher.py", line 53, in fetch_image_into_cache
image_meta = registry.get_image_metadata(ctx, image_id)
File "/usr/lib/python2.6/site-packages/glance/registry/__init__.py", line 133, in get_image_metadata
return c.get_image(image_id)
File "/usr/lib/python2.6/site-packages/glance/registry/client.py", line 121, in get_image
res = self.do_request("GET", "/images/%s" % image_id)
File "/usr/lib/python2.6/site-packages/glance/registry/client.py", line 89, in do_request
action, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 63, in wrapped
return func(self, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 440, in do_request
self._authenticate()
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 418, in _authenticate
auth_plugin.authenticate()
File "/usr/lib/python2.6/site-packages/glance/common/auth.py", line 125, in authenticate
self.check_auth_params()
File "/usr/lib/python2.6/site-packages/glance/common/auth.py", line 94, in check_auth_params
if self.creds['auth_url'].rstrip('/').endswith('v2.0'):
AttributeError: 'NoneType' object has no attribute 'rstrip'
Traceback (most recent call last):
File "/usr/bin/glance-cache-prefetcher", line 53, in <module>
app.run()
File "/usr/lib/python2.6/site-packages/glance/image_cache/prefetcher.py", line 80, in run
successes = sum([1 for r in results if r is True])
File "/usr/lib/python2.6/site-packages/eventlet/greenpool.py", line 232, in next
val = self.waiters.get().wait()
File "/usr/lib/python2.6/site-packages/eventlet/greenthread.py", line 166, in wait
return self._exit_event.wait()
File "/usr/lib/python2.6/site-packages/eventlet/event.py", line 120, in wait
current.throw(*self._exc)
File "/usr/lib/python2.6/site-packages/eventlet/greenthread.py", line 192, in main
result = function(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/image_cache/prefetcher.py", line 53, in fetch_image_into_cache
image_meta = registry.get_image_metadata(ctx, image_id)
File "/usr/lib/python2.6/site-packages/glance/registry/__init__.py", line 133, in get_image_metadata
return c.get_image(image_id)
File "/usr/lib/python2.6/site-packages/glance/registry/client.py", line 121, in get_image
res = self.do_request("GET", "/images/%s" % image_id)
File "/usr/lib/python2.6/site-packages/glance/registry/client.py", line 89, in do_request
action, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 63, in wrapped
return func(self, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 440, in do_request
self._authenticate()
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 418, in _authenticate
auth_plugin.authenticate()
File "/usr/lib/python2.6/site-packages/glance/common/auth.py", line 125, in authenticate
self.check_auth_params()
File "/usr/lib/python2.6/site-packages/glance/common/auth.py", line 94, in check_auth_params
if self.creds['auth_url'].rstrip('/').endswith('v2.0'):
AttributeError: 'NoneType' object has no attribute 'rstrip'
Expected results:
A nice error message requesting auth parameters
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1157765/+subscriptions