New image cache breaks Glance on Windows

Bug #819936 reported by Jay Pipes
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Jay Pipes

Bug Description

The requirement of python-xattr means that Glance is no longer working on Windows, since python-xattr is a *nix-only library.

We have two solutions:

* Make the image cache extensible -- have xattr driver support on *nix and use, say, a SQLite DB on Windows
* Make the image cache fully an extension and make Glance packages that do not include the image cache extension (and thus the the xattr dependency)

Tags: windows
Jay Pipes (jaypipes)
summary: - New image cache break Glance on Windows
+ New image cache breaks Glance on Windows
Revision history for this message
Peter Pouliot (ppouliot) wrote :

We successfully reproduced this. This currently breaks installation on windows completely.

ErrorThe following errors were encountered: Error: Launchpad system error var LP = { cache: {}, links: {} }; var cookie_scope = '; Path=/; Secure; Domain=.launchpad.net'; // Define a global YUI sandbox that should be used by everyone. var LPS = YUI({ // Don't try to fetch CSS files. fetchCSS: false, // For paranoia, set a low timeout to not wait on loading a resource. timeout: 50 }); LPS.use('node', 'event-delegate', 'lp', 'lp.app.links', 'lp.app.longpoll', function(Y) { Y.on('load', function(e) { sortables_init(); initInlineHelp(); Y.lp.activate_collapsibles(); activateFoldables(); activateConstrainBugExpiration(); Y.lp.app.links.check_valid_lp_links(); // Longpolling will only start if // LP.cache.longpoll is populated. Y.lp.app.longpoll.setupLongPollManager(); }, window); // Hook up the function that dismisses the help window if we click // anywhere outside of it. Y.on('click', handleClickOnPage, window); Y.on('lp:context:web_link:changed', function(e) { window.location = e.new_value; }); }); var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-12833497-1']); _gaq.push(['_setDomainName', '.launchpad.net']); _gaq.push(['_setAllowHash', false]); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga); })(); Ale

Revision history for this message
Alex Landman (alandman) wrote :

I am attaching the nova-compute log we are getting on a HyperV host.

Revision history for this message
Alex Landman (alandman) wrote :

The display of the dependency causing nova to fail.

Revision history for this message
Jordan Rinke (jordanrinke) wrote :

You can work around this by changing the following... (note: these changes break glance registry/api but won't hurt the client needed for hyperv) - note this isn't the best way to do it, it is just the way I did it really quick when I saw it broke my install.

24: import xattr
to
24: # import xattr

213: entry_xattr = xattr.xattr(path)
to
213: entry_xattr = path # was xattr.xattr(path)

229: entry_xattr = xattr.xattr(path)
to
229: entry_xattr = path # was xattr.xattr(path)

Jay Pipes (jaypipes)
Changed in glance:
milestone: none → essex-1
Revision history for this message
Jay Pipes (jaypipes) wrote :

Setting to medium Priority, as doing non-standard fstab modifications to enable user_xattr support should not be a requirement to run Glance API servers...

Changed in glance:
assignee: nobody → Jay Pipes (jaypipes)
importance: Low → Medium
Jay Pipes (jaypipes)
Changed in glance:
status: Confirmed → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/1064
Committed: http://github.com/openstack/glance/commit/39c855743423175beca6955ed30c15b9c40f9129
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 39c855743423175beca6955ed30c15b9c40f9129
Author: Jay Pipes <email address hidden>
Date: Fri Oct 21 16:10:32 2011 -0400

    Adds Driver Layer to Image Cache

    Fixes LP Bug#879136 - keyerror: 'image' when doing nova image-list
    Fixes LP Bug#819936 - New image cache breaks Glance on Windows

    This patch refactors the image cache further by adding an
    adaptable driver layer to the cache. The existing filesystem-based
    driver that depended on python-xattr and conditional fstab support
    has been moved to /glance/image_cache/drivers/xattr.py, and a new
    default driver is now based on SQLite and has no special requirements.

    The image cache now contains a simple interface for pruning the
    cache. Instead of the logic being contained in
    /glance/image_cache/pruner.py, now the prune logic is self-contained
    within the ImageCache.prune() method, with pruning calling the
    simple well-defined driver methods of get_least_recently_accessed()
    and get_cache_size().

    Adds a functional test case for the caching middleware and adds
    documentation on how to configure the image cache drivers.

    TODO: cache-manage middleware...
    TODO: cache management docs

    Change-Id: Id7ae73549d6bb39222eb7ac0427b0083fd1af3ec

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: essex-1 → 2012.1
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.