glance-cache-prefetcher exceptions when ran

Bug #888340 reported by Antony Messerli on 2011-11-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Brian Waldon

Bug Description

Running latest trunk, glance-cache-prefetcher exceptions when starting:

Traceback (most recent call last):
  File "/usr/bin/glance-cache-prefetcher", line 65, in <module>
    conf, app = config.load_paste_app('glance-prefetcher', options, args)
  File "/usr/lib/pymodules/python2.6/glance/common/", line 304, in load_paste_app
    app = deploy.loadapp("config:%s" % conf_file, name=app_name)
  File "/usr/lib/pymodules/python2.6/paste/deploy/", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/pymodules/python2.6/paste/deploy/", line 272, in loadobj
    return context.create()
  File "/usr/lib/pymodules/python2.6/paste/deploy/", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/pymodules/python2.6/paste/deploy/", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/pymodules/python2.6/paste/deploy/", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/pymodules/python2.6/glance/image_cache/", line 88, in app_factory
    return Prefetcher(conf)
  File "/usr/lib/pymodules/python2.6/glance/image_cache/", line 41, in __init__
    self.cache = ImageCache(options)
  File "/usr/lib/pymodules/python2.6/glance/image_cache/", line 39, in __init__
  File "/usr/lib/pymodules/python2.6/glance/image_cache/", line 59, in init_driver
  File "/usr/lib/pymodules/python2.6/glance/image_cache/", line 68, in configure_driver
  File "/usr/lib/pymodules/python2.6/glance/image_cache/drivers/", line 97, in configure
  File "/usr/lib/pymodules/python2.6/glance/image_cache/drivers/", line 105, in set_paths
    self.incomplete_dir = os.path.join(self.base_dir, 'incomplete')
  File "/usr/lib/python2.6/", line 67, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Brian Waldon (bcwaldon) on 2011-11-10
Changed in glance:
assignee: nobody → Brian Waldon (bcwaldon)
Brian Waldon (bcwaldon) on 2011-11-10
Changed in glance:
importance: Undecided → Low
status: New → In Progress
Brian Waldon (bcwaldon) wrote :

This bug is caused by a missing 'image_cache_dir' option in glance-api.conf. Yes, you have to repeat the option in multiple config files. This specific case was caused by the older definition of 'image_cache_datadir'. Note the difference between 'dir' and 'datadir'.

Submitter: Jenkins
Branch: master

 status fixcommitted

commit 1d2e29063f359a8187fbcc39d4d00ce203c6193c
Author: Brian Waldon <email address hidden>
Date: Wed Nov 9 20:43:03 2011 -0500

    Gracefully handle image_cache_dir being undefined

    This abstracts out the 'set_paths' method of our two cache drivers into the
    base driver for now. It raises an exception when image_cache_dir is not
    defined. Fixes bug 888340

    Change-Id: Ib0be8c9b29ba1efebd03a0cdb8d001a003fc236f

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2011-12-14
Changed in glance:
milestone: none → essex-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in glance:
milestone: essex-2 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers