glance-cache-prefetcher causes Unknown Scheme errors when using 'file://' images

Bug #888383 reported by Dan Prince
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Rick Harris
Diablo
Fix Released
Undecided
Unassigned

Bug Description

Trying to prefetch an image. When I run glance-cache-prefetcher after queing an image for prefetching I'm getting the following error:

root@glance1:~# glance-cache-prefetcher --config-file=/etc/glance/glance-cache.conf
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 336, in fire_timers
    timer()
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 56, in __call__
    cb(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
    result = function(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/image_cache/prefetcher.py", line 58, in fetch_image_into_cache
    options=self.options)
  File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 128, in get_from_backend
    store = get_store_from_uri(uri)
  File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 122, in get_store_from_uri
    return get_store_from_scheme(scheme)
  File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 110, in get_store_from_scheme
    raise exception.UnknownScheme(scheme)
UnknownScheme: Unknown scheme '%(scheme)s' found in URI
Details: file
Traceback (most recent call last):
  File "/usr/bin/glance-cache-prefetcher", line 64, in <module>
    app.run()
  File "/usr/lib/python2.7/dist-packages/glance/image_cache/prefetcher.py", line 75, in run
    successes = sum([1 for r in results if r is True])
  File "/usr/lib/python2.7/dist-packages/eventlet/greenpool.py", line 232, in next
    val = self.waiters.get().wait()
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
    return self._exit_event.wait()
  File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 120, in wait
    current.throw(*self._exc)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
    result = function(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/image_cache/prefetcher.py", line 58, in fetch_image_into_cache
    options=self.options)
  File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 128, in get_from_backend
    store = get_store_from_uri(uri)
  File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 122, in get_store_from_uri
    return get_store_from_scheme(scheme)
  File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 110, in get_store_from_scheme
    raise exception.UnknownScheme(scheme)
glance.common.exception.UnknownScheme: Unknown scheme '%(scheme)s' found in URI
Details: file

Changed in glance:
assignee: nobody → Rick Harris (rconradharris)
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Jay Pipes (jaypipes) wrote :

FYI, the fix for this should just be importing the glance.store.X modules in the cache prefetcher.

Changed in glance:
milestone: none → essex-2
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/1556
Committed: http://github.com/openstack/glance/commit/f394327f3869b8b820f1fdd345c7e6073dd82820
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit f394327f3869b8b820f1fdd345c7e6073dd82820
Author: Rick Harris <email address hidden>
Date: Fri Nov 11 18:39:31 2011 +0000

    Making prefetcher call create_stores.

    Fixes bug 888383

    Change-Id: Ia3adc6a30f16f889cd344f8cb3fca4a071871fe4

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to glance (stable/diablo)

Reviewed: https://review.openstack.org/1785
Committed: http://github.com/openstack/glance/commit/3f08f394ee9b3badcd027fc7881548f270442670
Submitter: Jenkins
Branch: stable/diablo

 tag in-stable-diablo
 done

commit 3f08f394ee9b3badcd027fc7881548f270442670
Author: Rick Harris <email address hidden>
Date: Fri Nov 11 18:39:31 2011 +0000

    Making prefetcher call create_stores.

    Fixes bug 888383

    (cherry picked from commit f394327f3869b8b820f1fdd345c7e6073dd82820)

    Change-Id: Ia3adc6a30f16f889cd344f8cb3fca4a071871fe4

Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: essex-2 → 2012.1
Revision history for this message
ldpcloud (ldipaola-despegar) wrote :

Hi, I am getting the same behaviour but in Openstack Kilo version when trying to prefetch an image. I use Swift as storage backend for Openstack images.

2016-05-12 11:37:08.215 24806 CRITICAL glance [req-625f99f7-c131-49bd-bbda-99676d56faf8 - - - - -] UnknownScheme: Unknown scheme 'swift+http' found in URI
2016-05-12 11:37:08.215 24806 TRACE glance Traceback (most recent call last):
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/bin/glance-cache-prefetcher", line 10, in <module>
2016-05-12 11:37:08.215 24806 TRACE glance sys.exit(main())
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/cmd/cache_prefetcher.py", line 56, in main
2016-05-12 11:37:08.215 24806 TRACE glance app.run()
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/image_cache/prefetcher.py", line 79, in run
2016-05-12 11:37:08.215 24806 TRACE glance successes = sum([1 for r in results if r is True])
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/lib/python2.7/dist-packages/eventlet/greenpool.py", line 238, in next
2016-05-12 11:37:08.215 24806 TRACE glance val = self.waiters.get().wait()
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 175, in wait
2016-05-12 11:37:08.215 24806 TRACE glance return self._exit_event.wait()
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 125, in wait
2016-05-12 11:37:08.215 24806 TRACE glance current.throw(*self._exc)
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main
2016-05-12 11:37:08.215 24806 TRACE glance result = function(*args, **kwargs)
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/image_cache/prefetcher.py", line 58, in fetch_image_into_cache
2016-05-12 11:37:08.215 24806 TRACE glance context=ctx)
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/lib/python2.7/dist-packages/glance_store/backend.py", line 269, in get_from_backend
2016-05-12 11:37:08.215 24806 TRACE glance loc = location.get_location_from_uri(uri, conf=CONF)
2016-05-12 11:37:08.215 24806 TRACE glance File "/usr/lib/python2.7/dist-packages/glance_store/location.py", line 75, in get_location_from_uri
2016-05-12 11:37:08.215 24806 TRACE glance raise exceptions.UnknownScheme(scheme=pieces.scheme)
2016-05-12 11:37:08.215 24806 TRACE glance UnknownScheme: Unknown scheme 'swift+http' found in URI

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.