<div dir="ltr"><span style="font-size:12.8px">Hi, </span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I am writing to see if someone can give me a light on this. I am trying to make the glance cache prefetcher work on Openstack Kilo but I am getting below exception. </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Context: I use Swift (v2.0.3) as storage backend for images, they are added correctly to Swift and I can launch instances, but when trying to prefetch them to the cache, it fails. The value under the image_locations table in glance DB looks something like this "swift+<a href="http://swift/" target="_blank">http://swift</a>%3Aswift:[PASSWORD]@[HOST]:5000/v2/[GLANCE_ID]" which seems to be good.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Debuging the prefetcher in another Openstack version (icehouse) I realized that in Kilo, looks like the swift scheme is not beeing imported nor registered. I´ve been playing with the "stores" and "default_store" parameters in the glance-api.conf as well as with the glance-cache.conf with no luck.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Any comments, suggestions or help will be really appreciated.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks in advance.-</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>2016-05-20 10:57:04.438 31225 DEBUG glance_store.backend [-] Attempting to import store glance.store.sheepdog.Store _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.438 31225 DEBUG glance_store.backend [-] Attempting to import store rbd _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.439 31225 DEBUG glance_store.backend [-] Attempting to import store http _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.439 31225 DEBUG glance_store.backend [-] Attempting to import store sheepdog _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.439 31225 DEBUG glance_store.backend [-] Attempting to import store glance.store.http.Store _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.440 31225 DEBUG glance_store.backend [-] Attempting to import store s3 _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.440 31225 DEBUG glance_store.backend [-] Attempting to import store glance.store.gridfs.Store _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.440 31225 DEBUG glance_store.backend [-] Attempting to import store glance.store.rbd.Store _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.441 31225 DEBUG glance_store.backend [-] Attempting to import store no_conf _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.441 31225 DEBUG glance_store.backend [-] Attempting to import store glance.store.cinder.Store _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.442 31225 DEBUG glance_store.backend [-] Attempting to import store file _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.442 31225 DEBUG glance_store.backend [-] Attempting to import store gridfs _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.442 31225 DEBUG glance_store.backend [-] Attempting to import store glance.store.filesystem.Store _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.443 31225 DEBUG glance_store.backend [-] Attempting to import store cinder _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.443 31225 DEBUG glance_store.backend [-] Attempting to import store glance.store.swift.Store _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.444 31225 DEBUG glance_store.backend [-] Attempting to import store swift _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.444 31225 DEBUG glance_store.backend [-] Attempting to import store glance.store.vmware_datastore.Store _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.444 31225 DEBUG glance_store.backend [-] Attempting to import store vmware _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.445 31225 DEBUG glance_store.backend [-] Attempting to import store glance.store.s3.Store _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.445 31225 DEBUG glance_store.backend [-] Registering options for group glance_store register_opts /usr/lib/python2.7/dist-packages/glance_store/backend.py:77</div><div>2016-05-20 10:57:04.445 31225 DEBUG glance_store.backend [-] Registering options for group glance_store register_opts /usr/lib/python2.7/dist-packages/glance_store/backend.py:77</div><div>2016-05-20 10:57:04.446 31225 DEBUG glance_store.backend [-] Attempting to import store http _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.446 31225 DEBUG glance_store.capabilities [-] Store glance_store._drivers.http.Store doesn't support updating dynamic storage capabilities. Please overwrite 'update_capabilities' method of the store to implement updating logics if needed. update_capabilities /usr/lib/python2.7/dist-packages/glance_store/capabilities.py:98</div><div>2016-05-20 10:57:04.447 31225 DEBUG glance_store.backend [-] Registering store http with schemes ('http', 'https') create_stores /usr/lib/python2.7/dist-packages/glance_store/backend.py:195</div><div>2016-05-20 10:57:04.447 31225 DEBUG glance_store.driver [-] Late loading location class glance_store._drivers.http.StoreLocation get_store_location_class /usr/lib/python2.7/dist-packages/glance_store/driver.py:93</div><div>2016-05-20 10:57:04.447 31225 DEBUG glance_store.location [-] Registering scheme http with {'location_class': <class 'glance_store._drivers.http.StoreLocation'>, 'store': <glance_store._drivers.http.Store object at 0x7fca125f96d0>, 'store_entry': 'http'} register_scheme_map /usr/lib/python2.7/dist-packages/glance_store/location.py:90</div><div>2016-05-20 10:57:04.448 31225 DEBUG glance_store.location [-] Registering scheme https with {'location_class': <class 'glance_store._drivers.http.StoreLocation'>, 'store': <glance_store._drivers.http.Store object at 0x7fca125f96d0>, 'store_entry': 'http'} register_scheme_map /usr/lib/python2.7/dist-packages/glance_store/location.py:90</div><div>2016-05-20 10:57:04.448 31225 DEBUG glance_store.backend [-] Attempting to import store file _load_store /usr/lib/python2.7/dist-packages/glance_store/backend.py:148</div><div>2016-05-20 10:57:04.448 31225 WARNING oslo_config.cfg [-] Option "filesystem_store_datadir" from group "DEFAULT" is deprecated. Use option "filesystem_store_datadir" from group "glance_store".</div><div>2016-05-20 10:57:04.449 31225 DEBUG glance_store.capabilities [-] Store glance_store._drivers.filesystem.Store doesn't support updating dynamic storage capabilities. Please overwrite 'update_capabilities' method of the store to implement updating logics if needed. update_capabilities /usr/lib/python2.7/dist-packages/glance_store/capabilities.py:98</div><div>2016-05-20 10:57:04.449 31225 DEBUG glance_store.backend [-] Registering store file with schemes ('file', 'filesystem') create_stores /usr/lib/python2.7/dist-packages/glance_store/backend.py:195</div><div>2016-05-20 10:57:04.450 31225 DEBUG glance_store.driver [-] Late loading location class glance_store._drivers.filesystem.StoreLocation get_store_location_class /usr/lib/python2.7/dist-packages/glance_store/driver.py:93</div><div>2016-05-20 10:57:04.450 31225 DEBUG glance_store.location [-] Registering scheme file with {'location_class': <class 'glance_store._drivers.filesystem.StoreLocation'>, 'store': <glance_store._drivers.filesystem.Store object at 0x7fca125f9350>, 'store_entry': 'file'} register_scheme_map /usr/lib/python2.7/dist-packages/glance_store/location.py:90</div><div>2016-05-20 10:57:04.450 31225 DEBUG glance_store.location [-] Registering scheme filesystem with {'location_class': <class 'glance_store._drivers.filesystem.StoreLocation'>, 'store': <glance_store._drivers.filesystem.Store object at 0x7fca125f9350>, 'store_entry': 'file'} register_scheme_map /usr/lib/python2.7/dist-packages/glance_store/location.py:90</div><div>2016-05-20 10:57:04.453 31225 INFO glance.image_cache [-] Image cache loaded driver 'sqlite'.</div><div>2016-05-20 10:57:04.455 31225 DEBUG glance.image_cache.prefetcher [-] Found 1 images to prefetch run /usr/lib/python2.7/dist-packages/glance/image_cache/prefetcher.py:75</div><div>2016-05-20 10:57:04.548 31225 DEBUG glance.common.client [req-be56fb22-9541-4dea-a608-80a07be76dd4 - - - - -] Constructed URL: <a href="http://10.181.0.1:9191/images/4fa9bccf-a643-477b-8682-4bad469d4c1c" target="_blank">http://[HOST]:9191/images/4fa9bccf-a643-477b-8682-4bad469d4c1c</a> _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:401</div><div>2016-05-20 10:57:04.624 31225 DEBUG glance.registry.client.v1.client [req-be56fb22-9541-4dea-a608-80a07be76dd4 - - - - -] Registry request GET /images/4fa9bccf-a643-477b-8682-4bad469d4c1c HTTP 200 request id req-6b129abb-948d-4d46-b7cb-98f41377b3e7 do_request /usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py:124</div><div>Traceback (most recent call last):</div><div>  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 457, in fire_timers</div><div>    timer()</div><div>  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 58, in __call__</div><div>    cb(*args, **kw)</div><div>  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main</div><div>    result = function(*args, **kwargs)</div><div>  File "/usr/lib/python2.7/dist-packages/glance/image_cache/prefetcher.py", line 58, in fetch_image_into_cache</div><div>    context=ctx)</div><div>  File "/usr/lib/python2.7/dist-packages/glance_store/backend.py", line 269, in get_from_backend</div><div>    loc = location.get_location_from_uri(uri, conf=CONF)</div><div>  File "/usr/lib/python2.7/dist-packages/glance_store/location.py", line 75, in get_location_from_uri</div><div>    raise exceptions.UnknownScheme(scheme=pieces.scheme)</div><div>UnknownScheme: Unknown scheme 'swift+http' found in URI</div><div>2016-05-20 10:57:04.627 31225 CRITICAL glance [req-be56fb22-9541-4dea-a608-80a07be76dd4 - - - - -] UnknownScheme: Unknown scheme 'swift+http' found in URI</div><div>2016-05-20 10:57:04.627 31225 TRACE glance Traceback (most recent call last):</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/bin/glance-cache-prefetcher", line 10, in <module></div><div>2016-05-20 10:57:04.627 31225 TRACE glance     sys.exit(main())</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/lib/python2.7/dist-packages/glance/cmd/cache_prefetcher.py", line 56, in main</div><div>2016-05-20 10:57:04.627 31225 TRACE glance     app.run()</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/lib/python2.7/dist-packages/glance/image_cache/prefetcher.py", line 79, in run</div><div>2016-05-20 10:57:04.627 31225 TRACE glance     successes = sum([1 for r in results if r is True])</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/lib/python2.7/dist-packages/eventlet/greenpool.py", line 238, in next</div><div>2016-05-20 10:57:04.627 31225 TRACE glance     val = self.waiters.get().wait()</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 175, in wait</div><div>2016-05-20 10:57:04.627 31225 TRACE glance     return self._exit_event.wait()</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 125, in wait</div><div>2016-05-20 10:57:04.627 31225 TRACE glance     current.throw(*self._exc)</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main</div><div>2016-05-20 10:57:04.627 31225 TRACE glance     result = function(*args, **kwargs)</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/lib/python2.7/dist-packages/glance/image_cache/prefetcher.py", line 58, in fetch_image_into_cache</div><div>2016-05-20 10:57:04.627 31225 TRACE glance     context=ctx)</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/lib/python2.7/dist-packages/glance_store/backend.py", line 269, in get_from_backend</div><div>2016-05-20 10:57:04.627 31225 TRACE glance     loc = location.get_location_from_uri(uri, conf=CONF)</div><div>2016-05-20 10:57:04.627 31225 TRACE glance   File "/usr/lib/python2.7/dist-packages/glance_store/location.py", line 75, in get_location_from_uri</div><div>2016-05-20 10:57:04.627 31225 TRACE glance     raise exceptions.UnknownScheme(scheme=pieces.scheme)</div><div><b>2016-05-20 10:57:04.627 31225 TRACE glance UnknownScheme: Unknown scheme 'swift+http' found in URI</b></div><div>2016-05-20 10:57:04.627 31225 TRACE glance</div></div></div>